Kratos cookie secret length requirement unclear
@unatasha8 ci sta già lavorando.
Dal 20/11/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 161
- Fork
- 1.9k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ory/docs
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
good first issue help wanted upstream
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
good first issue help wanted upstream
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
-
Shared kratos pages can only belong to one sidebar — OEL readers lose navigation contextForse di nuovo libera @hperl l’ha presa 76 giorni fa e non c’è nessuna pull request aperta. Aperta
Issue simili
-
resources
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
railmapgen/rmg-palette#2445 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
danielmiessler/LifeOS#2242 ·
I maintainer di solito rispondono entro 5 giorni
-
good first issue hacktoberfest help wanted translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/appduct#129 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100