Skip to content

Conversation

davidism
Copy link
Member

@davidism davidism commented Nov 8, 2024

ItsDangerous 2.0 supports key rotation by passing a list instead of a single secret key. Add a new SECRET_KEY_FALLBACKS config that can be a list of old keys to try unsigning in order. The built-in session cookie implementation supports this, but other extensions will need to add support to use the fallback list if it makes sense. Updating the secret keys (or any config) always requires restarting the application, otherwise workers can be out of sync.

closes #5621
closes #5428
closes #1574

@davidism davidism added this to the 3.1.0 milestone Nov 8, 2024
@davidism davidism merged commit a20bcff into main Nov 8, 2024
13 checks passed
@davidism davidism deleted the rotate-secret-key branch November 8, 2024 16:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rotating secret keys Secret Key Rotation support for rotating secret keys?
1 participant