feat: add conformance tests for iss parameter (SEP-2468)#220
Open
max-stytch wants to merge 2 commits intomodelcontextprotocol:mainfrom
Open
feat: add conformance tests for iss parameter (SEP-2468)#220max-stytch wants to merge 2 commits intomodelcontextprotocol:mainfrom
max-stytch wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
Adds 5 draft conformance scenarios testing RFC 9207 issuer parameter validation in OAuth authorization responses: - auth/iss-supported: server advertises support and sends correct iss - auth/iss-not-advertised: server omits iss parameter entirely - auth/iss-supported-missing: client must reject missing iss when required - auth/iss-wrong-issuer: client must reject mismatched iss value - auth/iss-unexpected: client must reject iss when not advertised Also adds auth-test-iss-validation.ts, a reference client that correctly validates iss per RFC 9207, and negative tests confirming the standard client fails all three rejection scenarios. TODO: Update RFC_9207_ISS_PARAMETER spec reference once SEP-2468 (modelcontextprotocol/modelcontextprotocol#2468) is merged.
Author
|
Conformance tests were ran against modelcontextprotocol/go-sdk#859 locally for verification purposes: |
max-stytch
commented
Apr 9, 2026
| * includes the correct iss value in the authorization redirect. A conformant | ||
| * client should validate iss and proceed normally. | ||
| */ | ||
| export class IssParameterSupportedScenario implements Scenario { |
Author
There was a problem hiding this comment.
I wanted to have one scenario with many checks, but it looks like the pattern is one scenario -> one auth server, and we need a separate AS for each check :/
max-stytch
commented
Apr 9, 2026
| #!/usr/bin/env node | ||
|
|
||
| /** | ||
| * Well-behaved client that validates the iss parameter in authorization responses. |
Author
There was a problem hiding this comment.
I would have loved to add this behavior to the base ConformanceOAuthProvider, but it looks like that provider doesn't have access to the AS Metadata currently, so it is not possible for us to do the checks there. runCrossAppAccessCompleteFlow similarly needs to fetch the metadata itself.
Defer to maintainers on how best to incorporate this code.
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.
Motivation and Context
Adds 5 draft conformance scenarios testing RFC 9207 issuer parameter validation in OAuth authorization responses:
Also adds auth-test-iss-validation.ts, a reference client that correctly validates iss per RFC 9207, and negative tests confirming the standard client fails all three rejection scenarios.
TODO: Update RFC_9207_ISS_PARAMETER spec reference once SEP-2468 (modelcontextprotocol/modelcontextprotocol#2468) is merged.
How Has This Been Tested?
CI/CD
Breaking Changes
Types of changes
Checklist
Additional context