Securing OAuth credentials for enterprise AI agent tool calls requires both gates. Pre-issuance policy gates decide whether an agent may receive a credential and how much authority it grants. Runtime credential interception controls the resulting tool calls. Together, with a connected delegation audit trail, they address risks that neither layer can close alone.
Why enterprise MCP OAuth flows create a credential governance problem that standard IAM was not designed to solve
The Coalition for Secure AI (CoSAI) documented a May 2025Asana incidentin which a tenant isolation flaw allowed cross-organization data contamination affecting up to a thousand enterprises. An MCP server acting as an OAuth proxy holds credentials and, without per-request authorization checks, can be manipulated into using one user’s authority for another user’s request. Authentication alone does not settle whose authority applies.
That ambiguity grows with every delegation hop. A request can pass from a user to an orchestrating agent, through intermediate MCP servers, and finally to a downstream API. A server using its own credentials acts with server-level privilege, exceeding the caller’s narrower permissions. Conventional IAM’s assumption of a clear caller and a short authorization chain no longer holds.
MCP defines an OAuth 2.1 framework but makes authorization optional. Knostic’s 2025 internet scan found1,862 MCPservers that anyone could reach, a finding cited by the Cloud Security Alliance AI Safety Initiative. Agents also often use human credentials in place of identities built for them. CoSAI identifies token passthrough, which forwards an upstream token downstream instead of exchanging it, as the most common mistake in production MCP deployments. Adoption and governance maturity are different measures.
What pre-issuance policy gates actually control, and where in the credential lifecycle they fire
A pre-issuance gate decides whether an agent is entitled to a credential before that credential is issued or refreshed. It binds access to an identity, task, and narrow scope. The Non-Human Identity Management Group requires each OAuth client to be explicitly registered, with publisher-controlled metadata, a signed statement, or software attestation to back it up. An agent must have an identity that someone is accountable for before it can receive credentials.
Validation must also stop unauthorized requests from progressing. The July 28, 2026 MCP specification update tightened authorization checks by requiring clients to validate the authorization server’s issuer. The Dolt MCP authentication bypass, disclosed in August 2026, shows what broken validation permits. Versions 0.3.1–0.3.6 returned a 401 for invalid tokens but kept processing them, and session validation accepted IDs made by an attacker. An unauthenticated caller could therefore run database tools with server credentials. Version 0.3.7 fixed the flaw.
Approval still has a time limit as evidence. Pillar Security documented the August 2026 Deadbugz campaign, whose “productivity-suite” server stayed harmless for its first three tool calls. It then instructed the agent to collect SSH keys, AWS credentials, shell history, and Kubernetes configuration while hiding that activity from the user. Narrow issuance limits available authority, but an allowlist also needs version and behavior checks because tool descriptions can change after approval.
What runtime credential interception controls, and why it operates on a different threat model entirely
Runtime interception fires when an agent attempts a tool call. Enforcement sits in the request path, outside the prompt, where it can attest workload identity, apply authorization policy, and issue or retrieve a short-lived credential scoped to the operation. This is its genuine strength. Scope validation, consent checks, and inspection can assess the server’s behavior against its registration promises.
The Deadbugz pattern belongs at this boundary. Inspection of tool descriptions, calls, and results can expose behavior that appears only after installation. A gate limited to the original user prompt would miss that change. Cryptographic workload identity also gives the enforcement layer a basis for authorization beyond a client’s assertion about itself.
The August 2025 Drift/Salesforce incident shows the stakes of credential use after issuance. The token theft involved attackers compromising Salesloft’s infrastructure, stealing OAuth tokens held by Drift for its Salesforce integration, and using them directly against Salesforce APIs to access victim enterprises’ complete customer data. Its relevance is the authority available through an already-issued token.
Runtime interception cannot retroactively narrow that token’s scope. A broad, long-lived credential remains a standing risk, especially if its use can bypass the interception point. Approving every proposed action automatically also gives up control, while too many prompts can teach operators to approve everything. Runtime enforcement needs bounded credentials and workable renewal. Those are decisions the issuance layer must support.
How the two layers fit together: each layer’s failure mode is the other layer’s design premise
The layers address different kinds of failure. Pre-issuance gates close entitlement risk by controlling who receives credentials, under whose authority, and with what scope. Runtime interception addresses execution risk by evaluating actual calls and changes in behavior. Dolt illustrates why runtime checks cannot safely inherit a corrupted identity, while Drift illustrates why issuance must bound a credential before theft or misuse occurs.
The IBM Agent Identity and HashiCorp Vault 2.2 announcement at TechXchange 2026 described this combined architecture, with general availability in October 2026. Agents enter a central inventory with ownership, metadata, risk classifications, approved tool connections, and lifecycle state. During execution, the system preserves on-behalf-of delegation across token exchanges and issues short-lived, task-scoped OAuth tokens with consent-aware authorization. The controls remain active while the agent runs.
Both gates also need an enforcement point the client cannot override. ETDI’s client-side signature checks, re-approval prompts, and hash comparisons can be skipped by a compromised client because the design lacks client attestation or a reference-monitor argument. SPIFFE/SPIRE provides workload identity attested by infrastructure. That identity supports external enforcement, but identity attestation and an unavoidable request-path control remain distinct requirements.
The delegation chain audit trail as the gap neither layer closes by default
Two working gates do not automatically produce a complete history. Standard OAuth token introspection reports a token’s scope but does not reconstruct which orchestrator authorized which sub-agent, in what sequence, under whose original human authority. Each exchange can be valid while the ancestry remains missing. Without delegation parentage records, there is no sound basis for piecing the chain together later.
The Cloud Security Alliance’s Agent Identity Governance Framework (AIGF) requires authorization servers to keep those records and put the full chain back to the human-principal anchor in agent token introspection responses. This adds structure beyond ordinary OAuth introspection. Explicit actor and subject claims show who acts and whose authority they use. Scope must narrow at each delegation hop, never exceed the delegating principal’s effective permissions.
Compliance makes that history more than a debugging aid. The EU AI Act timeline places transparency duties from August 2026, with the high-risk regime from December 2027 for standalone Annex III systems and August 2028 for Annex I embedded products. For gateways serving regulated uses, reconstructible delegation supports the required evidence. OpenTelemetry tracing ties trace IDs, span IDs, and caller identity to each hop. Tamper-proof storage protects that record from alteration, because a log the agent can overwrite cannot serve as trustworthy audit evidence.
How to evaluate platforms that claim to implement both layers: what the design actually requires
For a team evaluating platforms, four requirements follow from these failures. The first is enforceable pre-issuance policy, including per-agent OAuth client registration, attestation or signed metadata, narrow scope, and task-bound expiry. Scope must not widen at runtime without a new issuance event. Inventory also has to cover shadow MCP usage. A platform cannot gate servers it does not know exist.
The second requirement is interception before execution, outside the prompt. It needs cryptographic workload attestation, scope validation with narrowing at each hop, and detection of behavioral deviation alongside known-bad signatures. Inspection must cover descriptions, calls, and results. Tool poisoning and rug pulls must be handled at runtime, while broad static grants must be dealt with at issuance. Confused deputy attacks cross both boundaries.
The third requirement is a connected audit trail. Delegation parentage must reach the human-principal anchor, with identity-linked OpenTelemetry tracing, tamper-proof logs, and delivery to SIEM. Separate records of approvals and tool calls are insufficient unless they can reconstruct the same authorization chain.
The fourth requirement is automated just-in-time credential renewal. Long-running agents need short-lived credentials without repeated manual re-authentication or quietly introduced persistent secrets. This is an operational test. A platform may describe issuance and runtime controls convincingly yet leave renewal unresolved. The evaluation has to establish how those controls remain effective across the agent’s full working life.
Platforms that implement the two-layer architecture: Runlayer and notable alternatives
Runlayer is an enterprise AI control plane in production at Notion, Gusto, and Instacart. Its pre-issuance layer combines OAuth client registration, scope assignment, and just-in-time credentials across access to 200+ MCP servers. Credentials are task-scoped and expire with the task. Within Runlayer’s approved catalog of connectors, skills, and agents, registration acts as an enforcement point, so credential access requires vetting.
At runtime, the platform detects tool poisoning, prompt injection, intent drift, and exfiltration in the request path. Policy is enforced at each tool call, outside the prompt. SSO, SCIM, and just-in-time credentials tie identity to what an agent does, so each per-call decision has a principal who can be held accountable.
For auditability, Runlayer provides tamper-proof logs and full OpenTelemetry tracing with identity attached to actions, supporting reconstruction to the human-principal anchor. Its control plane also discovers shadow MCP activity across servers, skills, and agents. These capabilities connect inventory with execution evidence.
On the fourth criterion, Runlayer’s just-in-time issuance and task-bound expiry address standing credentials. But the details provided leave open how renewal works in some cases for long-running agents. The same boundary applies to explicit per-call cryptographic attestation and SIEM delivery, which require separate evaluation against the requirements above.
The IBM and HashiCorp combination offers another route. Its central inventory records agent ownership and approved connections, while its token exchanges preserve on-behalf-of delegation and provide short-lived, task-scoped credentials. It fits enterprises already using that infrastructure. Unlike a single-platform approach, it requires integrating two products.
SPIFFE/SPIRE-based infrastructure belongs in a different category. It provides cryptographic workload identities that can appear as subject or actor in token exchange flows, grounding identity in the runtime environment. As an infrastructure primitive, it requires additional tooling for pre-issuance policy, runtime threat detection, and audit management.
The design decision: where each gate fires determines whether agentic credential flows are governable
The architectural boundary is time and authority. A design that only checks issuance cannot control what happens after approval, as Deadbugz showed. A runtime-only design inherits the scope and lifetime of credentials already created. Confused deputy defenses require both a clear agent identity before issuance and authorization validation on each request. Neither gate can substitute for the other’s decision.
Three design conclusions follow from that boundary. First, registration must prevent issuance until an agent has an explicit OAuth client record, a named owner, narrow scope, and task-bound expiry. Second, token exchange using RFC 8693 belongs at every trust boundary to exchange upstream tokens before forwarding them. Third, delegation parentage must be a first-class data structure explicitly recorded for investigators.
Separate builders, OAuth gateways, and security tools need a shared identity and authorization history, or their approval workflows and logs remain fragmented. The governed path should be the easy path. Credential flows become governable when issuance limits authority, runtime enforcement controls its use, and the audit record preserves who delegated it all the way through.