Repository navigation
Authorization for multi-tenant MCP servers and gateways: where should per-resource audience binding and policy live? #850
Replies: 2 comments 6 replies
|
I like the split between resource-specific audience binding and a separate per-operation policy layer. One boundary I’m unsure about is device-facing calls, where an operation may depend on more than subject, capability and resource path before it should proceed. For example, if a caller is authorized to invoke start_motor on a particular asset, should current operational state or safety preconditions be inputs to that same policy decision? Or do you see those checks as intentionally belonging behind the MCP authorization boundary, in a separate device/backend safety layer? That seems directly relevant to your third question. In a device-facing deployment, an operation can be authorized for a caller and resource without necessarily being safe to carry out at that moment. |
|
On question 1, I think your split is right. Audience binding (RFC 8707 resource indicators, checked against the On 2, I'd make hiding a SHOULD for aggregators and say plainly that it isn't the enforcement point. A client can still call a tool it never saw in tools/list, so the per-call check is what actually protects the backend. On 3 and the start_motor example above: I'd keep safety preconditions (current device state, interlocks) behind the boundary in the device layer and let the policy decide only whether this caller may ask. Device state can change between the policy decision and the actuation, so that check has to sit next to the actuation anyway. Policy can still take state as an input for rules like "only during a maintenance window", as long as it isn't the last check before the motor moves. I work at Permit, and we wrote about the same split (OAuth and audience for the token, a separate policy check per tool call): https://www.permit.io/blog/authorization-strategies-for-model-context-protocol-mcp |
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Your Idea
What problem does it solve?
Multi-tenant MCP deployments have no agreed pattern for authorization. When a
gateway or broker fronts many MCP servers behind one endpoint, exposed beyond a
trusted network (and increasingly device-facing), every deployment reinvents:
replayed against another (RFC 8707 / RFC 9728);
explicit denies), evaluated per operation;
learn that a backend it is not authorized for exists;
Who would benefit?
Anyone running MCP for many clients and many backends behind one address:
gateway/broker operators, enterprises exposing internal MCP servers, and
hardware/device-facing deployments where the authz boundary is safety-relevant.
How might it be implemented?
The building blocks already exist in OAuth 2.1 + RFC 9728/8707; the open question
is which parts the protocol should recommend or standardize versus leave to
implementations. This is not theoretical: I built and shipped a working reference
that implements all of the above end to end (Apache-2.0), so the "how" is proven,
not hypothetical:
Per the SEP guidance (validate the problem, build a prototype, then write the
SEP), the prototype exists; this post is me validating shared interest before
drafting a SEP.
Open questions
or should more live in the protocol?
existence leak) as a pattern for aggregation?
Disclosure: I am the dev/maintainer of the implementation linked above, and this
post was drafted with AI assistance, as English is not my native language.
Scope
All reactions