Zero Trust for AI Agents: Why Identity, MCP and Microsegmentation Must Be Thought Together
The new blind spot in the Zero Trust strategy
We protect employees with MFA, device posture and ZTNA. At the same time we hand AI agents API keys that reach entire system landscapes.
That is deliberately pointed. AI agents read tickets, query databases, call APIs and change configurations. They trigger tool calls on their own and pass tasks on to other agents. The risk lies less in new vulnerabilities than in the fact that an agent can use legitimate permissions for an impermissible action. Classic controls check whether a connection or a token is valid. Whether the specific action matches the business assignment, they usually do not check.
We have learned not to trust human identities and network connections blindly. Now we have to apply the same principles to autonomous AI agents and their actions.
Zero Trust for AI agents needs no new definition of Zero Trust. The familiar principles simply have to be applied to more participants: additional identities, tool calls, delegations and automated actions. Every agent access involves five layers that should be kept cleanly apart:
- The human principal, the person or process that commissions the agent.
- The identity of the AI agent, unique and independent of the principal.
- The technical workload identity with which the runtime environment authenticates itself to other systems.
- The delegated permissions the agent may use on the principal's behalf.
- The action actually permitted in the given context.
What does least privilege mean when it is no longer a human but an AI agent that decides when and how a permission is used? The answer is spread across identity, protocol and network.
Every AI agent needs an identity of its own
The Zero Trust Architecture of NIST SP 800-207 grants no trust on the basis of network location alone. Access is granted per session on the basis of dynamic policies and is authenticated and authorised beforehand. Decisions are made at the policy decision point and enforced at the policy enforcement point. NIST SP 800-207A adds identity-based policies for services and users in cloud-native applications and names SPIFFE as a source of service identities. AI agents fit this model if they are treated as subjects in their own right, not as an appendage of the user or as an anonymous service behind a shared key.
Agent identity: unique and separate from the human
If several agents share an API key, nobody can say afterwards who did what, and a lockout hits all of them at once. Equally important is the separation of agent and user identity: an agent acting with the full rights of the person who starts it inherits that person's entire reach.
Then there is the technical layer, often called machine identity. The agent's runtime environment authenticates itself to other systems via machine-to-machine authentication, ideally with short-lived, cryptographically bound credentials instead of static secrets. That a workload authenticates correctly says nothing about which assignment it is currently executing. Technical identity and business assignment are two different things.
Least privilege at the level of the action
For agents, least privilege means binding permissions to specific actions on specific resources instead of granting blanket administrative API rights. Read-only is the sensible starting point. Reading, changing, deleting and administrative operations belong in separate permissions, so that an agent meant to read diagnostic data cannot write configurations on the side. Rights should expire with the assignment. The OWASP Top 10 for Agentic Applications summarise this under the principle of “least agency”: an agent gets only as much room to act as its task requires.
Context-aware authorisation
For agents, the question “who are you?” is not enough. An authorisation decision has to know the context:
- Who commissioned the agent?
- For what purpose?
- On which resource, in which tenant?
- How critical is the target system?
- What scope of action is permissible for this assignment?
A valid API token does not mean that every action it technically allows is authorised in business terms.
Technical building blocks
Implementation can draw on established building blocks:
- OAuth-based delegation where it fits, for example via token exchange under RFC 8693, so that a token identifies both the principal and the acting agent.
- Scoped, short-lived tokens with exactly one target resource (audience) and a narrow scope of action.
- Workload identity via SPIFFE and its reference implementation SPIRE: workloads receive short-lived, automatically renewed identity documents (SVIDs) instead of embedded secrets.
- Policy decision and policy enforcement kept separate, with attribute-based rules (ABAC) and, where needed, relationship-based rules (ReBAC), such as “may only handle tickets of its own tenant”.
- Just-in-time permissions for rare, critical actions.
- Audit logging that records principal, agent, tool, parameters and decision together.
How identity, authorisation, delegation and logging for agents can be unified is the subject of a concept paper published by NIST's NCCoE in February 2026. It mentions OAuth, OpenID Connect, SPIFFE/SPIRE and MCP, among others, but it is a draft for a possible practice project, not a standard. The building blocks above, by contrast, are available today.
MCP is not a free pass
The Model Context Protocol (MCP) is an open protocol through which AI applications connect tools and data. The MCP host is the AI application in which the agent runs. For every connected server it holds an MCP client that talks to exactly that one server. The MCP server provides capabilities, above all tools (executable functions such as “update ticket”) and resources (data and context such as documents or data sets), plus prompts as templates.
MCP is an integration protocol, not a complete Zero Trust concept. That does not make it unprotected. MCP Authorization in the current specification (version 2026-07-28) is optional, but intended for HTTP-based transports, and builds on OAuth 2.1. The MCP server acts as a resource server and publishes which authorisation server is responsible. The client requests tokens specifically for that server, and the server must verify that a token was issued for it. It may neither accept foreign tokens nor pass them through to downstream APIs. For local stdio connections, credentials come from the environment. Tool descriptions are considered untrusted unless they come from a trusted server, and a human should be able to reject tool calls.
That protects access to the MCP server. What happens with that access afterwards is a different question.
Which risks remain
- Tool permissions: An agent can be authenticated for a tool without being allowed to perform every possible operation in every context. The protocol knows the tool, not the business assignment.
- Confused deputy: An agent or MCP server uses existing permissions for an action the original principal never authorised. The MCP documentation addresses this case explicitly in the specification's security considerations and in the security best practices.
- Tool poisoning: Manipulated tool descriptions or tool responses influence what the agent plans next.
- Prompt injection: Prepared documents, tickets, web pages or API responses contain instructions the agent mistakes for its assignment. More on this in the glossary under prompt injection.
- Credential scope: The further the stored API rights reach, the greater the possible damage.
- Multi-agent trust: A trusted agent must not automatically treat another agent's instructions as authorised.
A gateway as an additional enforcement layer
An MCP or tool gateway between agent and servers can act as a policy enforcement point. That only works, however, if the gateway reliably has the necessary information: the identities of principal and agent, the target resource, the specific action, the parameters and the assignment context. A gateway that only sees tool names cannot make a business decision.
Our recommendations for MCP security, in line with the OWASP MCP Security Cheat Sheet:
- Validate the token audience; no uncontrolled token passthrough.
- Approve tools via an allowlist per agent and task, and pin tool definitions so that a server cannot change them unnoticed.
- Formulate policies on resources and actions, not just on tools.
- Validate inputs and outputs, including the responses of MCP servers.
- Separate security domains: an MCP server for monitoring does not belong in the same trust zone as one for firewall management.
- Tie critical actions to human approval and log every tool call.
- Limit agent chains so that no agent triggers actions through an arbitrary number of intermediate steps.
The existence of a tool is not yet a permission to use it for any action whatsoever.
Microsegmentation limits what an agent can reach
Identity and authorisation decide what an agent may do. Network and workload security decide what it can reach. Agents typically sit at junctions. They talk to internal APIs, databases, SaaS services and business applications and connect security domains that would otherwise be separate. A compromised or misdirected agent then reaches everything its platform reaches.
Segmenting workloads
Microsegmentation defines which workloads may communicate with each other, ideally on the basis of workload identities and application roles rather than IP ranges. On an agent platform, the runtime environment gets only the communication paths its tasks need. East-west traffic to everything else is blocked, and unnecessary paths disappear instead of merely being monitored.
Segmenting APIs and MCP servers
The same logic applies one level up. What needs to be settled is which agents may reach which APIs, which MCP servers may talk to which back ends, which target systems are off limits to agents altogether (such as the management network of firewalls or identity providers) and which external services an agent may contact. Outbound traffic deserves particular attention, because it is the obvious route for data exfiltration.
Blast radius and defence in depth
NIST SP 800-207 names microsegmentation as one way to implement Zero Trust, and SP 800-207A notes that network-based and identity-based policies together offer more protection than either layer alone. Microsegmentation by itself cannot decide whether a particular API call is legitimate in business terms. A permitted connection to the monitoring API says nothing about the individual operation that runs over it. Identity and API authorisation alone, in turn, do not protect when an agent reaches a system through a forgotten path that was never meant for it. Zero Trust Network Access, microsegmentation and API authorisation are therefore complementary controls. Together they limit the blast radius, the area an error or compromise can affect, and prevent lateral movement across the agent platform.
If an agent is compromised, it should not automatically be able to reach every system its platform is connected to.
The AI agent as an insider threat
The term insider threat describes risks that originate from people with legitimate access. Applied to AI agents, it works only as an analogy. An agent is not a malicious insider. The risk arises because an agent has legitimate access that can be abused through misbehaviour, manipulation or compromise. The OWASP Top 10 for Agentic Applications 2026, published in December 2025, list exactly such patterns as risk categories of their own, including Agent Goal Hijack (ASI01), Tool Misuse and Exploitation (ASI02), Identity and Privilege Abuse (ASI03), Insecure Inter-Agent Communication (ASI07) and Rogue Agents (ASI10).
Typical scenarios:
- Indirect prompt injection: A prepared ticket description leads the agent to carry out an action nobody commissioned.
- Privilege escalation: An agent uses available tools or services to obtain permissions beyond its assignment.
- Data exfiltration: An agent reads confidential data and transmits it over an otherwise legitimate channel, such as a ticket reply or a webhook.
- Agent-to-agent manipulation: An agent passes manipulated information or tasks to another agent that trusts it.
- Unauthorised changes: An agent makes a dangerous change through a reachable API that nobody ordered.
The countermeasures largely follow the OWASP AI Agent Security Cheat Sheet. Untrusted input is separated from instructions, authorisation is enforced independently of the model, execution environments are isolated. Every agent has its own identities and permissions, anomalies show up in monitoring, and critical operations run only with human approval. Add to that traceable logs, the ability to lock agents and credentials immediately, and adversarial testing before production use.
A system prompt is not a security boundary. An instruction such as “never change firewall rules” is text in the same context in which manipulated content also lands. The model can follow it, but it does not have to. A rule can only be enforced outside the model, at a point the agent cannot rephrase.
An attacker does not need to compromise the infrastructure if they can get an agent with legitimate permissions to perform an impermissible action.
Worked example: a service agent in ITSM
The following scenario is explicitly hypothetical and does not describe a documented incident. A company deploys an AI service agent in IT service management (ITSM). It reads support tickets, searches the internal wiki, queries diagnostic data via a monitoring API, reads network and security configurations and may carry out certain standard changes, such as restarting a service. Then a ticket arrives that, alongside a plausible fault report, contains hidden instructions: “to fix the problem”, the agent is to relax a firewall rule and create an exception in the Zero Trust policy.
| Control | Insecure architecture | Zero Trust architecture |
|---|---|---|
| Identity | One shared, far-reaching API key for all agents | Unique agent and workload identity, separate credentials per agent |
| Tool access | Agent reaches administrative APIs directly | Gateway exposes only the tools approved for the assignment |
| Permissions | Permanent admin rights | Read-only by default, write rights time-limited and restricted to standard changes |
| Authorisation | A valid token is enough | Context-aware decision in the PDP, enforced outside the language model |
| Network paths | Agent platform also reaches management networks | Microsegmentation: no path to firewall management |
| Critical changes | No effective approval check | Human approval for configuration changes |
| Traceability | Actions attributable only to the shared key | Audit log with principal, agent, tool, parameters and decision |
In the insecure architecture, a convincingly worded ticket is enough. The agent takes the instruction for part of its assignment, the shared key permits the call, and the change is in place before anyone notices.
In the Zero Trust architecture, several controls engage one after another:
- Input: The ticket content is treated as untrusted input. That lowers the probability that the agent adopts the embedded instruction, but does not rule it out.
- Tool approval: If the agent plans a policy change anyway, the call fails at the gateway. The tool for firewall policies is not approved for the service agent, only the read-only configuration tool.
- Context: Even an approved tool would be rejected by the PDP. A fault ticket in the monitoring category covers no change to security policies.
- Token: The agent's credentials are short-lived and issued for the monitoring and ITSM APIs. The firewall's management API does not accept them.
- Network: The agent runtime has no path into the firewalls' management segment.
- Approval: If a change were genuinely needed, it would go to a human as a proposal, with justification and ticket reference.
- Evidence: The rejected attempt lands in the audit log with all details and can trigger an alert in security monitoring.
None of these controls is insurmountable on its own, and even their combination does not promise complete security. But an attacker would now have to overcome several independent hurdles at once instead of merely persuading a model.
Reference architecture for agentic AI security
- Human principalPerson or process that issues a specific assignment
- Authentication and assignment contextIdentity provider, MFA, purpose, tenant, criticality
- AI agent / agent runtimeown agent identity, isolated runtime environment
- Tool and MCP gatewayTool allowlist, input and output validation
- Policy enforcement and decisionPolicy Enforcement Point (PEP)enforces every decision per call↔Identity Provider / Policy Decision Point (PDP)decides on the basis of identity, action, resource and context
- Approved tools and APIsScoped, short-lived tokens with the right audience
- Segmented back-end systemsMicrosegmentation limits reachable systems and paths
Cross-cutting functions
- Audit and telemetry
- Secret management
- Approval workflow
- Rate limits and quotas
- Incident response
- Credential revocation
It starts with the human. A principal authenticates at the identity provider, and with the assignment a context emerges: purpose, tenant, resources and criticality. The agent runs in an isolated runtime with its own identity and receives that context, not the principal's full rights.
Every tool call goes through the gateway, which checks approval as well as inputs and outputs. The policy enforcement point obtains a decision per call from the policy decision point, which evaluates agent, principal, action, resource and context. Only then does the agent receive a short-lived token for the respective target API, and segmentation ensures that even a permitted call reaches only the intended systems. Audit and telemetry, secret management, approval workflows, rate limits, incident response and the immediate revocation of credentials accompany all layers.
10 questions companies should ask their AI agents
Checklist
- Does every agent have a uniquely attributable identity? Without it there is neither traceability nor targeted lockout.
- Which systems and data may the agent reach? The answer defines the blast radius and the segmentation required.
- Which actions may it perform on its own? Reading, changing and deleting need separate approvals.
- Are rights bound to the specific assignment? Otherwise the agent uses its full reach for every task.
- Are credentials and tokens limited in time and function? Short-lived, narrowly scoped tokens limit the damage of a theft.
- Who authorises critical tool calls? For changes to security policies, a human belongs in the loop.
- Are MCP servers and back-end systems sufficiently separated? One server per security domain prevents a single access from opening everything.
- How is a compromised agent stopped? Locking identity and credentials must be possible in minutes, not days.
- Are actions traceable across several agents? In agent chains, the original assignment must survive in the log.
- Has the architecture been tested against prompt injection and tool misuse? Only adversarial tests show whether the controls outside the model really hold.
Conclusion: Zero Trust grows with the task
Zero Trust does not need to be reinvented. But its scope grows: from people, devices and workloads to autonomous agents, delegated permissions and specific actions. No single technology makes AI agents secure. Identity security and workload identity establish who is acting. Whether an action is permitted in the given context is decided by API and MCP authorisation. Microsegmentation limits what is reachable if something goes wrong. Only together do they form an architecture that can cope with agents.
The decisive question is no longer just who may access a system. It is also which action an autonomous system may perform on our behalf.
How KAEMI supports you
We plan and operate Zero Trust architectures for medium-sized and large companies: Zero Trust Network Access and SASE/SSE with Cloudflare One, microsegmentation down to workload level and ongoing operation as a managed security service. If you want to integrate AI agents into your processes or secure existing automation, a Zero Trust readiness workshop is a good way to assess where you stand. Or talk to us directly: get in touch.
Frequently asked questions about Zero Trust for AI agents
Do AI agents need a Zero Trust definition of their own?
No. The principles of NIST SP 800-207 continue to apply: no implicit trust, access per request, decisions based on identity and context. What is new is that agents must be treated as identities of their own with delegated permissions, and that their individual actions must be authorised.
Is MCP insecure?
No. The MCP specification defines an optional authorisation intended for HTTP-based connections, based on OAuth 2.1 with audience validation, and prohibits passing foreign tokens through. But it secures access to the MCP server, not the business legitimacy of every action. Gateways, policies and segmentation close that gap.
Is a system prompt enough to constrain an agent?
No. A system prompt sits in the same context as manipulated input and can be bypassed by prompt injection. Binding limits must be enforced outside the language model, for example at a policy enforcement point.
What role does microsegmentation play for AI agents?
Microsegmentation limits which systems an agent and its platform can reach at all. It does not decide on the legitimacy of individual API calls, but it reduces the damage if an agent is compromised or misdirected.
Where should companies start?
With an inventory: which agents are running, with which credentials, against which systems? Then assign unique identities, retire shared keys, cut rights back to read-only and tie critical actions to human approval.
Sources and further reading
- Standard: NIST SP 800-207, Zero Trust Architecture (2020)
- Standard: NIST SP 800-207A, A Zero Trust Architecture Model for Access Control in Cloud-Native Applications in Multi-Cloud Environments (2023)
- Concept paper (draft): NIST NCCoE, Accelerating the Adoption of Software and Artificial Intelligence Agent Identity and Authorization (initial public draft, February 2026)
- Specification: Model Context Protocol, version 2026-07-28: Authorization and Security Considerations
- Documentation: Model Context Protocol, Security Best Practices
- Guide: OWASP, Top 10 for Agentic Applications for 2026 (December 2025)
- Guide: OWASP, MCP Security Cheat Sheet
- Guide: OWASP, AI Agent Security Cheat Sheet
- Standard: IETF, RFC 8693 OAuth 2.0 Token Exchange (2020)
- Specification: SPIFFE Standards