SEP-2350: scope-accumulation check in auth/scope-step-up#282
Open
localden wants to merge 1 commit into
Open
Conversation
SEP-2350 clarifies that on step-up re-authorization, clients SHOULD compute the union of previously-granted and newly-challenged scopes so they don't lose permissions for other operations. - Traceability yaml: 1 client check (two spec sentences merged), 1 server check tracked for a future server-side scenario, 1 excluded reword - ScopeStepUpAuthScenario now challenges with only the missing scope so union accumulation is observable on the second authorization request - New check sep-2350-scope-union-on-reauth (WARNING when the previously granted scope is dropped) - everything-client withOAuthRetry now accumulates prior token scope into the re-auth scope (passing example) - New auth-test-echo-scope negative client + vitest case
commit: |
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.
Closes #281.
Adds the
sep-2350-scope-union-on-reauthcheck to the existingauth/scope-step-upscenario per SEP-2350: on re-authorization after a 403insufficient_scope, clients SHOULD compute the union of previously-granted and newly-challenged scopes.What changed
src/seps/sep-2350.yaml: traceability — 1 clientcheck:, 1 servercheck:(sep-2350-server-single-challenge, tracked for a future server-side scenario), 1excluded:(no-normative-delta reword)ScopeStepUpAuthScenario: the 403 challenge now lists only the missing scope (mcp:write), andtools/callgates onmcp:writealone so the scenario completes for non-accumulating clients (which then surface as a WARNING, not a hang). New check asserts the second authorization request still includes the previously-grantedmcp:basic.examples/.../helpers/withOAuthRetry.tsnow unions the prior token'sscopewith the challenge scope before re-auth.auth-test-echo-scope.ts(re-authorizes with the challenge scope verbatim) + vitest case asserting the WARNING fires.Output —
node dist/index.js client --scenario auth/scope-step-upeverything-client(accumulates)sep-2350-scope-union-on-reauthSUCCESSauth-test-echo-scope(echoes challenge)sep-2350-scope-union-on-reauthWARNINGnpm test: auth suite 28/28 every run.server/all-scenarios.test.tsflakes ~2/3 in the full suite (port contention with the auth servers; passes in isolation) — pre-existing, unrelated to this change.