How AI Agents Earn Trust: Identity, Access, and Audit

Peter Bubenik · Uber AI · · Source
Image for Solving the Identity Crisis for AI Agents

Step-by-Step Study Guide

Step 1: Understand the Problem Before the Solution

Why Does Identity Matter?

Before diving into architecture, grasp why this problem exists.

Traditional Identity has two categories:

TypeExample
Human IdentityEmployee login credentials
Non-Human Identity (NHI)Service accounts, API keys

AI Agents break this model because they are neither purely human nor traditional workloads. They are entities that:

  • Act on behalf of a human
  • Call other agents in sequence
  • Make dynamic decisions mid-workflow

The Core Problem Illustrated

On-Call Engineer
      ↓ initiates
Oncall Agent
      ↓ delegates to
Investigation Agent
      ↓ delegates to
Monitoring Agent
      ↓ opens
Pull Request ← Who is responsible here?

Without proper identity:

  • The PR shows only "Monitoring Agent"
  • The original engineer is untraceable
  • Audit logs are incomplete
  • Security policies cannot be enforced properly

Two Specific Problems Defined

Problem 1: Identity Model Gap

Current models describe humans and workloads, but NOT agents acting on behalf of humans

Problem 2: Lost Provenance

As requests pass through multiple agents, the original context (who started this, why) gets dropped at each hop


Step 2: Understand the Key Concepts

Before studying the architecture, learn these foundational terms:

Zero Trust Architecture

