Machine Learning pathway increased my salary by 40%
Zero Trust Architecture for AI Systems
Apply zero trust principles to AI: verify every principal, scope every action, assume every prompt is hostile, and enforce policy outside the model where an attacker cannot argue with it.
Executive Summary
Zero trust replaced the perimeter with a policy decision point, and AI systems make the argument for it more strongly than any previous technology. An AI application is a chain of principals: the user, the application, the agent, the model provider and each tool. It receives untrusted natural language from users and from every document it reads. It takes actions with real consequences. Under those conditions, "inside the network" is not a trust signal, and neither is "the prompt told it to". This topic translates zero trust into concrete AI architecture: workload and agent identity, on-behalf-of delegation, per-action policy evaluation, micro-segmentation of retrieval and tool planes, continuous verification of session integrity, and the evidence trail that proves the policy was enforced. It closes with the migration pattern that works in practice, which is to start at the action boundary rather than attempting a rewrite of the whole estate.
Definition
Zero trust architecture for AI is a design approach in which no user, workload, agent, model or tool is trusted by virtue of its location or its role in the request chain. Every access to data or capability is authorised per request by a policy decision point, using the identity of the human on whose behalf the action occurs, the sensitivity of the resource and the context of the session, and every decision is logged as evidence.
Why It Matters
AI systems concentrate privilege. A single assistant may reach a document store, a CRM, a ticketing system and an email account, and it may do so with one service credential that every user shares. When an injected instruction succeeds, the blast radius is the union of those permissions. Zero trust addresses this directly: it makes the human identity travel with the request, reduces each hop to the minimum capability required, and puts the enforcement point where an attacker cannot negotiate with it. It also satisfies a practical need. Enterprise buyers now ask whether an AI feature is zero-trust aligned, and regulators ask for evidence that access decisions were made deliberately. A zero trust design answers both with architecture rather than assurances.
Evolution of the Technology
Perimeter security → defence in depth → identity-centric security → zero trust architecture (NIST SP 800-207) → zero trust for cloud workloads and service mesh → zero trust for non-human identities → zero trust for AI agents and tool use (2025-2026) → continuous, risk-adaptive policy for autonomous action.
Learning Objectives
- Explain why perimeter and prompt-based trust both fail for AI systems
- Design agent and workload identity with short-lived, audience-bound credentials
- Implement on-behalf-of delegation so every action is attributable to a human
- Place policy decision and enforcement points around retrieval, tools and model access
- Micro-segment the data plane so retrieval cannot cross tenant or classification boundaries
- Define continuous verification signals for AI sessions and act on them
- Build the evidence trail required to prove policy enforcement
- Migrate an existing assistant to zero trust without a full rewrite
Prerequisites
- Working knowledge of OAuth 2.0, OIDC and token scopes
- Familiarity with IAM policy models such as RBAC and ABAC
- Understanding of how an AI assistant assembles context and calls tools
- Basic grasp of network segmentation and service mesh concepts
Three Trust Assumptions That Must Die
Three assumptions cause most AI access-control failures. First, that the service account is the principal: it is not, because a shared credential cannot distinguish one user from another and destroys attribution. Second, that the prompt is a control: it is advice to a probabilistic system, and any content the model reads can override it. Third, that a network location confers trust: an assistant running inside the virtual private cloud is exactly as reachable by an injected instruction as one outside it. Zero trust replaces all three with one rule: authorise each request using verified identity, evaluated by a policy decision point that the model cannot influence.
Assumption to Replacement
| Broken assumption | Why it fails | Zero trust replacement |
|---|---|---|
| Service account is the principal | No attribution, no per-user scope | On-behalf-of token carrying user and agent identity |
| The prompt enforces policy | Instructions and data share a channel | Policy decision point outside the model |
| Internal network means trusted | Injection reaches tools regardless of location | Per-request authorisation with resource sensitivity |
| Session trust persists | Payload can persist in memory across turns | Continuous verification and short session bounds |
Agent Identity and On-Behalf-Of Delegation
An agent needs its own identity so that its behaviour can be constrained and audited, but it must never act with more authority than the human it serves. The pattern is a token exchange: the user authenticates, the gateway issues a short-lived token whose subject is the user and whose actor is the agent, and each tool verifies both before acting. Scopes are the intersection of what the agent is designed to do and what the user is entitled to do. Where a tool must act asynchronously, the token carries an audience restriction so it cannot be replayed against another service.
Identity Requirements by Hop
| Hop | Identity carried | Verification |
|---|---|---|
| User to gateway | Human principal with MFA context | OIDC with session assurance |
| Gateway to orchestrator | User subject plus agent actor | Signed token exchange |
| Orchestrator to retrieval | User subject, tenant, classification clearance | Mandatory filter inside query |
| Orchestrator to tool | User subject, agent actor, tool audience | Audience and scope check at the tool |
| Tool to downstream API | Narrowly scoped service token with correlation id | Short expiry, no standing credential |
Policy Decision and Enforcement Points
Split policy into a decision point and an enforcement point. The decision point evaluates whether this principal may perform this action on this resource in this context. The enforcement point is the component that actually blocks or allows: the retrieval query builder, the tool runtime, the gateway. Keeping the two separate lets you change policy without redeploying tools, and lets you log every decision in one place. For AI, the enforcement points that matter most are retrieval, tool invocation and egress. If any of those three is missing, the architecture is not zero trust regardless of what the identity provider supports.
Enforcement Points and Their Failure Modes
| Enforcement point | Blocks | Typical failure |
|---|---|---|
| Retrieval query builder | Cross-tenant and cross-classification passages | Filters applied after search |
| Tool runtime | Unapproved action, wrong audience, excess scope | Policy checked in the prompt instead |
| Egress proxy | Data leaving to an unapproved destination | Allowlist maintained by exception |
| Model gateway | Unapproved provider, region or model version | Teams calling the provider directly |
| Approval service | Irreversible action without human confirmation | Confirmation collected in the chat UI only |
Threat Landscape
Zero trust for AI is attacked at the seams rather than at the front door. The seams are token exchange, where a confused deputy can be persuaded to mint a token with the wrong subject; retrieval, where a filter can be omitted on one code path; and the approval service, where a human gate can be satisfied by a convincing but inaccurate description of the action. A second class of attack targets policy itself. If the policy decision point trusts an attribute that an attacker can set, such as a tenant identifier supplied in a request body, the whole model collapses. Attributes must come from the identity provider or an authoritative store, never from the request payload. A third class exploits session persistence. Long-lived memory or cached context can carry authority across turns and users. Zero trust for AI therefore treats session state as a resource requiring its own authorisation, not as ambient context.
Attack Surface
The AI-specific zero trust surface comprises: token minting and exchange endpoints, policy bundles and their distribution, retrieval connectors and query builders, tool registries and their scope definitions, egress allowlists, approval interfaces, session and memory stores, and the audit pipeline itself. Each requires its own authorisation model and its own test. The most neglected is the audit pipeline, because an attacker who can suppress or alter decision logs defeats the evidence that the architecture exists.
Security Controls
Zero trust controls are enforced, not requested. Each control below has an enforcement point, a policy source and a log that proves it operated. Where a control cannot be enforced, the capability it protects should be removed rather than left to the prompt.
Control Set
| Control | Enforces | Standard |
|---|---|---|
| On-behalf-of token exchange | Attribution and per-user scope | NIST SP 800-207 section 3 |
| Short-lived audience-bound tokens | Prevents replay and lateral use | OAuth 2.0 Token Exchange |
| Policy decision point with authoritative attributes | Prevents attribute injection | NIST SP 800-207 section 2 |
| Retrieval filter inside the query | Tenant and classification isolation | OWASP LLM06 |
| Tool scope registry with owners | Least agency | OWASP LLM08 |
| Egress allowlist enforced at proxy | Prevents exfiltration | ISO/IEC 27001 A.8.20 |
| Immutable decision log | Proves enforcement after the fact | EU AI Act Art.12 |
Security Architecture
A zero trust AI architecture separates control, data, action and evidence planes and places an enforcement point at every boundary between them.
Reference Architectures
Authorisation Path for a Tool-Calling Turn
Every step below is an enforcement or evidence point.
Migrating an Existing Assistant to Zero Trust
Do not attempt an estate-wide rewrite. Sequence the migration so each step reduces blast radius immediately and produces evidence that funds the next step.
Migration Sequence
| Phase | Change | Blast radius reduced |
|---|---|---|
| 1 | Route all model calls through a gateway with identity and logging | Visibility and a kill switch |
| 2 | Move retrieval authorisation into the query | Cross-tenant disclosure |
| 3 | Replace the shared tool credential with per-user delegation | Attribution and excess agency |
| 4 | Introduce approval gates on irreversible actions | Destructive outcomes |
| 5 | Add continuous verification and risk-adaptive step-up | Session misuse and drift |
Continuous Verification Signals for AI Sessions
Zero trust is not a one-time check at login. Define signals that cause a session to be re-evaluated, and make the response proportional.
Signals and Responses
| Signal | Meaning | Response |
|---|---|---|
| Retrieval denials spike | Possible probing or misconfiguration | Rate limit and alert with sample queries |
| Tool scope requests widen | Agent or attacker attempting escalation | Deny and require re-authorisation |
| Approval description mismatch | Understated action description | Block action and notify approver |
| Session geography or device change | Possible token theft | Step-up authentication |
| Memory write outside principal | Boundary violation | Reject write and quarantine session |
Frameworks & Standards
Use NIST SP 800-207 for architecture, OAuth token exchange for delegation mechanics and ISO 42001 for the management system that keeps policy current.
Framework Mapping
| Framework | Contribution | Limitation |
|---|---|---|
| NIST SP 800-207 | Canonical zero trust architecture and deployment models | Pre-dates agentic tool use |
| OAuth 2.0 Token Exchange (RFC 8693) | On-behalf-of delegation mechanics | Requires disciplined audience design |
| OWASP LLM Top 10 | Risk classes for excessive agency and disclosure | Application focus |
| ISO/IEC 42001 | Policy lifecycle and management review | Not prescriptive on architecture |
| NIST AI RMF | Risk framing for leadership decisions | Descriptive rather than technical |
Regulatory Landscape
Supervisory expectations in banking and insurance increasingly require demonstrable least privilege for AI systems, particularly where the assistant can influence customer records or payments. Data protection law requires purpose limitation, which in practice means retrieval must not cross purpose boundaries even inside one organisation. Cross-border rules in India and the EU constrain where model calls may be routed, making region enforcement a policy requirement rather than an optimisation.
Tools & Technologies
| Tool | Purpose | Note |
|---|---|---|
| Identity provider with token exchange | User and agent identity, delegation | Confirm actor claim support before designing around it |
| Open Policy Agent or Cedar | Externalised policy decision point | Keep bundles versioned and reviewed |
| Service mesh with mTLS | Workload identity and segmentation | Does not solve tool-level authorisation |
| Vector store with native filtering | Query-time entitlement enforcement | Post-filtering is not isolation |
| Secrets broker | Removes credentials from the model path | Inject at execution, never in prompts |
| Append-only log store | Decision evidence with integrity | Protect against deletion by the workload |
Prompt-Level Control versus Policy Enforcement
| Aspect | Prompt instruction | Policy decision point |
|---|---|---|
| Evasion resistance | Overridable by injected content | Cannot be argued with |
| Testability | Probabilistic, hard to assert | Deterministic, unit-testable |
| Audit evidence | None beyond the transcript | Decision record per request |
| Change control | Prompt edit, no review | Versioned policy bundle |
| Failure mode | Silent | Explicit denial |
Enterprise Use Cases
Case Studies
Problem: An internal assistant used one credential for all staff, so retrieval could not enforce portfolio boundaries.
Opportunity: The identity provider already supported token exchange, so the change was integration work rather than platform replacement.
Architecture: Gateway mints on-behalf-of tokens, retrieval injects adviser identity into the query, tools verify audience and scope.
Outcome: Portfolio isolation became enforceable and every action became attributable to an adviser, with decision logs accepted by internal audit.
Lessons: Attribution is the prerequisite for every other AI access control.
Problem: A secondary export route bypassed the entitlement filter used on the main query path.
Opportunity: A zero trust review enumerated enforcement points and found the missing one before a customer did.
Architecture: All retrieval routes consolidated behind one query builder, with a contract test asserting that no route can construct a query without a tenant filter.
Outcome: The bypass was removed and a regression test now prevents reintroduction.
Lessons: One unfiltered code path is enough to defeat an otherwise sound design.
Implementation Steps
Enterprise SOPs
Purpose: Ensure every agent action carries a human subject
Owner: Identity platform team
Steps: Authenticate user, evaluate session assurance, mint actor token with audience, log issuance
Evidence: Token issuance log with subject, actor and audience
Purpose: Prevent unreviewed widening of access
Owner: Security architecture
Steps: Raise change, test against policy suite, obtain approval, deploy versioned bundle
Evidence: Policy diff with approval and test results
Purpose: Detect enforcement drift
Owner: SOC
Steps: Sample denials weekly, investigate anomalies, confirm filter presence on new routes
Evidence: Weekly review record with actions
Convert a Shared-Credential Assistant to Zero Trust
Problem: You inherit an assistant that calls three internal APIs with one service account and applies retrieval filters after the search. Redesign it without changing the user experience.
- Principal inventory with credential and scope per hop
- On-behalf-of token flow with audience restriction per tool
- Policy decision point for retrieval and tool invocation
- Retrieval filters moved inside the query with contract tests
- Approval gate for the one irreversible action in scope
- Decision log schema joined by correlation identifier
Architecture: Follow the six-layer reference, and state for each layer which enforcement point blocks which abuse path.
Outcome: A migration plan that reduces blast radius at every phase and produces audit evidence from phase one.
GCC Applications
- Designing multi-client AI delivery with enforceable tenant isolation
- Providing identity and policy architecture as a service to client AI programmes
- Reducing client audit findings on AI access control before they are raised
- Standardising delegation patterns across a portfolio of assistants
Key Metrics & KPIs
Risks & Mitigation
Maturity Model
Future Roadmap
Emerging Trends
Career Applications
Frequently Asked Questions
Research References
Knowledge Check
Knowledge check
Is zero trust for AI different from ordinary zero trust?
Can we implement this without replacing our identity provider?
Where should the policy decision point live?
How do we stop teams bypassing the gateway?
What does a tool scope actually contain?
How do we handle approvals at scale?
Related Topics
Continue this lesson with a subscription
AI Cybersecurity, AI Security & AI Governance is part of the paid catalogue. You have read the free preview. A subscription opens the rest of this lesson, the classroom slides and the assessment questions.
- The full lesson for this topic and every other catalogue topic
- Every classroom slide deck and worked example
- All assessments, with a verifiable certificate on completion
The Free-To-Learn library stays open to everyone and is not affected by this.
