By NHI Mgmt Group Editorial TeamBased on Cerbos: “How to secure AI agents and MCP tools at the gateway with LiteLLM and Cerbos” (June 9, 2026)

TL;DR: AI gateways increasingly centralize model access, tool exposure, and spend control, but Cerbos argues that static scopes cannot answer whether a specific principal should use a specific model or MCP tool with specific inputs, according to Cerbos. Policy-driven, request-time authorization becomes the missing control when agent traffic concentrates in one proxy.


At a glance

What this is: This is an analysis of why AI gateways can authenticate and route AI agent traffic without answering the real authorization question: whether a given principal should be allowed to use a specific model or MCP tool with specific inputs.

Why it matters: It matters because IAM, PAM and NHI programmes cannot treat gateway authentication or API key scopes as sufficient when agents can reach models and tools through the same choke point.


Context

AI gateway authorization is the missing control when AI agents and MCP tools share one proxy. LiteLLM-style gateways can centralise routing, authentication and spend control, but that centralisation does not decide whether a principal should be allowed to perform a specific action at request time.

For IAM and NHI teams, the governance issue is not only who can reach the gateway. It is whether the gateway can make context-aware decisions about model choice, tool visibility and tool arguments before the request reaches the model or downstream tool server.


Key questions

Q: What breaks when AI gateways rely on static scopes for agent access?

A: Static scopes can tell you who may reach the gateway, but they cannot answer whether a principal should be allowed to use a specific model or tool with a specific payload. That leaves the most important AI agent authorization decision unresolved at request time, especially when the same proxy fronts many models and MCP tools.

Q: Why do AI agents need request-time authorization for MCP tools?

A: Because the risk is in the invocation context, not just the caller's identity. A model can only act on tools it can see, and the actual arguments may make a permitted action unsafe or out of scope. Request-time policy lets the system judge the caller, the tool and the input together before execution.

Q: How do you know whether gateway authorization policies are actually working?

A: You know they are working when policy tests cover both allowed and denied scenarios, decision logs are captured, and changes can be released without breaking expected access. A healthy setup produces repeatable results for anonymous, authenticated, and privileged users. If those cases are not tested, the policy layer is effectively ungoverned.

Q: Should authorization live inside the AI gateway or in external policy?

A: External policy is the safer default when the same proxy handles models, tools and future agent protocols. Gateway config tends to be coarse and brittle, while separate policy can be reviewed, versioned and reused across enforcement points. That gives teams a stable governance layer even as the traffic path changes.


Technical breakdown

Why gateway authentication is not enough for AI agent authorization

An AI gateway can confirm identity, apply API key scopes and route traffic, but those controls operate before the real decision point. In this pattern, the gateway is a transport and policy concentration layer, not the source of fine-grained authorization. Static scopes can say a caller may use a model family or reach a tool server, but they cannot evaluate the live context of the request. That matters because agent prompts, tool names and invocation parameters change the risk of each call. Request-time authorization externalises the decision so policy can inspect the principal, the action and the arguments together.

Practical implication: Treat gateway authentication as a prerequisite, not the authorization decision itself.

Argument-aware MCP authorization at the proxy edge

MCP tools create a higher-risk layer because the model can only act on what it can see. If a tool is exposed to the model, the model can attempt to use it, so the authorization decision has to happen before tool disclosure or invocation. Argument-aware authorization goes further by checking the actual parameters sent with the call. That allows policy to bind a refund, ticket update or similar action to the caller's assigned scope, rather than to a broad role alone. In practice, this moves control from generic access to contextual decision-making at request time.

Practical implication: Evaluate tools against caller attributes and invocation arguments before the model sees them.

Why policy outside the gateway is easier to govern

When authorization logic lives in gateway configuration, the rules are tied to one enforcement point and tend to fragment as the proxy evolves. Externalised policy separates the decision from enforcement, so the same rule set can be reviewed, versioned and audited independently of the proxy implementation. That matters for AI stacks because proxies will change, new agent protocols will emerge, and the organization should not have to rewrite authorization logic every time the traffic path changes. Policy-as-code also improves consistency across model calls, tool calls and future agent entry points.

Practical implication: Keep authorization policy outside proxy config so controls survive gateway and protocol changes.


  • LiteLLM MCP auth bypass 2026: An exploited LiteLLM MCP auth bypass and default sk-1234 master keys let attackers steal AI gateway master and provider API keys.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

AI gateway concentration creates an authorization bottleneck, not a complete control plane. When one proxy becomes the front door for models and MCP tools, it concentrates risk and governance responsibility in the same place. That concentration is useful for visibility, but it does not solve whether a principal should be permitted to act in context. Practitioners should treat the gateway as an enforcement point that still needs policy intelligence.

