Independent analysis by NHI Mgmt GroupSource article: Twingate, “AI Gateways vs. Zero Trust: What's Missing” (July 23, 2026)

TL;DR: AI gateways log prompts, apply token controls, and filter model traffic, but they do not decide which internal APIs, vector stores, or admin tools an agent can reach, according to Twingate. The missing control is per-identity, per-resource authorization for agent actions after the model responds.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Twingate's blog post: AI gateways govern model conversations, but agent actions against internal resources still need zero trust access control.

Why it matters: IAM, IGA, and platform teams now need to treat AI agents as governed identities, not just model clients, because prompt controls do not limit post-response access.


Context

AI gateways are designed to mediate model traffic, not to govern the resources an agent reaches after inference. Once an agent can query databases, call internal APIs, or touch admin surfaces, the security problem shifts from prompt handling to access control, session audit, and revocation.

That gap matters because many current AI deployments still inherit flat network trust or shared service-account patterns. The governance question is no longer whether the model call is visible, but whether the downstream zero trust identity model can constrain agent action at resource level.


Key questions

Q: How do AI gateways differ from zero trust access control?

A: AI gateways govern model traffic, including prompt logging, token accounting, routing, and content filtering. Zero trust access control governs what an agent can reach after the model responds, such as internal APIs, databases, admin tools, and other private resources. The two layers solve different problems and are both needed when agents can act on their outputs.

Q: How should teams scope AI agents without over-granting access?

A: Teams should scope AI agents to the smallest resource set needed for the task and avoid reusing the human account’s full access token. The agent’s entitlement should reflect the job it will perform, not the full breadth of what the user could do manually across the tenant.

Q: How should security teams secure first-party AI agents that can reach internal systems and data?

A: Treat the agent like a privileged internal identity, not a chatbot. Restrict the tool registry to least privilege, require per-tool authorization, and allow only approved output destinations. Keep RAG sources limited to authenticated, authorized content, and monitor runtime context against action so model output cannot directly trigger high-risk changes across the enterprise.

Q: How does session audit work?

A: Session audit means recording and reviewing activity within a user or service session. It captures actions, changes and access patterns so suspicious behaviour can be traced back to a specific session. Defenders should correlate session events with identities and endpoints, watch for abnormal duration or privilege use, and retain records long enough to support investigations.


Technical breakdown

Why AI gateways stop at the model boundary

An AI gateway is a policy and observability layer for model requests and responses. It can log prompts, apply token budgets, filter content, route between providers, and sometimes redact sensitive text. What it does not do is authorize a follow-on call to an internal service, database, or admin tool. That boundary is critical: the gateway sees conversational traffic, while the agent's action path lives in your internal network and identity plane. See the AI Gateway and LLM Gateway Guide.

Practical implication: Treat gateway telemetry as necessary but incomplete, and design a separate authorization layer for anything the agent can touch after the model reply.

Non-human identity for agents and workloads

Agents need identities that are distinct from human users and distinct from shared service accounts. Without that separation, it becomes impossible to express least privilege, distinguish agent traffic from human traffic, or revoke one agent without disrupting others. The article's core point is identity granularity: an agent should be a first-class subject in access policy, not a credential hidden in environment variables or embedded in a VPC trust zone. Read Guide to SPIFFE and SPIRE.

Practical implication: Model each agent as its own non-human identity with scoped access, explicit ownership, and revocation that does not depend on rotating every surrounding credential.

Session-level audit across prompt and resource activity

Prompt logs alone cannot reconstruct what an agent actually did. To understand impact, teams need a chain that correlates the model conversation with the resource calls the agent made, when it made them, and under which identity. That is the difference between observing a request and tracing an action. For internal tools, SSH, and admin surfaces, the missing control is end-to-end session evidence, not just model observability. See the Shadow AI and AI Agent Discovery Guide.

Practical implication: Correlate model logs with access logs so investigators can reconstruct agent behaviour across both the conversation and the touched resource.


Threat narrative

Attacker objective: The attacker aims to turn a model-facing AI workflow into a path for unauthorized internal access and action across private resources.

  1. Entry occurs through a legitimate model interaction, where the agent receives a response that authorizes it to continue acting.
  2. Credential and access abuse follow when the agent uses shared tokens, embedded credentials, or flat network reach to call internal resources beyond the gateway's view.
  3. Escalation happens as the agent reaches databases, admin tools, or staging systems that were never scoped at the identity layer.
  4. Impact is the uncontrolled execution of downstream actions across internal systems, with incident response complicated by missing session-level attribution.
  • LiteLLM supply chain attack 2026: Stolen GitHub CLI OAuth tokens let an attacker push malicious LiteLLM 1.107.0 to PyPI and Docker, stealing cloud, AI tool and LLM keys.
  • Coupang Signing Key Breach: Unrevoked signing key credentials expose 33.7 million records after employee offboarding failure at Coupang.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

