Est.
MCP GatewayLong read

SSO-Driven MCP Access Control Patterns When Permission Management Cannot Live Outside Your IdP

How to make your IdP the authority behind every MCP tool call.

· 9 min read
Cover illustration for “SSO-Driven MCP Access Control Patterns When Permission Management Cannot Live Outside Your IdP”
MCP Gateway · November 20, 2026 · 9 min read · 1,926 words

An enterprise MCP gateway with RBAC and audit logging should enforce permissions from the identity provider that already governs human access. SSO establishes the user, delegated tokens limit downstream access, and per-tool policy constrains each agent action. The durable pattern is straightforward. The IdP supplies authority, the gateway enforces it, and the customer’s audit stack records the result.

Why MCP creates a permission management problem that cannot be solved at the server level

An agent does not merely retrieve information but executes tools, making each call a permission decision with the stakes of a human action. Snowflake’s enterprise MCP guide frames the structural risk behind the protocol’s “USB-C for AI” appeal. Any compatible client can connect to any compatible server, but compatibility says nothing about whether the person behind a request should be allowed to execute it.

The original specification left identity propagation through tool calls unspecified. Early deployments therefore reached for hardcoded tokens, shared service accounts, and long-lived API keys in local configuration files. Convenience supplied the credential. It also supplied the authority. An agent could act with the permissions of whoever configured the integration. This is the “god-mode” problem, with the setup credential defining the potential damage.

The server does not know the calling user’s group memberships or current employment status, and the agent framework does not enforce policy on what the tool returns or does. The permission gap is structural, and only the IdP can close it.

What breaks when permission management lives outside the IdP

Leaver access persists when a shared account or gateway-local credential survives the employee’s departure. Overprivileged agents get the scope of a static token, which can spread that excess access across dozens of connected servers in one session. When attribution is missing, investigators have the name of a service account but no name for the person responsible. Uncontained delegation lets manipulated agents use permissions beyond the intended task.

The attack surface gives attackers ways to use failures that are already there. Tool poisoning uses forged tool descriptions to steer an agent, while context leakage lets data pass from one session to another. The “lethal trifecta” combines privileged access, untrusted input, and an external exfiltration channel. Identity controls bound what a deceived agent can reach and provide a person to whom the action can be attributed.

Invariant Labs’ GitHub MCP toxic agent flow disclosure demonstrates that distinction. A crafted issue in a public repository redirected a Claude agent into accessing private repository data and leaking it, using credentials broader than the intended task. CVE-2026-13341 describes a related confused-deputy failure in the Kong Konnect MCP server, where indirect prompt injection causes unintended API requests on the caller’s behalf. Per-user, IdP-scoped credentials would constrain that delegated authority rather than leave the setup account’s full scope available. The architectural failure is that the agent’s credentials gave bad instructions room to operate.

Why the IdP is the only durable authority layer for MCP permissions

The missing authority already exists in the enterprise. The IdP holds group memberships, role assignments, employment status, device compliance, and session context. It also governs the joiners-movers-leavers lifecycle, with SCIM provisioning connecting account changes to access changes. A gateway-local permission store would need to keep pace with every role change, team restructure, and departure. At that point, it is auditioning to become a second IdP.

When SCIM provisioning is active, new users can receive access on first login and lose it through deprovisioning without a separate manual update in the MCP system. A separate access list is another place where old permissions can live on. Centralization alone is therefore not the test. A central policy store that is cut off from the employee lifecycle still has no source of authority to keep its rules up to date.

The correct division of responsibility is precise. The gateway enforces, while the IdP supplies the authoritative identity and entitlement facts that drive the decision. The gateway translates those facts into per-tool, per-action policy at call time. Snowflake contrasts this with traditional API gateways built for deterministic app-to-app traffic and static credentials. MCP requires a narrower question about whether this agent may execute this tool with these parameters for this user right now.

How the MCP spec itself has moved to formalize IdP authority through EMA and ID-JAG

The June 2026 Enterprise-Managed Authorization extension formalizes centralized provisioning of MCP server access through the IdP. EMA lets users receive connected servers on first login without separate OAuth consent screens for each application. Confusion over personal and work accounts and the need to set up servers by hand no longer have to shape how enterprise access is granted.

The mechanism uses two exchanges that preserve authorization. The client presents its SSO identity assertion to the enterprise IdP through RFC 8693 token exchange and receives an Identity Assertion JWT Authorization Grant. It then exchanges that ID-JAG at the MCP server’s authorization server for an access token. The IdP’s authority enters the session cryptographically.

The standards status requires a careful distinction. EMA is marked stable, while ID-JAG remained an IETF Internet-Draft as of October 27, 2026. The 2026-07-28 specification release covered EMA, stateless sessions, server-to-client change notifications, and the deprecation of Dynamic Client Registration in favor of Client ID Metadata Documents. Governance built against an earlier version may therefore be misaligned. Solo.io’s Entra and agentgateway walkthrough argues that closed enterprise deployments need enterprise SSO and an enforcement point rather than external, per-application OAuth consent flows. That is a choice about who controls authorization, with OAuth remaining the underlying mechanism.

How SSO tokens propagate into MCP sessions through the token flow

Diagram: How an SSO Token Becomes a Per-Tool Permission Decision. Visualizes: Visualize the five-step delegation chain that connects a user's SSO login to an authorized MCP tool call.

