Wire SEP-990 enterprise-managed-authorization conformance fixture#3007
Wire SEP-990 enterprise-managed-authorization conformance fixture#3007maxisbey wants to merge 1 commit into
Conversation
Adds an auth/enterprise-managed-authorization handler to the conformance client fixture using the IdentityAssertionOAuthProvider shipped in #2988: performs the RFC 8693 token-exchange at the harness IdP for an ID-JAG, then the RFC 7523 jwt-bearer grant at the harness AS via the provider. Drops the last client-side waiver from expected-failures.yml. Widens the _run_auth_session annotation to httpx.Auth (the new provider is not an OAuthClientProvider subclass; all existing callers already satisfy httpx.Auth).
There was a problem hiding this comment.
1 issue found across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
LGTM — CI-only conformance fixture wiring that follows the existing auth scenario handler pattern; the conformance run itself validates the change.
Extended reasoning...
Overview
This PR adds a conformance handler for the auth/enterprise-managed-authorization scenario in .github/actions/conformance/client.py and removes the now-passing waiver from both expected-failures baselines. It is entirely contained under .github/actions/conformance/ — no library (src/) code is touched.
Correctness
The new handler mirrors the existing auth/client-credentials-* handlers: read context, validate required keys, construct a provider, call _run_auth_session. I verified the IdentityAssertionOAuthProvider constructor signature (server_url, storage, client_id, client_secret, issuer, assertion_provider, token_endpoint_auth_method) and build_protected_resource_metadata_discovery_urls(None, server_url) against the code shipped in #2988 — the call sites match. Widening _run_auth_session's annotation from OAuthClientProvider to httpx.Auth is safe since all existing callers pass httpx.Auth instances and the function only hands the value to httpx.AsyncClient(auth=...).
Security risks
None for the SDK or its users: this is test-harness glue executed only in CI against the conformance mock harness. The credentials involved come from MCP_CONFORMANCE_CONTEXT set by the harness. Trusting authorization_servers[0] from the PRM document would be a questionable pattern in production, but the code comment explicitly calls this out as conformance-only behavior and the production provider requires the issuer as static configuration.
Level of scrutiny
Low. CI fixture changes are self-validating — if the handler were wrong, the conformance workflow would fail (the runner also fails on stale expected-failure entries, so the baseline removals are checked both ways). The bug-hunting pass found no issues, and there are no outstanding reviewer comments.
Adds the conformance client handler for
auth/enterprise-managed-authorizationand drops the last client-side waiver fromexpected-failures.yml.Motivation and Context
#2988 shipped
IdentityAssertionOAuthProviderand #3004 shipped docs/examples for it, but the conformance fixture was still falling through to the authorization-code default for this scenario. This was the only remainingclient:entry in the baseline.How Has This Been Tested?
Against the pinned harness (
@b18aa918):complete-flow-token-exchange,complete-flow-jwt-bearer,valid-bearer-token,prm-pathbased-requested,authorization-server-metadataall SUCCESS)--suite all: 421/421, 0 failed, 0 warnings, baseline check cleanBreaking Changes
None. Fixture-only change under
.github/actions/conformance/; nosrc/touched.Types of changes
Checklist
Additional context
The handler does the two pieces
IdentityAssertionOAuthProviderdeliberately leaves to the caller:build_protected_resource_metadata_discovery_urlsand handsauthorization_servers[0]to the provider. A production deployment would supply the issuer as static configuration instead.assertion_providercallback — sendssubject_token=idp_id_token,audience=<AS issuer>,resource=<MCP url>to the harness IdP token endpoint, receives the ID-JAG.The provider then runs leg 2 (RFC 7523 jwt-bearer at the AS) with
token_endpoint_auth_method="client_secret_basic"— required, the harness AS rejects on missingAuthorization: Basic._run_auth_session'soauth_authannotation is widened fromOAuthClientProvidertohttpx.Auth(the new provider is not anOAuthClientProvidersubclass; all existing callers already satisfyhttpx.Auth).Part of #2891.
AI Disclaimer