Conversation
Requested scopes outside a client's recognised set are dropped before they reach the consent page or the grant, so a client cannot obtain or display scopes it was not configured for. openid and offline_access are always implicitly recognised; the per-client list only adds to those. The DynamicClients and MetadataClients middlewares take a scopes option that is inherited by the client registrations they source. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sorah
added a commit
that referenced
this pull request
Jun 1, 2026
Follow-up to the per-client scopes allow-list (#17). The recognised scopes of an authorization request were dropped once openid and offline_access had been gated; retain them so authz rules can act on them and operators can audit what was granted, on both the initial and the refresh flow. - AuthorizationCode gains a scopes member, serialized through as_json (round-trips storage) and as_log. Older records without the key deserialize to nil. - DownstreamAuthorization exposes the recognised scopes to the rules as context.scopes (and carries them on its Result). requested_scopes is a required argument the caller always supplies from the appropriate source: the authorization endpoint passes the OIDC request's parsed scope (split the same way rack-oauth2 parses it downstream), the refresh flow the scopes recorded on the grant. The engine never reads the request for scopes; context.request stays purely a rule escape hatch. Either source is filtered through the client's allow-list, so a scope dropped from the client since issuance falls away on refresh. - OidcAuthorizationEndpoint records the filtered scopes onto the AuthorizationCode it persists. - RefreshToken gains a scopes member, minted from the AuthorizationCode and preserved across rotation; older records default to an empty set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Requested scopes outside a client's recognised set are dropped before they reach the consent page or the grant, so a client cannot obtain or display scopes it was not configured for. openid and offline_access are always implicitly recognised; the per-client list only adds to those.
The DynamicClients and MetadataClients middlewares take a scopes option that is inherited by the client registrations they source.
🤖 Generated with Claude Code