Skip to content

SEP-2352: authorization-server migration scenario#286

Open
localden wants to merge 1 commit into
mainfrom
sep-2352-authorization-server-migration
Open

SEP-2352: authorization-server migration scenario#286
localden wants to merge 1 commit into
mainfrom
sep-2352-authorization-server-migration

Conversation

@localden
Copy link
Copy Markdown

Closes #285.

Adds the auth/authorization-server-migration scenario (draft suite) per SEP-2352.

What changed

  • src/seps/sep-2352.yaml: 3 check:, 3 excluded: (internal state-keying / UI)
  • New src/scenarios/client/auth/authorization-server-migration.ts: two auth servers; PRM authorization_servers flips from AS₁ → AS₂ after the first authenticated request via the existing createServer getAuthServerUrl closure (no helper changes). AS₂ asserts:
    • sep-2352-reregister-on-as-change — its /register was called
    • sep-2352-no-reuse-on-as-change / sep-2352-no-cross-as-credential-reuse — AS₁'s client_id never appeared at /authorize or /token
  • Passing example: ConformanceOAuthProvider gains invalidateCredentials (the SDK already calls this) and bindIssuer(issuer) which clears all credentials when the issuer changes; the everything-client adds an issuer-aware handler that re-reads PRM on each 401 and rebinds before re-authorizing.
  • Negative: auth-test-reuse-credentials.ts (single-issuer provider, reuses credentials) + vitest case
  • Registered in draftScenariosList, source.introducedIn = DRAFT_PROTOCOL_VERSION

Outputnode dist/index.js client --scenario auth/authorization-server-migration

client result
everything-client (issuer-aware) 30/30, 0 failed — registers twice (once per AS); all 3 SEP-2352 checks SUCCESS
auth-test-reuse-credentials 24/27, 3 failed — AS₂ observed AS₁'s client_id and no fresh registration

npm test: auth suite 29/29; spec-version suite passes. server/all-scenarios.test.ts flakes ~2/3 in the full suite (port contention with auth servers; passes in isolation) — pre-existing, unrelated to this change.

SEP-2352 requires that client credentials are bound to the issuing
authorization server: when PRM authorization_servers changes to a new
issuer, clients MUST re-register and MUST NOT reuse the previous AS's
client credentials.

- Traceability yaml: 3 checks, 3 excluded (internal state / UI)
- New auth/authorization-server-migration scenario (draft suite): two
  auth servers; PRM flips from AS1 to AS2 after the first authenticated
  request; AS2 asserts it received a fresh /register and never saw AS1's
  client_id at /authorize or /token
- ConformanceOAuthProvider gains invalidateCredentials and bindIssuer so
  the everything-client can key credentials by issuer (passing example)
- everything-client adds an issuer-aware handler for this scenario that
  re-reads PRM on each 401 and rebinds before re-authorizing
- auth-test-reuse-credentials negative client + vitest case
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 18, 2026

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@286

commit: 06c16e7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conformance coverage for SEP-2352 (authorization-server binding & migration)

1 participant