AI gateways do not solve the access problem created by agentic workflows. The gateway governs the model transaction, but the real governance question begins when the agent acts on the response. That means the field should stop treating prompt control as a substitute for identity and resource authorization. The practitioner conclusion is simple: model visibility is not access governance.

Agent identity must be explicit, not inferred from infrastructure. Shared service accounts, environment-variable tokens, and flat VPC reach all collapse the distinction between one agent and another. Once that happens, least privilege becomes a fiction because revocation, scoping, and attribution can no longer be applied cleanly. The programme implication is that agent identities need their own lifecycle and audit trail.

Zero trust for AI agents is a resource-control problem, not a model problem. The meaningful control point is the internal API, vector store, or admin surface that the agent touches after inference. Zero Trust for AI Agents is relevant here because the access model has to be evaluated at the action layer, where policy can still decide per request. Practitioners should align governance to the resource, not to the model endpoint.

Standing network reach is the real blast-radius multiplier in internal AI deployments. When an agent can move from prompt to action without reauthorization, any leaked token or compromised container becomes an internal network event rather than an isolated model issue. That is why the important governance metric is not how much the gateway can log, but how much downstream access is still assumed. The field should measure whether access still exists outside policy.

From our research library:

What this signals

Access reviews and model observability both fail when the controlled object is an agent that can move from prompt to action inside one session. Governance has to shift to issuance time and resource authorization, because the downstream action trail is where the real risk lives.

Downstream action governance: the control objective is no longer just to monitor model use, but to limit what an agent can touch after it answers. That means resource policy, revocation speed, and audit correlation become the practical measures of AI security maturity.

Zero trust programmes that already cover workloads can absorb AI agents faster than teams that start from the model layer alone. The most important change is organisational: platform, IAM, and security teams now have to govern the same identity across conversation, access, and response.


For practitioners

  • Inventory downstream agent calls Map every internal API, database, vector store, admin console, staging target, and third-party service each agent can reach. Without that inventory, policy cannot be scoped to actual resource use.
  • Assign each agent its own identity Replace shared service accounts and embedded env-var tokens with per-agent identities that can be scoped, audited, and revoked independently.
  • Move private resources behind policy checks Require explicit authorization for every agent-to-resource call so network position alone never grants access to internal services.
  • Correlate model and access logs Tie prompt-and-completion records to resource-access events using the same agent identity and session so investigations can reconstruct both conversation and action.
  • Test emergency revocation Run a game day where an agent's access to a specific resource is cut immediately and verify that containment does not depend on redeploying the workflow.

Key takeaways

  • AI gateways are useful control points, but they only govern model traffic and do not constrain the internal systems an agent can reach after inference.
  • The core governance gap is agent identity and downstream authorization, especially where shared credentials or flat network trust still exist.
  • Practitioners need resource-level policy, session-level audit, and fast revocation if they want to contain agent actions instead of merely observing them.

Related NHI Mgmt Group resources: Zero Trust Identity Guide · Guide to SPIFFE and SPIRE · Shadow AI and AI Agent Discovery Guide · AI Gateway and LLM Gateway Guide


Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST Zero Trust (SP 800-207) and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIAgent access patterns in the post hinge on excessive reach into internal systems.
NHI-04 — Insecure AuthenticationShared tokens and weak agent identity models undermine trustworthy access decisions.
NHI-07 — Long-Lived SecretsThe article warns about long-lived API tokens and stale credentials powering agent access.
Recommendation — Scope each agent to only the resources it needs and remove broad network reach. Use distinct agent identities and verify each access request before proxying it. Replace long-lived secrets with scoped, revocable credentials tied to agent identity.
NIST Zero Trust (SP 800-207)N/A — Least privilege access and continuous verificationThe article's zero trust layer is about verifying every agent-to-resource request.
Recommendation — Enforce continuous verification for every agent request to internal resources.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsAgent access must be governed by explicit permissions rather than flat trust.
Recommendation — Apply entitlements and authorization checks to each agent action on private resources.

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.
  • Zero Trust Access: Zero Trust Access is a way of granting access only after each request is verified, rather than trusting a user or device by default. In practice, it combines identity checks, device health, context, least privilege, and continuous policy enforcement to limit access to specific resources and sessions.
  • Non-Human Identity (NHI): A digital identity assigned to a non-human entity such as a software application, service account, API key, bot, machine, or AI agent that enables it to authenticate and interact with systems without direct human involvement. NHIs now outnumber human identities in most enterprises by 25 to 50 times.
  • Session-level auditing: Session-level auditing is the practice of recording activity for a single user or machine session from start to finish. It captures authentication events, commands, resource access, and changes within that session, giving investigators a precise timeline for accountability, anomaly detection, incident response, and compliance review across human and non-human identities.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle 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 November 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org