Kratos cookie secret length requirement unclear
@unatasha8 đang làm issue này rồi.
Từ ngày 20/11/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
From the docs:
So let's play the password game!
Assuming 1 character = 1 byte, this suggest yaml-escaping 32 raw bytes. More than 256 bit entropy would be impossible, unless unicode characters are allowed, but I've never seen emojiis in (cookie) secrets.
To make it more sane, I'd expect kratos to hash the passed value before usage, regardless of the length of the value to extract full entropy, and exactly that seems to be done: https://github.com/ory/kratos/blob/50f1b8f0df8636cea94d1100c1dc68dd8f6bdfc5/driver/registry_default.go#L530-L534
IMHO, the documentation should be updated to remove the secret length requirement.
Reproducing the bug
Open https://www.ory.com/docs/kratos/guides/select-cipher-algorithm#xchacha20-poly1305 and https://www.ory.com/docs/kratos/guides/secret-key-rotation and follow the guide rigorously.
Relevant log output
The bug is in the documentation.
Relevant configuration
The bug is in the documentation.
Version
The bug is in the documentation.
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 161
- Fork
- 1.9k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ory/docs
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
good first issue help wanted upstream
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
good first issue help wanted upstream
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Shared kratos pages can only belong to one sidebar — OEL readers lose navigation contextCó thể làm lại được @hperl đã nhận 76 ngày trước và không có pull request nào đang mở. Đang mở
Issue tương tự
-
Resources: New palettes of MacaoĐang mởresources
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
railmapgen/rmg-palette#2445 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
danielmiessler/LifeOS#2242 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
good first issue hacktoberfest help wanted translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/appduct#129 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100