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 はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ory/docs のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
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 が 76 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
似ている issue
-
docs
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
remix-run/react-router#15558 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solana-foundation/pay-kit#341 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
supabase/agent-skills#607 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信