mirror of
https://github.com/zitadel/zitadel.git
synced 2026-11-03 12:47:09 -06:00
The Login UI trusted the session entries stored in its `sessions` cookie
without any integrity protection, so a client could inject or modify
entries and have the Login UI act on sessions of other users.
Every cookie entry is now signed with an HMAC-SHA256 key derived via
HKDF from ZITADEL_SESSION_COOKIE_SECRET. Unsigned or tampered entries
are ignored. The secret must be at least 32 characters, otherwise /ready
reports not ready, and a comma-separated list is accepted for rotation.
If the secret is unset, the key is derived from the configured API
credential and a deprecation warning is logged at startup.
The compose deployment and the self-hosting docs set the new secret.
Upgrade notes: set ZITADEL_SESSION_COOKIE_SECRET (openssl rand -base64 32)
to the same value on all Login UI replicas; only the compose deployment
sets it so far, other deployments use the deprecated fallback. Existing
cookie entries are unsigned and therefore ignored, so users have to sign
in to the Login UI once more after the upgrade.
(cherry picked from commit 0e0f1e96d4)