Static scopes were designed for coarse access, not contextual agent decisions. API keys and role checks can answer whether a caller may reach a service, but they were not designed to decide whether an agent may invoke a specific tool with a specific payload. That assumption fails when the request itself contains the evidence needed for the decision. The implication is that AI agent governance has to move from pre-authorized reachability to request-time decisioning.

Argument-level authorization is the real governance boundary for tool-using agents. Once an MCP tool is visible to the model, the model may attempt to use it, so the boundary shifts from the tool server to the invocation context. That is where caller identity, assigned task, and parameter values intersect. Security teams should treat this as a policy design problem, not a gateway tuning problem.

One policy vocabulary across models and tools is becoming the governance baseline. The operational benefit is not just easier enforcement, but consistent review across model selection, tool exposure and tool invocation. That consistency matters because agent stacks are already crossing between chat completions, tool calls and future protocols. Practitioners should expect the control plane to become more policy-centric and less proxy-centric.

Named concept: gateway authorization gap. This is the mismatch between authenticating traffic at an AI proxy and authorizing the underlying action with full request context. The article shows why that gap appears as soon as models can see tools and act on arguments. The practitioner conclusion is that proxy consolidation without request-time policy leaves AI agent controls incomplete.

From our research library:

What this signals

Gateway authorization will become a control point for agent sprawl. As model traffic, tool access and enforcement converge in one proxy, practitioners should assume the authorization layer will need to carry more of the governance load. That makes policy design, not proxy branding, the deciding factor in whether AI gateways are defensible for production use.

Argument-aware policy is the more durable pattern for AI agents. The next governance step is not just denying broad classes of access, but binding individual actions to the caller, the request and the task context. That is the only way to keep tool exposure and model access aligned when agents start operating across more workflows.


For practitioners

  • Define request-time authorization for gateway traffic Map which decisions must move out of static config and into policy, especially model selection, tool exposure and tool invocation with live request context.
  • Bind tool use to caller and arguments Require policies that evaluate the caller's identity, assigned scope and invocation parameters before an MCP tool is disclosed or executed.
  • Separate enforcement from policy logic Keep the decision rules in versioned policy so gateway configuration changes do not rewrite the authorization model for every new proxy or protocol.
  • Log denied model and tool decisions Retain evidence of which principal was denied, which tool or model was blocked, and which request attributes drove the decision so reviews can trace the outcome.

Key takeaways

  • AI gateways can centralise model and tool traffic without solving the underlying authorization question for AI agents.
  • Static scopes and gateway authentication are too coarse to govern request-time decisions that depend on caller, tool and payload context.
  • The control boundary is moving toward externalised policy that can be reviewed, versioned and enforced before a model sees a tool.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI02 — Tool MisuseThe article is about controlling which tools an AI agent can see and invoke through a gateway.
ASI03 — Identity & Privilege AbuseThe core issue is that static gateway scopes cannot govern agent privilege with request context.
Recommendation — Enforce tool-use policy at request time so agents cannot reach tools outside approved context. Bind agent privileges to live policy checks rather than coarse gateway scopes.
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe gateway authenticates callers, but the article shows authentication alone does not deliver authorization.
NHI-05 — Overprivileged NHIThe article warns that broad model and tool scopes can give agents more access than they need.
Recommendation — Separate authentication from authorization and evaluate the action before any tool or model exposure. Reduce agent privilege to the narrowest model and tool set that policy can justify.
NIST AI RMFGOVERN — AI Governance and AccountabilityThe topic is AI governance of model and tool access decisions, not just proxy routing.
Recommendation — Establish governance for request-time authorization decisions across AI gateways and agent tools.

Key terms

  • AI Gateway: A control point that sits between AI applications and the models, tools, or data they call. In practice, it can authenticate requests, enforce policy, inspect runtime behaviour, and stop unsafe actions before they spread into connected systems.
  • Request-time Authorisation: Request-time authorisation is the practice of checking policy at the moment an action is attempted rather than only at login or provisioning. For AI agents, this matters because identity context and tool choice can change during a session, so earlier decisions may no longer be valid.
  • MCP tool invocation: MCP tool invocation is the act of an agent or application calling a tool exposed through the Model Context Protocol. The security issue is not just whether the caller can reach the tool, but whether the caller should be allowed to use that tool with the specific arguments it submits.
  • Argument-Aware Policy: Argument-aware policy evaluates the actual parameters in a request, not just the caller's role or endpoint. In AI agent governance, it is the difference between broad permission to refund and permission to refund only the right ticket, amount or workflow context.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 12, 2026.
Updated on October 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org