part…
Building governance for MCP?
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
This page of the spec is normative: its MUSTs apply to any implementation of the authorization framework. It complements OAuth 2.1 §7, which MUST also be followed.
Clients MUST include resource (RFC 8707); servers MUST validate that the token was issued for them. Without this, a token from one service works on another: the basis of token passthrough.
Clients and servers MUST store tokens securely (OAuth 2.1 §7.1). Authorization Servers SHOULD issue short-lived access tokens and, for public clients, MUST rotate refresh tokens.
All AS endpoints MUST be HTTPS; all redirect URIs MUST be localhost or HTTPS.
PKCE mandatory, S256, support verified via metadata (lesson 9.4).
An attacker-controlled AS tries to get the client to send it a code or token issued by an honest AS. Mitigation: iss validation (9.4). PKCE alone is not enough (the client would send the code_verifier to the attacker's endpoint), nor are resource indicators (the attacker intercepts before the honest AS). It depends on honest ASes issuing iss.
Clients MUST have registered redirect URIs; ASes MUST validate redirect URIs by exact match; clients SHOULD use and verify state; ASes MUST avoid redirecting to untrusted URIs (OAuth 2.1 §7.12.2) and SHOULD redirect automatically only if they trust the URI (otherwise, inform the user).
localhost impersonation (any process can listen on that port). ASes SHOULD show additional warnings for localhost-only redirect URIs, MAY require attestation, and MUST clearly display the host of the redirect URI during authorization.MCP proxies with a static client_id towards a third-party AS MUST obtain user consent for each dynamically registered client before forwarding them to the third party's AS (details in 10.2).
Servers MUST validate the token before processing, ensuring it was issued for them (audience claim or other means) and MUST reject those that were not. If the server calls upstream APIs, it acts as an OAuth client with a separate token issued by the upstream AS; it MUST NOT pass through the MCP client's token.
resource, iss, HTTPS, exact redirects, state, audience, no passthrough).iss in responses and authorization_response_iss_parameter_supported: true.1. Why does PKCE alone not prevent the mix-up attack?
The defence is to validate iss against the registered issuer before redeeming the code.
2. Which redirect URIs are admissible?
OAuth 2.1 §1.5.
3. An MCP server that calls an upstream API must use…
Passing through the client's token is forbidden.