docs: document the logout param allowlist and the PKCE settings - #132
Open
FrankApiyo wants to merge 1 commit into
Open
docs: document the logout param allowlist and the PKCE settings#132FrankApiyo wants to merge 1 commit into
FrankApiyo wants to merge 1 commit into
Conversation
LOGOUT_QUERY_PARAM_ALLOWLIST has no README entry while its login counterpart does. Notes the collision rule the code implements: values ona-oidc stashes server-side, such as id_token_hint, win over a caller-supplied query param. Adds the four PKCE settings with their real defaults, and flags the trap in PKCE_CODE_CHALLENGE_METHOD -- _generate_pkce_code_challenge always SHA-256s the verifier, so the setting only labels the outgoing parameter. Setting it to 'plain' advertises plain while still sending a hashed challenge and the exchange fails. PKCE_CODE_CHALLENGE_TIMEOUT is the TTL on the cached state -> verifier entry, so it also caps how long a login may sit before its callback.
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.
Documents five settings the module reads but the README never mentioned. Docs-only — no code changes.
Split out of #124, where these sections were originally added. Neither belongs there: that PR touches no PKCE code at all, and
LOGOUT_QUERY_PARAM_ALLOWLISTpredates it.LOGOUT_QUERY_PARAM_ALLOWLISTIts login counterpart is documented; this one wasn't. Includes the collision rule the code implements (
viewsets.py): values ona-oidc stashes server-side, such asid_token_hint, win over a caller-supplied query param rather than being overridden.PKCE
USE_PKCE,PKCE_CODE_CHALLENGE_METHOD,PKCE_CODE_CHALLENGE_TIMEOUT,PKCE_CODE_VERIFIER_LENGTH— with the defaults read fromoidc/settings.py.One trap worth the table entry:
PKCE_CODE_CHALLENGE_METHODonly labels the outgoing parameter — the challenge is always SHA-256. Setting it to"plain"would advertiseplainwhile still sending a hashed challenge, and the IdP would reject the exchange. Documented as "leave it", not as a free choice.PKCE_CODE_CHALLENGE_TIMEOUTis the TTL on the cachedstate → code_verifierentry (cache.set(state_cache_key(state), code_verifier, self.pkce_code_challenge_timeout)), so it also caps how long a login may sit before its callback completes.Test plan
oidc/settings.pyNo code touched, so CI is a formality here.