Agent Identity Protocol (AIP) Specification
Version: v1alpha3Status: Draft
Last Updated: 2026-02-19
Authors: Eduardo Arango ([email protected]),
James Cao ([email protected])
Abstract
The Agent Identity Protocol (AIP) defines a standard for identity, authentication, and policy-based authorization of AI agent tool calls. AIP enables runtime environments to enforce fine-grained access control over Model Context Protocol (MCP) tool invocations, providing a security boundary between AI agents and external resources. This specification defines:- The policy document schema (
AgentPolicy) - Evaluation semantics for authorization decisions
- Agent identity and session management
- Server-side validation endpoints
- Agent Authentication Token (AAT) and the identity layer (new in v1alpha3)
- AIP Registry and Token Issuer (new in v1alpha3)
- User binding and delegation (new in v1alpha3)
- Error codes for denied requests
- Audit log format for compliance
Table of Contents
- Introduction
- Terminology
- Policy Document Schema
- Evaluation Semantics
- Agent Identity
- Server-Side Validation
- Agent Authentication Token (AAT) (new in v1alpha3)
- AIP Registry (new in v1alpha3)
- Token Issuer (new in v1alpha3)
- User Binding and Delegation (new in v1alpha3)
- Error Codes
- Audit Log Format
- Conformance
- Security Considerations
- IANA Considerations
- Appendix A: Complete Schema Reference
- Appendix B: Changelog
- Appendix C: References
- Appendix D: Future Extensions
- Appendix E: Implementation Notes
1. Introduction
1.1 Motivation
AI agents operating through the Model Context Protocol (MCP) have access to powerful tools: file systems, databases, APIs, and cloud infrastructure. Without a policy layer, agents operate with unrestricted access to any tool the MCP server exposes. Today, agents are granted full permissions to API keys, secrets, and system resources, running as the user with no distinction between human and non-human actions. There is no universal way to distinguish an AI agent from a human actor. This creates systemic gaps:- No audit trail — agent actions are indistinguishable from human actions in logs
- No revocation — once an agent has credentials, there is no standard way to revoke them
- No authorization granularity — access is all-or-nothing at the API key level
- Compliance blind spots — SOC 2, GDPR, HIPAA, and SOX requirements are unmet for agentic actions
- Layer 1 — Identity: Establishes who the agent is via cryptographic identities, Agent Authentication Tokens, and a registry-based root of trust (formalized in v1alpha3)
- Layer 2 — Enforcement: Decides what the agent is allowed to do via the AIP Proxy, policy engine, DLP scanning, and audit logging
- Capability declaration: Explicit allowlists of permitted tools
- Argument validation: Regex-based constraints on tool parameters
- Human-in-the-loop: Interactive approval for sensitive operations
- Audit trail: Immutable logging of all authorization decisions
- Agent identity: Cryptographic binding of policies to agent sessions
- Server-side validation: Optional HTTP endpoints for distributed policy enforcement
- Agent Authentication Tokens: Signed tokens carrying agent identity, user delegation, and capabilities (new in v1alpha3)
- Registry-based root of trust: Centralized agent registration with revocation (new in v1alpha3)
- User binding: Cryptographic proof of which human authorized the agent (new in v1alpha3)
1.2 Goals
- Interoperability: Any MCP runtime can implement AIP
- Simplicity: YAML-based policies readable by security teams
- Defense in depth: Multiple layers (method, tool, argument, identity, AAT)
- Fail-closed: Unknown tools are denied by default
- Zero-trust ready: Support for token-based identity verification
- Agent-human distinction: Separate authentication for agents vs. users (new in v1alpha3)
- Cryptographic delegation: Provable chain from user to agent to action (new in v1alpha3)
1.3 Non-Goals
The following are explicitly out of scope for this version of the specification:- Network egress control (see Appendix D: Future Extensions)
- Subprocess sandboxing (implementation-defined)
- Rate limiting algorithms (implementation-defined)
- Policy expression languages beyond regex (CEL/Rego - see Appendix D)
- Full OIDC/SPIFFE federation (see Appendix D); basic integration points are defined
1.4 Relationship to MCP
AIP is designed as a security layer for MCP. It interceptstools/call requests and applies policy checks before forwarding to the MCP server.
1.5 Relationship to MCP Authorization
MCP defines an optional OAuth 2.1-based authorization layer (MCP 2025-06-18 and later). AIP is complementary to MCP authorization:| Concern | MCP Authorization | AIP |
|---|---|---|
| Scope | Transport-level authentication | Tool-level authorization |
| What it protects | Access to MCP server | Access to specific tools |
| Token type | OAuth 2.1 access tokens | Agent Authentication Tokens (AAT) |
| Policy language | OAuth scopes | YAML policy documents |
| Identity model | User identity (OAuth) | Agent + user identity (AAT) |
1.6 Two-Layer Architecture (v1alpha3)
v1alpha3 formalizes the complete two-layer architecture:- Agent registers with the AIP Registry, receiving a key pair and Agent Identity Document (AID)
- When a user authorizes an agent, the Token Issuer validates the agent’s identity and issues an AAT encoding agent ID, user binding, and capabilities
- On every tool call, the AIP Proxy verifies the AAT, checks the registry revocation list, evaluates policy, performs DLP scanning, and writes an audit log entry
- A hijacked agent fails at Layer 2 — its AAT claims do not match the attempted action
- A revoked agent fails at Layer 2 — the proxy checks the registry revocation list on every call
- A legitimate agent passes through both layers with a full audit trail tied to its verified identity
2. Terminology
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.| Term | Definition |
|---|---|
| Agent | An AI system that invokes MCP tools on behalf of a user |
| Agent Identity Document (AID) | JSON structure defining an agent’s cryptographic identity (new) |
| Agent Authentication Token (AAT) | A signed token proving agent identity, user delegation, and capabilities at runtime (new) |
| AIP Registry | Central directory of registered agents and their public keys (new) |
| Token Issuer | Service that validates agent identity and issues AATs (new) |
| Policy | A document specifying authorization rules (AgentPolicy) |
| Tool | An MCP tool exposed by an MCP server |
| Decision | The result of policy evaluation: ALLOW, BLOCK, or ASK |
| Violation | A policy rule was triggered (may or may not block) |
| Session | A bounded period of agent activity with consistent identity |
| Identity Token | A cryptographic token binding policy to session (v1alpha2; superseded by AAT for cross-service use) |
| Policy Hash | SHA-256 hash of the canonical policy document |
| User Binding | Cryptographic proof linking an agent’s actions to an authorizing user (new) |
| Capability | A declared permission encoded in an AAT (e.g., tool access, resource scope) (new) |
| Delegation Chain | The provable path from user authorization through agent to action (new) |
| Revocation List | Registry-maintained list of revoked agents, AATs, and sessions (new) |
3. Policy Document Schema
3.1 Document Structure
An AIP policy document is a YAML file with the following top-level structure:3.2 Required Fields
| Field | Type | Description |
|---|---|---|
apiVersion | string | MUST be aip.io/v1alpha3 |
kind | string | MUST be AgentPolicy |
metadata.name | string | Unique identifier for this policy |
3.3 Metadata
3.3.1 Policy Signature
Thesignature field provides cryptographic integrity verification for the policy document.
Format: <algorithm>:<base64-encoded-signature>
Supported algorithms:
ed25519- Ed25519 signature (RECOMMENDED)
3.4 Spec Fields
[Sections 3.4.1 through 3.4.6 remain unchanged from v1alpha2]3.4.1 mode
Controls enforcement behavior.| Value | Behavior |
|---|---|
enforce | Violations are blocked (default) |
monitor | Violations are logged but allowed |
3.4.2 allowed_tools
A list of tool names that the agent MAY invoke.3.4.3 allowed_methods
A list of JSON-RPC methods that are permitted. If not specified, implementations MUST use the default safe list:* MAY be used to allow all methods.
3.4.4 denied_methods
A list of JSON-RPC methods that are explicitly denied. Denied methods take precedence over allowed methods.3.4.5 protected_paths
A list of file paths that tools MUST NOT access. Any tool argument containing a protected path MUST be blocked.- Expand
~to the user’s home directory - Automatically protect the policy file itself
3.4.6 strict_args_default
Whentrue, tool rules reject any arguments not explicitly declared in allow_args.
Default: false
3.5 Tool Rules
Tool rules provide fine-grained control over specific tools.3.5.1 Actions
| Action | Behavior |
|---|---|
allow | Permit (subject to argument validation) |
block | Deny unconditionally |
ask | Require interactive user approval |
3.5.2 Rate Limiting
Format:<count>/<period>
| Period | Aliases |
|---|---|
second | sec, s |
minute | min, m |
hour | hr, h |
"10/minute", "100/hour", "5/second"
Rate limiting algorithm is implementation-defined (token bucket, sliding window, etc.).
3.5.3 Argument Validation
Theallow_args field maps argument names to regex patterns.
- Use a regex engine with linear-time guarantees (RE2 or equivalent)
- Match against the string representation of the argument value
- Treat missing constrained arguments as a violation
3.5.4 Tool Schema Hashing
Theschema_hash field provides cryptographic verification of tool definitions to prevent tool poisoning attacks.
Format: <algorithm>:<hex-digest>
Supported algorithms:
sha256(RECOMMENDED)sha384sha512
| Condition | Behavior |
|---|---|
schema_hash absent | No schema verification (backward compatible) |
| Hash matches | Tool allowed (proceed to argument validation) |
| Hash mismatch | Tool BLOCKED with error -32013 |
| Tool not found | Tool BLOCKED with error -32001 |
3.6 DLP Configuration
[Section 3.6 remains unchanged from v1alpha2] Data Loss Prevention (DLP) scans for sensitive data in requests and responses.3.7 Identity Configuration
[Section 3.7 remains unchanged from v1alpha2] Theidentity section configures agent identity and token management.
3.8 Server Configuration
[Section 3.8 remains unchanged from v1alpha2]3.9 Registry Configuration (v1alpha3)
Theregistry section configures how the AIP Proxy connects to the AIP Registry for agent verification and revocation checks.
3.9.1 enabled
Whentrue, the AIP Proxy connects to an AIP Registry for agent identity verification and revocation checking.
Default: false
When registry.enabled: true, the proxy MUST verify AATs against the registry’s known agent keys before applying local policy.
3.9.2 endpoint
The URL of the AIP Registry. Format:https://<host>:<port>
Example:
3.9.3 Revocation Modes
| Mode | Description | Latency | Freshness |
|---|---|---|---|
online | Check registry on every AAT validation | High | Real-time |
cached | Cache revocation list, refresh periodically (default) | Low | Eventual |
crl | Load Certificate Revocation List from local file | Lowest | Manual |
- Every AAT validation queries the registry
- Highest security, highest latency
- Requires reliable network connectivity
- Background refresh of revocation list
- Trades freshness for performance
- Revocations take effect within
check_interval
- CRL file updated by external process
- No network dependency
- Manual revocation propagation
3.9.4 Cache Configuration
| Field | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Cache agent public keys and revocation status |
ttl | duration | "5m" | Cache entry time-to-live |
max_entries | int | 10000 | Maximum cached entries (LRU eviction) |
3.10 AAT Configuration (v1alpha3)
Theaat section configures how the AIP Proxy validates and uses Agent Authentication Tokens.
3.10.1 enabled
Whentrue, the proxy accepts and validates AATs on incoming requests.
Default: false
3.10.2 require
Whentrue, all tool calls MUST include a valid AAT. Calls without AATs are rejected with error code -32015.
Default: false
This enables gradual rollout: start with require: false to validate AATs when present without blocking requests that lack them.
3.10.3 capabilities_mode
Determines how AAT capabilities interact with local policy.| Value | Behavior |
|---|---|
intersect | Tool must be allowed by BOTH AAT capabilities and local policy (default) |
aat_only | AAT capabilities replace local allowed_tools |
policy_only | Local policy only; AAT used for identity/audit only |
- Most restrictive: requires both AAT and local policy to allow the tool
- Defense in depth: neither AAT compromise nor policy compromise alone grants access
- Centralized capability management via Token Issuer
- Local policy still enforces argument validation, DLP, and rate limiting
allowed_toolsin local policy is IGNORED
- AAT used only for identity verification and audit trail enrichment
- Local policy controls all authorization decisions
- Simplest migration path from v1alpha2
3.10.4 trusted_issuers
A list of Token Issuer identifiers whose AATs are accepted by this proxy.3.10.5 header_name
The HTTP header or JSON-RPC extension field used to transmit AATs. Default:"X-AIP-AAT"
For JSON-RPC transport (stdio), the AAT is included in the request params:
_aip_aat parameter is reserved by this specification and MUST NOT be forwarded to the MCP server.
4. Evaluation Semantics
4.1 Name Normalization
Tool names and method names MUST be normalized before comparison using the following algorithm:4.2 Method-Level Authorization
Method authorization is the FIRST line of defense, evaluated BEFORE tool-level checks.4.3 Tool-Level Authorization
Tool authorization applies totools/call requests.
4.4 Decision Outcomes
| Decision | Mode=enforce | Mode=monitor |
|---|---|---|
| ALLOW | Forward request | Forward request |
| BLOCK | Return error | Forward request, log violation |
| ASK | Prompt user | Prompt user |
| RATE_LIMITED | Return error | Return error (always enforced) |
| PROTECTED_PATH | Return error | Return error (always enforced) |
| TOKEN_REQUIRED | Return error | Return error (always enforced) |
| TOKEN_INVALID | Return error | Return error (always enforced) |
| AAT_REQUIRED | Return error | Return error (always enforced) (new) |
| AAT_INVALID | Return error | Return error (always enforced) (new) |
| AAT_CAPABILITY_DENIED | Return error | Forward request, log violation (new) |
4.5 Argument Validation
STRING() function converts values to string representation:
- String -> as-is
- Number -> decimal representation
- Boolean -> “true” or “false”
- Null -> empty string
- Array/Object -> JSON serialization
5. Agent Identity
[Section 5 remains unchanged from v1alpha2] This section defines the local agent identity model introduced in v1alpha2. In v1alpha3, local identity tokens and AATs serve complementary roles: identity tokens bind the proxy session, while AATs carry cross-service agent identity.5.1 Overview
Agent identity provides:- Session binding: Cryptographic proof that requests belong to the same session
- Policy integrity: Verification that the policy hasn’t changed mid-session
- Replay prevention: Nonces prevent token reuse across sessions
- Audit correlation: Session IDs link related audit events
5.2 Policy Hash
5.2.1 Canonical Form
5.2.2 Hash Computation
5.3 Identity Token Structure
[Remains unchanged from v1alpha2]5.4 Token Lifecycle
[Remains unchanged from v1alpha2]5.5 Session Management
[Remains unchanged from v1alpha2]5.6 Token and Session Revocation
[Remains unchanged from v1alpha2]5.7 Compatibility with Agentic JWT
[Remains unchanged from v1alpha2]5.8 Key Management
[Remains unchanged from v1alpha2]6. Server-Side Validation
[Section 6 remains unchanged from v1alpha2, with the addition of AAT-aware endpoints]6.1 Overview
The AIP server provides:- Remote validation: Validate tool calls from external systems
- Health checks: Integration with load balancers and orchestrators
- Metrics: Prometheus-compatible metrics export
- AAT validation: Verify Agent Authentication Tokens (new in v1alpha3)
6.2 Validation Endpoint
6.2.1 Request Format
6.2.2 Response Format
6.3 Health Endpoint
[Remains unchanged from v1alpha2]6.4 Metrics Endpoint
Updated metrics (v1alpha3 additions):| Metric | Type | Description |
|---|---|---|
aip_requests_total | counter | Total validation requests |
aip_decisions_total | counter | Decisions by type (allow/block/ask) |
aip_violations_total | counter | Policy violations by type |
aip_token_validations_total | counter | Identity token validations (valid/invalid) |
aip_aat_validations_total | counter | AAT validations (valid/invalid/expired/revoked) (new) |
aip_registry_checks_total | counter | Registry revocation checks (new) |
aip_registry_latency_seconds | histogram | Registry check latency (new) |
aip_revocations_total | counter | Revocation events by type |
aip_active_sessions | gauge | Currently active sessions |
aip_active_agents | gauge | Currently active agents (by AAT) (new) |
aip_request_duration_seconds | histogram | Request latency |
aip_policy_hash | gauge | Current policy hash (as label) |
6.5 Revocation Endpoint
[Remains unchanged from v1alpha2]6.6 Authentication
[Remains unchanged from v1alpha2]7. Agent Authentication Token (AAT) (v1alpha3)
This section defines the Agent Authentication Token — the core credential bridging Layer 1 (Identity) and Layer 2 (Enforcement).7.1 Overview
The AAT carries signed claims about an agent:- Who issued its identity — the Token Issuer
- Which user it is acting on behalf of — user binding
- What capabilities it declared — tools and resource scopes
- When it was issued and when it expires — temporal bounds
- Per-agent identity: Every agent has a distinct cryptographic identity, separate from the user
- User delegation: Actions are provably linked to the authorizing human
- Capability-based authorization: AAT capabilities can drive policy decisions
- Cross-service portability: AATs are verifiable by any party with access to the issuer’s public key
7.2 AAT Structure
An AAT is a signed JWT (RFC 7519) with the following claims:7.3 AAT Claims
7.3.1 Standard JWT Claims
| Claim | Type | Required | Description |
|---|---|---|---|
aat_version | string | Yes | MUST be aip/v1alpha3 |
iss | string | Yes | Token Issuer identifier (URI) |
sub | string | Yes | Agent identifier (from AID) |
aud | string/array | Yes | Intended recipient(s) — proxy or MCP server |
iat | number | Yes | Issued-at time (Unix timestamp) |
exp | number | Yes | Expiration time (Unix timestamp) |
nbf | number | No | Not-before time (Unix timestamp) |
jti | string | Yes | Unique token identifier (UUID v4) |
7.3.2 Agent Claims
Theagent object identifies the AI agent:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique agent identifier (from registry) |
name | string | No | Human-readable name (e.g., “Cursor IDE Agent”) |
public_key_thumbprint | string | Yes | SHA-256 of agent’s public key (JWK Thumbprint, RFC 7638) |
aid_hash | string | No | SHA-256 of the Agent Identity Document |
public_key_thumbprint allows the proxy to verify that the AAT was issued for the specific agent key pair, preventing AAT theft across agents.
7.3.3 User Binding Claims
Theuser_binding object links the agent’s actions to the authorizing human:
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | User identifier (email, OIDC sub, or opaque ID) |
auth_method | string | Yes | How the user authenticated (see below) |
auth_time | number | Yes | When the user authenticated (Unix timestamp) |
delegation_scope | string | No | Scope of delegation granted to the agent |
| Value | Description |
|---|---|
oidc | OpenID Connect authentication |
oauth2 | OAuth 2.0 authorization code flow |
api_key | API key associated with a user |
local | Local system user (process owner) |
saml | SAML assertion |
attestation | Hardware or platform attestation |
| Value | Description |
|---|---|
full | Agent can perform any action the user could (NOT RECOMMENDED) |
tools | Agent can use specific tools listed in capabilities.tools |
read_only | Agent can only use read operations |
session | Delegation valid for this session only |
custom:<scope> | Implementation-defined scope |
7.3.4 Capabilities Claims
Thecapabilities object declares what the agent is authorized to do:
| Field | Type | Required | Description |
|---|---|---|---|
tools | []string | No | List of tool names the agent may invoke |
resource_scopes | []string | No | Resource access scopes (e.g., repo:read, db:write) |
max_calls_per_session | int | No | Maximum tool calls allowed in this session |
allowed_servers | []string | No | MCP server identifiers this AAT is valid for |
<resource>:<action> format:
7.3.5 Context Claims
Thecontext object provides operational context:
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session UUID (matches identity token session) |
policy_hash | string | No | SHA-256 hash of the policy the issuer approved |
registry_id | string | No | Registry that holds the agent’s registration |
7.4 AAT Signing
AATs MUST be signed using one of the following algorithms (in order of preference):| Algorithm | Key Type | Recommendation |
|---|---|---|
ES256 | ECDSA P-256 | Default, RECOMMENDED |
ES384 | ECDSA P-384 | High-security environments |
EdDSA | Ed25519 | Performance-critical |
RS256 | RSA 2048+ | Legacy compatibility |
HS256) as they require shared secrets.
JWT Header:
kid MUST reference a key in the Token Issuer’s JWKS endpoint or the AIP Registry’s key store.
7.5 AAT Lifecycle
7.5.1 AAT Issuance
- Agent authenticates to Token Issuer using its private key (proof of possession)
- User authorization is verified (OAuth flow, API key lookup, or local attestation)
- Token Issuer retrieves agent registration from AIP Registry
- Token Issuer constructs AAT with agent identity, user binding, and capabilities
- Token Issuer signs AAT with its private key
- AAT returned to agent
7.5.2 AAT Refresh
AATs SHOULD be refreshed before expiry. The refresh flow:- Agent presents current AAT and proof of possession (signed challenge)
- Token Issuer verifies current AAT is valid (not expired, not revoked)
- Token Issuer checks registry for revocation
- New AAT issued with same
session_id, freshjti, updatedexp
- Refreshed AAT MUST preserve the
session_id - Refreshed AAT MUST have a new
jti - Refreshed AAT MAY have different
capabilities(if policy changed) - Refresh MUST fail if the agent or session is revoked
7.5.3 AAT Validation
The AIP Proxy MUST validate AATs using the following algorithm:7.6 AAT Transport
7.6.1 JSON-RPC (stdio) Transport
For MCP connections over stdio, the AAT is included in thetools/call params as a reserved field:
_aip_aat field:
- MUST be stripped by the AIP Proxy before forwarding to the MCP server
- MUST NOT be logged in audit trails (log
jtiinstead) - Is OPTIONAL when
aat.require: false
7.6.2 HTTP Transport
For HTTP-based MCP connections, the AAT is sent as a header:8. AIP Registry (v1alpha3)
The AIP Registry is the root of trust for agent identities.8.1 Overview
The AIP Registry provides:- Agent registration: Agents register their public keys and metadata
- Key attestation: Registry signs agent certificates (Agent Identity Documents)
- Revocation: Registry maintains lists of revoked agents, AATs, and sessions
- Discovery: Token Issuers and proxies look up agent identities
8.2 Agent Identity Document (AID)
The AID is a JSON document that defines an agent’s cryptographic identity:8.2.1 AID Fields
| Field | Type | Required | Description |
|---|---|---|---|
aid_version | string | Yes | MUST be aip/v1alpha3 |
agent_id | string | Yes | Globally unique identifier (UUID v4 or URI) |
name | string | Yes | Human-readable name |
description | string | No | Agent description |
created_at | string | Yes | Registration time (ISO 8601) |
status | string | Yes | active, suspended, or revoked |
public_key | JWK | Yes | Agent’s public key in JWK format (RFC 7517) |
metadata | object | No | Additional agent metadata |
registry_attestation | object | Yes | Registry’s signature over the AID |
8.2.2 Agent Status
| Status | Description | AAT Issuance | AAT Validation |
|---|---|---|---|
active | Agent is registered and operational | Allowed | Valid |
suspended | Temporarily disabled (e.g., security review) | Blocked | Rejected |
revoked | Permanently deactivated | Blocked | Rejected |
8.2.3 Registry Attestation
Theregistry_attestation provides the registry’s cryptographic endorsement of the AID:
8.3 Registry API
The AIP Registry exposes the following HTTP endpoints:8.3.1 Agent Registration
8.3.2 Agent Lookup
8.3.3 Revocation List
8.3.4 Agent Key Rotation
- Agent generates new key pair
- Agent signs rotation request with current private key (proof of possession)
- Registry verifies signature, updates stored public key
- Old key remains valid for
key_grace_period(default: 1 hour) - New AID attestation issued
8.3.5 Registry JWKS
8.4 Registry Security
8.4.1 Authentication
All registry API calls (except JWKS and health) MUST be authenticated.| Endpoint | Required Auth | Description |
|---|---|---|
POST /v1/agents | Registration token | Initial agent registration |
GET /v1/agents/{id} | Bearer token or mTLS | Agent lookup |
GET /v1/revocations | Bearer token or mTLS | Revocation list |
POST /v1/agents/{id}/rotate-key | Proof of possession | Key rotation |
GET /v1/jwks | None (public) | Registry public keys |
8.4.2 Rate Limiting
Implementations MUST rate-limit registration endpoints to prevent abuse.8.4.3 Data Integrity
The registry MUST:- Store agent public keys with integrity protection (e.g., signed records)
- Maintain an append-only audit log of all registration events
- Never expose private keys (the registry never holds agent private keys)
9. Token Issuer (v1alpha3)
The Token Issuer validates agent identities and issues AATs.9.1 Overview
The Token Issuer is a service that:- Validates an agent’s proof of possession (private key ownership)
- Verifies the agent is registered and active in the AIP Registry
- Binds the agent’s AAT to the authorizing user
- Issues signed AATs with capabilities derived from policy
9.2 Token Issuance Flow
9.3 Token Request
9.3.1 Request Format
9.3.2 Grant Types
| Grant Type | Description | Use Case |
|---|---|---|
agent_authentication | Agent proves identity + user authorization | Standard flow |
aat_refresh | Refresh existing AAT | Token renewal |
agent_attestation | Platform attestation (no user) | Autonomous agents |
9.3.3 Proof of Possession
The agent proves ownership of its private key by signing a challenge:- Retrieves the agent’s public key from the AIP Registry
- Verifies the challenge signature using that public key
- Confirms the challenge was recently issued (prevents replay)
9.3.4 User Authorization Methods
| Method | user_authorization.type | Description |
|---|---|---|
| OAuth 2.0 | oauth2_token | User’s OAuth access token (RECOMMENDED) |
| OIDC ID Token | oidc_id_token | OpenID Connect ID token |
| API Key | api_key | User’s API key |
| Local Attestation | local_user | OS-level user identity (localhost only) |
user_id claim.
Local attestation (development / localhost):
9.4 Token Response
9.4.1 Success Response
| Field | Type | Description |
|---|---|---|
aat | string | The signed Agent Authentication Token (JWT) |
token_type | string | MUST be aat+jwt |
expires_in | int | Token lifetime in seconds |
refresh_token | string | Opaque token for AAT refresh (OPTIONAL) |
capabilities_granted | object | Capabilities included in the AAT |
capabilities_denied | object | Requested capabilities that were denied |
9.4.2 Error Response
| Error Code | HTTP Status | Description |
|---|---|---|
invalid_request | 400 | Malformed request |
invalid_proof | 401 | Proof of possession verification failed |
agent_not_found | 404 | Agent not registered in registry |
agent_suspended | 403 | Agent is suspended |
agent_revoked | 403 | Agent is revoked |
user_auth_failed | 401 | User authorization verification failed |
capabilities_denied | 403 | All requested capabilities denied |
issuer_error | 500 | Internal issuer error |
9.5 Capability Determination
The Token Issuer determines AAT capabilities based on:9.6 Token Issuer JWKS
Token Issuers MUST expose a JWKS endpoint for AAT signature verification:kid values.
10. User Binding and Delegation (v1alpha3)
This section defines how agent actions are cryptographically linked to the authorizing user.10.1 Motivation
Without user binding:- Agent actions are indistinguishable from each other and from human actions
- Compliance frameworks (SOC 2, GDPR, HIPAA) cannot attribute actions to responsible parties
- Revocation of user access does not revoke their agents’ access
10.2 Delegation Model
10.3 Delegation Chain Verification
The AIP Proxy MUST verify the complete delegation chain:10.4 Audit Trail Integration
When an AAT with user binding is present, audit log entries MUST include:- Who authorized the action (user_id, auth_method)
- What agent performed the action (agent_id, agent_name)
- How the delegation was granted (delegation_scope)
- When it happened (timestamp)
- What was done (tool, arguments)
- By whose authority the AAT was issued (aat_issuer)
10.5 User Binding Revocation
When a user’s authorization is revoked:- Token Issuer marks all AATs for that user as revoked
- Registry propagates revocation to all proxies (via revocation list)
- Proxies reject tool calls from revoked AATs
11. Error Codes
AIP defines the following JSON-RPC error codes:| Code | Name | Description |
|---|---|---|
| -32001 | Forbidden | Tool not in allowed_tools list |
| -32002 | Rate Limited | Rate limit exceeded |
| -32004 | User Denied | User rejected approval prompt |
| -32005 | User Timeout | Approval prompt timed out |
| -32006 | Method Not Allowed | JSON-RPC method not permitted |
| -32007 | Protected Path | Access to protected path blocked |
| -32008 | Token Required | Identity token required but not provided |
| -32009 | Token Invalid | Identity token validation failed |
| -32010 | Policy Signature Invalid | Policy signature verification failed |
| -32011 | Token Revoked | Token or session explicitly revoked |
| -32012 | Audience Mismatch | Token audience does not match expected value |
| -32013 | Schema Mismatch | Tool schema hash does not match policy |
| -32014 | DLP Redaction Failed | Request redaction produced invalid content |
| -32015 | AAT Required | Agent Authentication Token required but not provided (new) |
| -32016 | AAT Invalid | AAT validation failed (new) |
| -32017 | AAT Capability Denied | Requested tool not in AAT capabilities (new) |
| -32018 | Agent Not Registered | Agent not found in AIP Registry (new) |
| -32019 | Delegation Expired | User delegation has expired or been revoked (new) |
| -32020 | Issuer Untrusted | AAT issuer not in trusted_issuers list (new) |
11.1 Error Response Format
11.2 New Error Codes (v1alpha3)
-32015 AAT Required
Returned whenaat.require: true and no AAT is provided.
-32016 AAT Invalid
Returned when AAT validation fails.aat_error values:
malformed_aat- JWT structure invalidunsupported_version-aat_versionnot recognizeduntrusted_issuer- Issuer not in trusted listunknown_signing_key- Issuer key not foundsignature_invalid- Cryptographic signature failednot_yet_valid- Tokennbfis in the futureaat_expired- Token past expirationaudience_mismatch- Token audience wrongaat_revoked- Token or session revokedunknown_agent- Agent not in registryagent_key_mismatch- Agent public key doesn’t matchagent_inactive- Agent suspended or revokedreplay_detected- JTI reuse detected
-32017 AAT Capability Denied
Returned when the requested tool is not in the AAT’s capabilities.-32018 Agent Not Registered
Returned when the agent in the AAT is not found in the registry.-32019 Delegation Expired
Returned when the user binding in the AAT has expired.-32020 Issuer Untrusted
Returned when the AAT was issued by an issuer not in thetrusted_issuers list.
12. Audit Log Format
12.1 Required Fields
| Field | Type | Description |
|---|---|---|
timestamp | ISO 8601 | Time of the decision |
direction | string | upstream (client->server) or downstream (server->client) |
decision | string | ALLOW, BLOCK, ALLOW_MONITOR, RATE_LIMITED |
policy_mode | string | enforce or monitor |
violation | boolean | Whether a policy violation was detected |
12.2 Optional Fields
| Field | Type | Description |
|---|---|---|
method | string | JSON-RPC method name |
tool | string | Tool name (for tools/call) |
args | object | Tool arguments (SHOULD be redacted) |
failed_arg | string | Argument that failed validation |
failed_rule | string | Regex pattern that failed |
session_id | string | Session identifier |
token_id | string | Identity token nonce |
policy_hash | string | Policy hash at decision time |
agent_id | string | Agent identifier (from AAT) (new) |
agent_name | string | Human-readable agent name (from AAT) (new) |
user_id | string | Authorizing user identifier (from AAT) (new) |
user_auth_method | string | User authentication method (from AAT) (new) |
delegation_scope | string | Delegation scope (from AAT) (new) |
aat_jti | string | AAT unique identifier (new) |
aat_issuer | string | Token Issuer identifier (new) |
12.3 Example
12.4 Identity Events
[Token issued/rotated/failed events remain unchanged from v1alpha2]AAT Validated (v1alpha3)
AAT Rejected (v1alpha3)
Registry Revocation Check (v1alpha3)
13. Conformance
13.1 Conformance Levels
| Level | Requirements |
|---|---|
| Basic | Method authorization, tool allowlist, error codes |
| Full | Basic + argument validation, rate limiting, DLP, audit logging |
| Extended | Full + Human-in-the-Loop (action=ask) |
| Identity | Full + Identity tokens, session management |
| Server | Identity + Server-side validation endpoints |
| AAT | Server + AAT validation, registry integration (new) |
| Federation | AAT + Token Issuer, user binding, delegation chain (new) |
13.2 Conformance Testing
Implementations MUST pass the conformance test suite to claim AIP compliance. The test suite consists of:- Schema validation tests: Verify policy parsing
- Decision tests: Input -> expected decision
- Normalization tests: Verify Unicode handling
- Error format tests: Verify JSON-RPC errors
- Identity tests: Token lifecycle, rotation, validation
- Server tests: HTTP endpoint behavior
- AAT tests: AAT structure, validation, capability checking (new)
- Registry tests: Agent lookup, revocation checking (new)
- Delegation tests: User binding verification, scope enforcement (new)
spec/conformance/ for test vectors.
13.3 Implementation Requirements
Implementations MUST:- Parse
apiVersion: aip.io/v1alpha3documents - Reject documents with unknown
apiVersion - Apply NFKC normalization to names
- Return specified error codes
- Support
enforceandmonitormodes
- Log decisions in the specified format
- Support DLP scanning
- Support rate limiting
- Support identity tokens (for Identity conformance level)
- Support AAT validation (for AAT conformance level)
- Use any regex engine with RE2 semantics
- Implement additional security features (egress control, sandboxing)
- Implement server-side validation (for Server conformance level)
- Implement a Token Issuer (for Federation conformance level)
- Implement a Registry (for Federation conformance level)
14. Security Considerations
14.0 Threat Model
[Section 14.0.1-14.0.3 remain unchanged from v1alpha2 with AAT additions]14.0.1 Trust Boundaries
| Component | Trust Level | Rationale |
|---|---|---|
| User | Trusted | Defines policy, approves sensitive operations |
| Policy file | Trusted | Integrity verified via signature |
| AIP Engine | Trusted | Assumed correctly implemented |
| AIP Registry | Trusted | Root of trust for agent identities (new) |
| Token Issuer | Trusted | Issues AATs based on verified identity (new) |
| Agent (LLM) | Untrusted | Subject to prompt injection, jailbreaks |
| Agent’s AAT | Conditionally Trusted | Trusted only after cryptographic verification (new) |
| MCP Server | Untrusted | May be malicious or compromised |
| Tool definitions | Untrusted | May contain poisoned descriptions |
14.0.2 Threats In Scope (v1alpha3 additions)
| Threat | Attack Vector | AIP Mitigation |
|---|---|---|
| AAT theft | Stolen AAT used by different agent | Agent key thumbprint verification, JTI replay prevention |
| AAT forgery | Attacker creates fake AAT | Cryptographic signature verification via issuer JWKS |
| User impersonation | Agent claims different user | User binding verified through Token Issuer’s auth flow |
| Capability escalation | Agent requests tools beyond delegation | Capability intersection with local policy |
| Registry poisoning | Attacker modifies agent records | Registry attestation signatures, mTLS |
| Issuer compromise | Attacker issues unauthorized AATs | Trusted issuer list, key rotation, revocation |
| Delegation abuse | Agent acts beyond user’s intent | Delegation scope enforcement, short-lived AATs |
14.0.3 Defense in Depth (v1alpha3)
14.1 Policy File Protection
The policy file itself MUST be protected from modification by the agent. Implementations MUST automatically add the policy file path toprotected_paths.
14.2 Regex Denial of Service (ReDoS)
Implementations MUST use a regex engine that guarantees linear-time matching (RE2 or equivalent).14.3 Unicode Normalization
Implementations MUST apply NFKC normalization to prevent homoglyph attacks.14.4 Monitor Mode Risks
Monitor mode allows all requests through. Implementations SHOULD warn users when monitor mode is enabled in production environments.14.5 Audit Log Integrity
Audit logs SHOULD be written to a location not writable by the agent.14.6 Identity Token Security
[Remains unchanged from v1alpha2]14.7 Server Endpoint Security
[Remains unchanged from v1alpha2]14.8 AAT Security (v1alpha3)
14.8.1 AAT Storage
AATs SHOULD be stored in memory only, not persisted to disk. If persistence is required, AATs MUST be encrypted at rest. The_aip_aat field in JSON-RPC params MUST be stripped before any logging or forwarding.
14.8.2 AAT Transmission
AATs transmitted over the network MUST use TLS 1.2 or later. Implementations MUST NOT send AATs over unencrypted connections. For HTTP transport, AATs MUST be sent as headers (not query parameters or request body) to prevent leakage in server logs.14.8.3 AAT Lifetime
AAT lifetimes SHOULD be limited:| Environment | Recommended exp - iat | Rationale |
|---|---|---|
| Interactive (IDE) | 1 hour | Session-length |
| Batch processing | Duration of job | Tight scoping |
| Long-running service | 15 minutes (with refresh) | Minimize theft window |
| CI/CD pipeline | Duration of pipeline | Job-scoped |
14.8.4 Replay Prevention
AAT replay prevention uses thejti (JWT ID) claim:
14.8.5 Registry Trust
The AIP Registry is a high-value target. Implementations MUST:- Use TLS for all registry communications
- Verify the registry’s TLS certificate
- Support mTLS for registry authentication
- Cache registry responses with bounded TTL
- Have a fallback strategy when the registry is unreachable (see
failover_mode)
14.8.6 Token Issuer Trust
Token Issuers control what capabilities agents receive. Compromised issuers can grant excessive permissions. Mitigations:- Use
trusted_issuersto limit accepted issuers - Intersect AAT capabilities with local policy (
capabilities_mode: "intersect") - Monitor
aip_aat_validations_totalfor anomalies - Implement issuer key rotation and revocation
15. IANA Considerations
This specification requests registration of the following:15.1 Media Type
- Type name: application
- Subtype name: vnd.aip.policy+yaml
- Required parameters: None
- File extension: .yaml, .yml
15.2 URI Scheme
This specification uses theaip.io namespace for versioning:
aip.io/v1alpha1- Initial specificationaip.io/v1alpha2- Identity and server-side validationaip.io/v1alpha3- This specification (AAT, Registry, Token Issuer)
15.3 JWT Type Header (v1alpha3)
typ:aat+jwtfor Agent Authentication Tokens
Appendix A: Complete Schema Reference
Appendix B: Changelog
v1alpha3 (2026-02-19)
Agent Authentication Token (AAT)- Added Section 7: Agent Authentication Token specification
- JWT-based AAT structure with agent, user_binding, capabilities, and context claims
- AAT signing requirements (ES256, EdDSA, RS256; no symmetric algorithms)
- AAT lifecycle: issuance, refresh, validation, revocation
- AAT transport via
_aip_aatJSON-RPC param orX-AIP-AATHTTP header - AAT validation algorithm with 9-step verification
- JTI-based replay prevention
- Added
aatconfiguration section (Section 3.10)capabilities_mode: intersect, aat_only, policy_onlytrusted_issuersfor issuer allowlisting- Configurable validation strictness
- Added Section 8: AIP Registry specification
- Agent Identity Document (AID) structure with registry attestation
- Registry API: registration, lookup, revocation list, key rotation, JWKS
- Agent status lifecycle: active, suspended, revoked
- Registry attestation via Ed25519/ES256 signatures
- Added
registryconfiguration section (Section 3.9)- Revocation modes: online, cached, CRL
- Cache configuration for agent keys and revocation status
- mTLS and bearer token authentication
- Added Section 9: Token Issuer specification
- Token issuance flow with proof of possession
- Grant types: agent_authentication, aat_refresh, agent_attestation
- User authorization methods: OAuth 2.0, OIDC, API key, local attestation
- Capability determination from agent record, user permissions, and requested capabilities
- Token Issuer JWKS endpoint
- Added Section 10: User Binding and Delegation specification
- Delegation model connecting users to agents to actions
- Delegation chain verification algorithm
- Delegation scope enforcement (full, tools, read_only, session, custom)
- User binding revocation propagation
- Audit trail integration with user identity
- Updated tool-level authorization (Section 4.3) with AAT capability checks
- Step 0b: AAT validation
- Step 0c: AAT capability intersection
- Added AAT_REQUIRED, AAT_INVALID, AAT_CAPABILITY_DENIED decision outcomes
- Added -32015 AAT Required
- Added -32016 AAT Invalid (with 13 detailed error subtypes)
- Added -32017 AAT Capability Denied
- Added -32018 Agent Not Registered
- Added -32019 Delegation Expired
- Added -32020 Issuer Untrusted
- Added
aip_aat_validations_totalcounter - Added
aip_registry_checks_totalcounter - Added
aip_registry_latency_secondshistogram - Added
aip_active_agentsgauge
- Added AAT-enriched audit log fields (agent_id, agent_name, user_id, user_auth_method, delegation_scope, aat_jti, aat_issuer)
- Added AAT_VALIDATED, AAT_REJECTED, REGISTRY_REVOCATION_CHECK event types
- Updated threat model with AAT-specific threats (theft, forgery, impersonation, capability escalation, registry poisoning, issuer compromise, delegation abuse)
- Added Section 14.8: AAT Security (storage, transmission, lifetime, replay prevention, registry trust, issuer trust)
- Defense in depth expanded to 9 layers (added AAT validation, AAT capability check)
- Added AAT conformance level
- Added Federation conformance level
- Added AAT, registry, and delegation test categories
v1alpha2 (2026-01-24)
- Added identity configuration section (token generation, rotation, session binding)
- Added server-side validation endpoints
- Added
schema_hashfor tool poisoning prevention - Added DLP enhancements (scan_requests, max_scan_size, on_request_match)
- Added threat model (Section 10.0)
- Added policy signature (metadata.signature)
- Added error codes -32008 through -32014
- Added Identity and Server conformance levels
v1alpha1 (2026-01-20)
- Initial draft specification
- Defined core policy schema
- Defined evaluation semantics
- Defined error codes
- Defined audit log format
Appendix C: References
- Model Context Protocol (MCP)
- MCP Authorization (2025-06-18)
- JSON-RPC 2.0 Specification
- RFC 2119 - Key words for use in RFCs
- RFC 6750 - The OAuth 2.0 Authorization Framework: Bearer Token Usage
- RFC 7517 - JSON Web Key (JWK)
- RFC 7519 - JSON Web Token (JWT)
- RFC 7638 - JSON Web Key (JWK) Thumbprint
- RFC 8707 - Resource Indicators for OAuth 2.0
- RFC 8785 - JSON Canonicalization Scheme (JCS)
- Unicode NFKC Normalization
- RE2 Syntax
- Agentic JWT (draft-goswami-agentic-jwt-00)
Appendix D: Future Extensions
This appendix describes features under consideration for future versions of AIP.D.1 Network Egress Control
Status: Proposed for v1beta1D.2 Policy Inheritance
Status: Under Discussion Allow policies to extend base policies:D.3 External Identity Federation
Status: Proposed for v1beta1 Allow policies to integrate with external identity providers:oidc- OpenID Connect providersspiffe- SPIFFE/SPIRE workload identity
D.4 Telemetry and Metrics
Status: Partially implemented in v1alpha2/v1alpha3 (metrics endpoint)D.5 Advanced Policy Expressions
Status: Under Discussion Support for CEL (Common Expression Language) or Rego for complex validation:D.6 Agentic JWT Compatibility
Status: Under Discussion for v1beta1 Full compatibility with the Agentic JWT specification. Mapping to Agentic JWT claims:| AIP Field | Agentic JWT Claim |
|---|---|
aat.agent.id | sub (subject) |
aat.context.policy_hash | agent_proof.agent_checksum |
aat.context.session_id | intent.workflow_id |
aat.capabilities.tools | Workflow steps |
aat.user_binding.user_id | azp (authorized party) |
D.7 Multi-Agent Delegation (v1alpha3 future)
Status: Under Discussion Support for agent-to-agent delegation chains, where Agent A (with user authorization) delegates a subset of capabilities to Agent B:- Each delegation step MUST reduce or maintain scope (never escalate)
- Maximum chain depth: 3 (user -> agent -> sub-agent)
- All delegators must be active and non-revoked
D.8 Registry Federation
Status: Under Discussion Allow multiple registries to federate, enabling cross-organization agent identity verification:Appendix E: Implementation Notes
E.1 Reference Implementation
The reference implementation is available at: https://github.com/openagentidentityprotocol/aip-go It provides:- Go-based proxy (
aip-proxy) - Policy engine (
pkg/policy) - DLP scanner (
pkg/dlp) - Audit logger (
pkg/audit) - Identity manager (
pkg/identity) - HTTP server (
pkg/server) - AAT validator (
pkg/aat) (v1alpha3) - Registry client (
pkg/registry) (v1alpha3)
E.2 Testing Against Conformance Suite
E.3 AAT Implementation Guidance
Generating Agent Key Pair
Computing JWK Thumbprint (RFC 7638)
Validating an AAT
E.4 Registering Your Implementation
Implementations that pass the conformance suite may be listed in the official registry. Submit a PR to the AIP repository with:- Implementation name and URL
- Conformance level achieved (Basic/Full/Extended/Identity/Server/AAT/Federation)
- Platform support matrix