docs: secret key rotation, token safety, salt clarification, deprecate key_derivation="none" - #1
Open
GazingInSpring wants to merge 1 commit into
Open
docs: secret key rotation, token safety, salt clarification, deprecate key_derivation="none"#1GazingInSpring wants to merge 1 commit into
GazingInSpring wants to merge 1 commit into
Conversation
GazingInSpring
force-pushed
the
worktree-agent-affde5923d7e624fc
branch
6 times, most recently
from
May 27, 2026 22:04
216c40f to
c2fa727
Compare
…derivation=none deprecation
GazingInSpring
force-pushed
the
worktree-agent-affde5923d7e624fc
branch
from
May 27, 2026 22:19
c2fa727 to
58c4a75
Compare
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.
Summary
Documentation and deprecation pass covering secret key rotation, unsafe token handling, and salt behaviour. All 297 tests pass.
Changes
docs/concepts.rst.. warning::block clarifying that the salt is a static, deterministic context label (not per-token randomness / not a nonce or IV), and thatkey_derivation="none"silently ignores it, defeating context separation.SignatureExpiredis raised immediately regardless of rotation list length; key rotation does not extend a token's lifetime.docs/serializer.rst.. warning::before theloads_unsafeexample: never act on an unauthenticated payload in production; never use with pickle or any code-executing deserialiser.docs/signer.rst.. warning::after.. autoclass:: NoneAlgorithm: tokens have no signature, do not use in production.src/itsdangerous/signer.pykey_derivation="none": emitsDeprecationWarningon use."none"(with deprecation note) to thekey_derivationparameter docstring anddefault_key_derivationclass-attribute comment.NoneAlgorithmdocstring to state explicitly that tokens offer no authenticity guarantee.import warnings.tests/test_itsdangerous/test_signer.py"none"from thetest_key_derivationparametrize list.test_key_derivation_none_deprecatedassertingDeprecationWarningis raised (inherited byTestTimestampSignervia class hierarchy — no changes needed intest_timed.py).CHANGES.rstUnreleased:SignatureExpiredrotation behaviour, key replacement guidance, token-credential security note,key_derivation="none"deprecation.