Understand the MCP authorization conformance test suite architecture
mainThe conformance suite is designed to test the OAuthProvider implementation against MCP (Model Context Protocol) authorization requirements. The test architecture is composed of several key components:
- Deployable Fixture:
worker/index.tshosts theOAuthProviderwithin a Worker environment. - Configuration:
worker/wrangler.jsoncmanages Worker configuration and local KV bindings. - Test Harness:
support/harness.tsmanages theworkerdlifecycle and ensures per-test storage resets. - Client Implementation:
support/oauth-client.tsprovides an OAuth-specific HTTP client for executing tests. - Shared Logic:
shared.tscontains RPC configurations, credential types, and fixture constants.
Tests are organized by functional area:
- Authorization Server: Metadata and authorization-code/PKCE flows.
- Authorization Security: Redirects, client authentication, Resource Indicators, issuer, and refresh-scope security.
- Protected Resource: RFC 9728 discovery, Bearer challenges, scopes, and audience enforcement.
- Client Registration: Dynamic Client Registration (DCR), pre-registration, and Client ID Metadata Documents (CIMD).
- Token Lifecycle: Refresh, downscoping, code replay, and revocation.
Note: Application-owned identity, consent presentation, and operation-level authorization policy are not covered by this conformance suite as they reside outside the provider's scope.