A security model where nothing is trusted by default, even inside the network. Every request must be:

  • Authenticated (prove who you are)
  • Authorized (prove you're allowed to do this)
  • Continuously monitored

JWT (JSON Web Token)

A compact, cryptographically signed token that carries identity claims.

Header.Payload.Signature

Payload example:
{
  "sub": "investigation-agent",
  "aud": "mcp-gateway",
  "actor_chain": ["user1", "oncall-agent", "investigation-agent"],
  "exp": 1234567890  ← short-lived, expires in minutes
}

SPIFFE/SPIRE

  • SPIFFE: A standard for workload identity in distributed systems
  • SPIRE: The implementation that issues SVIDs (SPIFFE Verifiable Identity Documents)
  • Think of it as a birth certificate for a compute workload

Actor Chain

The complete, verifiable record of every entity involved in a request:

[user1 → oncall-agent → investigation-agent → mcp-gateway]

Step 3: Learn the Architecture Components

Study each component and its single responsibility:

┌─────────────────────────────────────────────────────┐
│                  ARCHITECTURE MAP                    │
│                                                      │
│  [Engineer] → [AI Agent Mesh] → [MCP Gateway]       │
│                     ↕                ↕               │
│              [STS Token Service]  [Downstream        │
│                     ↕              Systems]          │
│              [Agent Registry]                        │
│                                                      │
│  [AI Gateway] ← mediates → [External AI Models]     │
└─────────────────────────────────────────────────────┘

Component Breakdown

1. Agent Registry

  • The source of truth for all registered agents
  • Maps each agent to its authorized workload
  • Prevents impersonation: Agent X cannot pretend to run on Workload Y

2. Security Token Service (STS)

  • The only entity allowed to mint JWT tokens for agents
  • Issues short-lived, single-hop tokens (minutes TTL)
  • Embeds the full actor chain into every token
  • Conceptually based on OAuth 2.0 Token Exchange (RFC 8693)

3. AI Agent Mesh

  • The communication layer where agents talk to each other
  • All communication uses STS-issued JWTs

4. MCP Gateway

  • Policy enforcement point for tool invocations
  • Verifies JWT, checks tool-level access policies
  • Handles sensitive data redaction
  • Proxies verified requests to downstream systems

5. AI Gateway

  • Mediates all calls to external AI models (OpenAI, Anthropic, etc.)
  • Enforces security guardrails: prompt injection, jailbreaks, PII redaction

Step 4: Trace How Agent Identity Is Created

Follow this process step by step:

STEP 1: Workload proves itself
─────────────────────────────
Kubernetes Workload → requests SVID from SPIRE
Result: Cryptographically signed workload identity
"I am Workload-1, running legitimately in this environment"

STEP 2: Agent requests its own token
─────────────────────────────────────
SDK (with agent config + inbound JWT + destination audience)
→ sends request to STS
→ authenticated using the SVID from Step 1

STEP 3: STS validates the request
───────────────────────────────────
STS checks Agent Registry:
"Is this agent_id authorized to run on this workload?"
If YES → proceed
If NO  → reject (prevents impersonation)

STEP 4: STS mints the JWT
──────────────────────────
JWT contains:
- Agent identity
- Specific audience (next hop only)
- Full actor chain
- Short expiry (minutes)

Key Security Properties of This Design

PropertyHow It's Achieved
No token reuseEach token is scoped to ONE specific destination
No impersonationAgent Registry validates agent-to-workload mapping
Full traceabilityActor chain embedded in every token
Short exposure windowTokens expire in minutes

Step 5: Trace a Real Multi-Hop Workflow

Now apply everything by following a complete request:

Scenario: Engineer → Oncall Agent → Investigation Agent → MCP Gateway

Hop 1: Engineer initiates session

user1 (engineer) → Oncall Agent
Token contains: { actor: "user1" }

Hop 2: Oncall Agent needs to call Investigation Agent

Oncall Agent presents:
  - Its SPIRE SVID (Workload-1)
  - user1's context
  - Audience: "investigation-agent"

STS verifies → mints JWT:
{ actor_chain: ["user1", "oncall-agent"], aud: "investigation-agent" }

Oncall Agent → sends this JWT → Investigation Agent

Hop 3: Investigation Agent needs to call MCP Gateway

Investigation Agent performs its OWN token exchange with STS:
  - Audience: "mcp-gateway"

STS mints new JWT:
{ actor_chain: ["user1", "oncall-agent", "investigation-agent"], aud: "mcp-gateway" }

Investigation Agent → sends JWT → MCP Gateway

Hop 4: MCP Gateway enforces policy

MCP Gateway receives JWT:
1. Verifies cryptographic signature ✓
2. Checks audience matches ✓
3. Evaluates tool-level policy using FULL actor chain ✓
4. Proxies request to downstream service ✓
5. Logs complete audit trail ✓

Result: The PR now shows:

"Monitoring Agent acting on behalf of user1, via oncall-agent and investigation-agent, to resolve alert #XYZ"


Step 6: Understand the Developer Experience Design

A critical insight from this article: security must be the easy path.

The Problem with Manual Compliance

  • Agents built before this system existed
  • Developers might skip token exchange steps
  • Inconsistent implementation creates security gaps

The Solution: Standardized A2A Client

Without A2A Client (manual, error-prone):
Developer must remember to:
  □ Request SVID
  □ Call STS with correct parameters
  □ Attach actor chain
  □ Set correct audience
  □ Handle token refresh

With A2A Client (automated, secure-by-default):
Developer calls:
  a2a_client.send(destination, payload)
  ← All security steps happen automatically

Design Principle: The secure path should also be the easiest path


Step 7: Understand Observability and Its Importance

In a Zero Trust system, monitoring is not optional — it's a core requirement.

What the Observability System Captures

For every request:
├── Who initiated it (human identity)
├── Which agents were involved (actor chain)
├── Which tools were invoked
├── Authorization decisions made
├── Security context at each hop
└── Timestamp of each event

Why This Matters

Without ObservabilityWith Observability
Incident response requires manual log stitchingComplete audit trail in one place
Cannot prove complianceFull attribution available
Security anomalies go undetectedReal-time visibility into all agent actions

Performance Consideration

  • Token exchange latency: under 40 milliseconds (p99)
  • This ensures security doesn't significantly slow down agent workflows

Step 8: Understand the Strategic Direction

The article presents a 3-layer vision for the future:

Layer 3: Unified Policy Enforcement Plane
─────────────────────────────────────────
Consistent policy across all tools, sessions, protocols
Business-level controls expressed uniformly

Layer 2: Dynamic Access Control
────────────────────────────────
Risk-adaptive permissions
Context-aware authorization decisions

Layer 1: Foundation (Current Work)
────────────────────────────────────
Verifiable agent identity
Actor chain propagation
Short-lived scoped tokens

Core insight: Static, human-managed permissions don't scale in an agent-driven world. The future requires identity, risk assessment, and policy to work together dynamically.


Summary: The Big Picture

PROBLEM                    SOLUTION
───────────────────────────────────────────────────────
Agents have no             → SPIRE SVIDs + Agent Registry
verifiable identity          give each agent cryptographic identity

Original context           → Actor chain embedded in every
gets lost across hops        JWT token at every hop

Tokens can be              → Single-hop, short-lived tokens
intercepted/replayed         scoped to specific audience

Developers skip            → A2A Client automates all
security steps               security steps by default

No audit trail             → Observability captures complete
across agent workflows       lineage of every request

The fundamental shift: AI agents are not just workloads — they are delegated actors that must carry verifiable proof of their entire chain of authority at every step of execution.

More to study