Kratos cookie secret length requirement unclear
@unatasha8 已经在做这个了。
开始于 2025年11月20日。
评估
这个 Issue 还没有评估数据。
描述
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
- 主要语言
- TypeScript
- 星标
- 161
- 派生
- 1.9k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ory/docs 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
upstream reference closed: github.com/w3c/webauthn/issues/1372可能重新可做 @Faisal-9999 于 53 天前认领,目前没有进行中的 PR。 未关闭good first issue help wanted upstream
难度 1/5 1-3 小时 新手友好度 72/100
-
bug
难度 1/5 1 小时以内 新手友好度 78/100
-
good first issue help wanted upstream
难度 1/5 1-3 小时 新手友好度 72/100
-
Shared kratos pages can only belong to one sidebar — OEL readers lose navigation context可能重新可做 @hperl 于 105 天前认领,目前没有进行中的 PR。 未关闭
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
openremote/openremote#3487 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
coollabsio/jean#867 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
ehmpathy/rhachet-roles-bhuild#616 ·
维护者通常 1 天内回复
-
📘 Docs supabase/cli
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
bug(cli): theme file home-directory check uses startsWith (sibling dirs pass, Windows casing fails)未关闭area/core kind/bug priority/p2 status/bot-triaged
难度 2/5 1-3 小时 新手友好度 79/100
google-gemini/gemini-cli#29955 · 2 条评论 ·
维护者通常 1 天内回复