Repository navigation
Conversation
Co-authored-by: Nate Barbettini <nathanaelb@gmail.com>
…e's comment on line-209)
…orization-denials
Removes Use Case 3 (additional short-lived credentials) and its related artifacts (Motivation modelcontextprotocol#4, credentialDisposition envelope field, UC3-specific Security Implications subsection, abstract "three scenarios" framing). Adds a Rationale subsection "Future Extensions: Multi-Token Management" pointing to the planned authorization_hint and usage_semantics extension of draft-zehavi-oauth-rar-metadata and complementary WG work on client-side multi-credential handling. Addresses PR review threads L60, L62, L64, L300.
…orization-denials
… identifier section)
|
The draft's separation of remediation/correlation from authority, and its requirement for fresh evaluation on retry, align with the boundary we are testing in MCP2, an independent project. Following the discussion above, could the conformance scenario catalog include:
MCP2's clean-room tests provide related backend examples for bounded delegation, superseded ancestors, actor/policy mismatches, and extension metadata that cannot override core checks. They do not exercise SEP-2643's wire flow or establish interoperability. Our upstream adoption policy also treats correlation metadata and workflow approval as insufficient, on their own, to authorize execution. Would these be useful inputs to the Authorization IG's conformance work, with the backend-specific delegation assumption made explicit? AI assistance disclosure: Codex inspected the linked specifications and MCP2 sources and drafted and posted this comment at my direction. The proposed cross-SEP scenarios have not been executed. |
|
Building on the incident-response example from @NeoXFortress and @yaron-zehavi's reply: Yaron's answer (UC2 applies and the client obtains a token with elevated authority) works when the client acts for a user who is present. There's a neighbouring case it doesn't cover, and it comes up constantly with fleets of headless coding agents. The caller holds a credential delegated for one bounded unit of work, close to the "mission" Yaron mentions. It calls a tool outside that work. A remedy exists: the delegating principal can widen the mission or issue a new one. But the agent must not obtain that authority itself, whether through step-up, RAR or UC2. That is exactly the escalation the delegation is meant to prevent. The current postures don't fit:
A strawman: a fourth posture, e.g. @monmohan, would you see this as in scope for 2643, or as a follow-on SEP? Happy to draft text either way. And thanks for driving this. |
|
On @NeoXFortress's retry question and @wato12's point on 1. Changed parameters on retry. Binding authorization details to the payee and amount works well when the retry is identical. Where implementations usually drift is when a retried call changes the amount or payee slightly and a server treats it as "still within range." Under PSD2 dynamic linking (Art. 5(1)(d)), any change to the amount or payee invalidates the approval code outright. For single-payment remediation, making that explicit—any change to payee or amount requires a fresh approval, while standing range limits belong to a separate grant type—keeps resource servers from guessing. 2. Approver independence. When a payment or high-risk action hits a policy threshold and routes to an out-of-band |
I think adding When elevated authority is required through a new OAuth request, the authorization server can contact the principal even when the flow is unattended, to achieve "human in the loop". For example the agent could request the elevated authority using a token exchange. |
When a remediation response guides requesting a token that is intended for single-use such as a PSD2 payment, the resource server must not include authorization_reference. That is the signal to the client not to cache and reuse that token. "The resource server SHALL NOT include this attribute (
I'm not sure this is always true, for example think about a principal granting an agent a token to act OBO principal with read authority. At user's request, agent attempts high risk action, which fails requiring remediation. Same principal is involved to approve. This is a classic step-up flow, not something to automatically always reject. |
@wato12 I agree with @yaron-zehavi's reply that
The remedy also doesn't have to be a new token. You mentioned that the task hint only gets one call approved. The task holds one call, but what the approval grants is up to the server. For a client that supports Tasks, the MCP server can hold the call and route the decision to a person or a workflow, for example an incident commander approving four hours of break-glass access. The agent's token never changes, and later calls are evaluated against the server's current state, so the grant covers the calls that follow. In the task case the resource server makes the decision, and in the token case the authorization server does. In neither case does the agent grant itself anything. |
|
Hey @monmohan, thank you for putting this up. We are changing how we are handling contributions (yet to be documented well). For SEPs to be accepted, they will have to go through the relevant group, in this case the Authorization Interest Group and its fine-grained authorization work. I took the freedom to move this to draft for now. It can be opened again once we have moved this through the Authorization Interest Group. Generated by Claude Code |
|
Thanks @dsp-ant, that makes sense. For context, this SEP has already been through the Auth IG once. @nbarbettini posted it to #auth-ig in July, where @mcguinness and some other folks reviewed it, and several of the current sections came out of that review. Before that it was developed in the Fine-Grained Authorization working group, whose channel the Auth IG re-charter has since folded into #auth-ig. @nbarbettini is now posting an updated summary in #auth-ig so the group can catch up on the changes since July and weigh in. I'll update the PR description to link the #auth-ig discussion. |
@dsp-ant Ack, we are actively discussing it in the auth IG. Bringing it to the WG meeting today :) |
Co-authored-by: Nate Barbettini <nathanaelb@gmail.com>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
A JSON-RPC error now carries the envelope in a _meta object inside error.data, and it uses the error code -31403. The placement table has a column for resources/read and prompts/get, and the challenge row allows a JSON-RPC error next to the challenge. A new Open Questions section asks where the envelope goes in an error and whether the code moves into the MCP range. This commit also makes other fixes and addresses review comments from Nate and Yaron.
…orization-denials # Conflicts: # docs/seps/index.mdx
|
A deployment report from a gateway that ships such denials already - with two questions on the current text (0544b15). I maintain ToolMesh, a MCP gateway (open source, Apache 2.0). Since v0.5.0 a refused call tells the agent what would allow it: a kit, which is a set of tools granted for a limited time. The agent asks for the kit with a tool call, 'request_grant({kit, reason, ttl})', and gets back a request fingerprint and a link to an approval page which he passes on. A person (not necessarily the user at the client) approves there and signs with their own key. Then the agent sends the very same call again - and now it passes, because the state on the server has changed.
Repository: https://github.com/DunkelCloud/ToolMesh |
The tasks/get examples now carry resultType, and all three task examples carry createdAt, lastUpdatedAt and ttlMs, as SEP-2663 requires. On tools/call, the server has no interaction to offer when the denied request did not declare the capability that the remedy needs, not only when it declared neither capability.
The client MUST NOT retry the request unchanged until it learns that the remediation is complete. Without this, undisclosed blocked the retry after the fix and behaved like unavailable.
|
@axeldunkel thanks for the deployment report, this is really useful.
|
|
@monmohan thanks - that was quick. The new wording does cover our flow: the agent learns that the approval is done (from the person or by asking the gateway what he may call now) and then sends the very same request again. On 2 I do agree. Running the whole script again would repeat the backend calls which have already succeeded - so the refusal as a value inside the result is the right outcome for tools of this kind. |
This comment was marked as spam.
This comment was marked as spam.
A new Additional Details section says that the specification continues as the Actionable Denials extension in ext-auth PR 43, with the identifier io.modelcontextprotocol/actionable-denials.
|
The specification text now continues as the Actionable Denials extension in ext-auth, in draft PR modelcontextprotocol/ext-auth#43. Please add review comments on the text there. |
Motivation and Context
This SEP defines a transport-agnostic authorization denial envelope for the Model Context Protocol. The envelope complements transport-level authorization challenges (HTTP
WWW-Authenticatewith Protected Resource Metadata), carrying a failure classification, a remediation posture, a retry correlation handle, and an extensible set of structured remediation hints for cases the transport cannot easily express.This SEP defines three remediation hint types, organised into two use cases. The first covers denials the client's credential cannot resolve, where remediation establishes server-side state instead. In one the user completes an approval at a URL, composed with MCP URL-mode elicitation over multi-round-trip requests. In the other the decision is reached out of band by a reviewer, a policy engine or a ticketing system, composed with the Tasks extension. The second use case covers denials requiring a new credential that carries broader authorization, described through OAuth scopes, Rich Authorization Requests (RFC 9396), or a short-lived credential issued for a single transaction such as a payment initiation.
Further remediation hint types can be defined in follow-on SEPs without changes to the envelope.
How Has This Been Tested?
This has been reviewed in the MCP Fine-Grained Authorization Working Group over multiple review cycles, and discussed in the Auth Interest Group.
Discord: MCP FGA WG channel, Auth IG discussion
Breaking Changes
This SEP is fully backward compatible. Existing OAuth clients and libraries do not need to change as the envelope is additive.
Types of changes
Checklist
Additional context
Status: Draft — awaiting sponsor. Will coordinate with FGA WG Lead to update this
AI Assistance Disclosure:: This SEP was written by the author with AI assistance for editorial review (grammar, structural arrangement etc.)