docs: key rotation and algorithm migration guide - #2
Open
GazingInSpring wants to merge 2 commits into
Open
Conversation
Adds docs/key-rotation.rst covering: - secret_key list mechanism and three-step rotation procedure - fallback_signers formats and SHA-1→SHA-512 migration recipe - Combined key rotation + algorithm migration with complexity warning - Internal iter_unsigners mechanics (primary vs fallback, BadPayload behaviour) - TimedSerializer / SignatureExpired interaction with fallback loop - Version history table for the SHA-512 default change (1.0.0 yanked, 1.1.0 fallback added, 2.0.0 fallback removed) Also adds the new page to the toctree in docs/index.rst between encoding and license.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
docs/key-rotation.rstpage covering key rotation andalgorithm migration, and a test that was missing for the
SignatureExpiredshort-circuit inTimedSerializer.loads.Changes
docs/key-rotation.rst(new, 266 lines)secret_keylist: signing always usessecret_keys[-1],verification iterates newest→oldest
fallback_signers: all three entry formats,SHA-1→SHA-512 two-phase recipe
signer-instance count (
1 + N×M)iter_unsignersand theloadsloopTimedSerializerexpiry behaviour:SignatureExpiredhard-stops thefallback loop;
BadPayloadalso hard-stops2.0.0 empty
default_fallback_signersdocs/index.rstkey-rotationto toctreetests/test_itsdangerous/test_timed.pytest_fallback_signers_not_expired: fallback path works withmax_agesettest_fallback_signers_expired:SignatureExpiredis re-raised immediatelyinside the fallback loop rather than falling through to the next signer
Verification
-Wstrict mode)