feat: add resource parameter validation tests (RFC 8707) (#118)
* feat: add resource parameter validation tests (RFC 8707) Adds conformance tests for OAuth Resource Indicators (RFC 8707) implementation: 1. Resource parameter checks added to token-endpoint-auth-basic scenario: - resource-parameter-in-authorization: Verify resource in auth request - resource-parameter-in-token: Verify resource in token request - resource-parameter-valid-uri: Verify valid canonical URI - resource-parameter-consistency: Verify consistency between requests 2. New auth/resource-mismatch scenario: - Tests that client rejects when PRM resource doesn't match server URL - Server returns mismatched resource in PRM - Test passes if client does NOT proceed with authorization Also adds spec references for RFC 8707 and MCP resource parameter spec. Closes #33 * fix: make resource consistency check a FAILURE and remove dead code - Change resource parameter consistency from WARNING to FAILURE - Remove unreachable protocol check in validateCanonicalUri (URL constructor already validates scheme presence)
This commit is contained in:
parent
4a2ba8ae7b
commit
67ad358019
1 changed files with 264 additions and 6 deletions
|
|
@ -73,6 +73,14 @@ export const SpecReferences: { [key: string]: SpecReference } = {
|
|||
id: 'SEP-1046-Client-Credentials',
|
||||
url: 'https://github.com/modelcontextprotocol/ext-auth/blob/main/specification/draft/oauth-client-credentials.mdx'
|
||||
},
|
||||
RFC_8707_RESOURCE_INDICATORS: {
|
||||
id: 'RFC-8707-Resource-Indicators',
|
||||
url: 'https://www.rfc-editor.org/rfc/rfc8707.html'
|
||||
},
|
||||
MCP_RESOURCE_PARAMETER: {
|
||||
id: 'MCP-Resource-Parameter-Implementation',
|
||||
url: 'https://modelcontextprotocol.io/specification/draft/basic/authorization#resource-parameter-implementation'
|
||||
},
|
||||
MCP_PREREGISTRATION: {
|
||||
id: 'MCP-Preregistration',
|
||||
url: 'https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#preregistration'
|
||||
|
|
|
|||
Loading…
Reference in a new issue