The user begins by authenticating to the MCP gateway through enterprise SSO, using SAML or OIDC. The gateway obtains a short-lived IdP token containing the user’s group memberships and uses those claims to enforce team-based policy on subsequent tool calls. The token connects login to execution. Without that connection, a successful SSO login could still lead to tools operating under an unrelated shared credential.

VS Code, Cursor, Claude Desktop, and cloud-based agents are not conventional browser applications, but the MCP Authorization specification uses OAuth flows to enable OIDC login for such clients. Solo.io’s walkthrough anchors this in an Entra App Registration representing the gateway. Configured scopes let Entra set the audience claim correctly, and MCP clients request those scopes during login. Authentication is handled centrally without rewriting each MCP server.

Autonomous agents need service-to-service flows using JWT bearer assertions. Where an agent represents a human, the essential property is a delegation chain binding its token to that authenticated user. Short-lived tokens bound the period in which a compromised credential remains useful. Long-lived tokens can outlast offboarding or the intended session. The On-Behalf-Of pattern provides the downstream bridge. The gateway exchanges the user’s SSO token for a token scoped to the specific tool, keeping raw user credentials away from the agent and making the delegated permissions available for per-action policy.

How role and group memberships become per-action policy at the tool call level

The gateway evaluates two sets of permissions on each call. One comes from the user’s IdP-sourced entitlements, and the other comes from the agent’s registered allowed actions. Access is their intersection. An agent registered for read tools cannot invoke a write tool merely because its user has write permission. Likewise, an agent registered to reach finance tools can use them only for a user who has the required finance membership.

Group claims make that distinction concrete at the tool level. Membership in engineering can give a user read access to database MCP tools, while membership in finance gives a user access to the accounts-payable tool. Neither membership grants the other’s access. A server-wide grant is too coarse because it can expose every tool on that server, including write operations a team does not need. The gateway maps IdP roles to each of those operations without keeping its own list of users with privileged access.

Lifecycle changes must reach this mapping without manual repair. SCIM-driven removal of group memberships is reflected at the next token refresh, while deprovisioning prevents the user from authenticating again. Because of that timing, token lifetime is part of the security model as well as a setting for operational tuning. Flat RBAC is not the only available policy model. The walkthrough names OpenFGA as an engine for relationship-based authorization that can make more detailed decisions while the IdP stays the source of identity authority.

What enterprise MCP gateways offer IdP-linked RBAC and audit logging

A complete implementation needs more than an SSO checkbox. Its architecture includes SSO and SCIM directory sync, per-user OAuth or OBO delegation, individual-tool authorization for humans and agents, brokered upstream credentials, and per-call audit records. Raw secrets should stay out of both the agent and the LLM context window. Shadow MCP discovery and an approval workflow bring unofficial servers into the approved registry. These are separate capabilities, so support for one does not establish support for all.

Cloudflare MCP Server Portals became generally available on September 24, 2026, giving users one endpoint for approved servers. Cloudflare Access identity policies determine which servers each user sees, while aliases and allowlists curate exposed tools. Service tokens support autonomous agents, and Logpush exports portal activity to a SIEM. Those controls need to be distinguished from per-user delegation and per-action enforcement when evaluating fit.

Agentgateway, an open-source Linux Foundation project, implements MCP Authorization and centralizes SSO so individual servers do not need to be rewritten for Entra. Its documented App Registration pattern shows how it can be used with Entra. Microsoft MCP Gateway also provides native Entra integration and runs self-hosted on Kubernetes, locally or on AKS. Its audit coverage is not established in the supplied documentation. Azure API Management is a separate product.

Traefik Hub emphasizes OBO authentication through OAuth 2.0 token exchange and Task-Based Access Control for dynamic agent authorization, within a three-layer defense-in-depth architecture. IBM ContextForge’s architecture documentation explicitly lists SSO support for Entra ID, Okta, Keycloak, Google, and generic OIDC. That establishes named IdP compatibility, with the full set of required authorization and audit capabilities still requiring separate evidence. Assessing the “enterprise-ready” label therefore requires distinct evidence for identity integration, delegated scope, tool-level enforcement, audit export, and deployment fit.

What the audit trail must record when every permission decision flows from the IdP

Security teams need to identify the person, agent, tool, authorizing policy, and outcome, rather than learn only that a service account made a request. The schema therefore needs the authenticated identity from the IdP token, the agent identity and registration, the tool and its parameters, and the allow-or-deny decision with the policy that produced it. Records must be queryable by person, agent, and time window. Otherwise, centralized authority remains difficult to prove after an incident.

OpenTelemetry v1.39 added MCP semantic conventions, including mcp.method.name, mcp.session.id, and mcp.protocol.version. These attributes let MCP calls appear as attributed spans in the existing observability stack. Identity also connects activity to expenditure. Without per-user and per-agent attribution, teams cannot identify which user or workflow drives API and compute costs. Snowflake includes cost controls in its telemetry and audit traces pillar, so the same execution record helps show who is responsible for costs.

Logs should stream to the customer’s existing SIEM and observability tools. Production defaults should be metadata-only, including timings, statuses, token counts, cost estimates, tool names, status codes, and prompt template IDs and hashes. Full prompts and tool content require explicit controls, separate encrypted storage, and short expiry. Accountability means every agent action is attributable to a named person, authorized by readable policy, and recorded in the customer’s own stack.

Filed underMCP Gateway

More in MCP Gateway