| Internet-Draft | AAP for OAuth 2.0 | February 2026 |
| Cruz | Expires 11 August 2026 | [Page] |
This document defines the Agent Authorization Profile (AAP), an authorization profile for OAuth 2.0 and JWT designed for autonomous AI agents. AAP extends existing standards with structured claims and validation rules so that systems can reason about agent identity, task context, operational constraints, delegation chains, and human oversight requirements. It does not introduce a new protocol; it specifies how to use OAuth 2.0, JWT, Token Exchange, and proof-of-possession mechanisms in agent-to-API (M2M) scenarios with context-aware, auditable authorization.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 11 August 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The Agent Authorization Profile (AAP) is an authorization profile built on OAuth 2.0 [RFC6749] and JWT [RFC7519], designed to support secure, auditable, and context-aware authorization for autonomous AI agents. AAP extends existing standards with structured claims and validation rules that allow systems to reason about agent identity, task context, operational constraints, delegation chains, and human oversight requirements.¶
Traditional OAuth-based systems were designed primarily for user-to-application-to-API interactions. Autonomous AI agents introduce different characteristics: actions can be autonomous and high frequency; human approval may not be present at execution time; risk depends on task context; and execution may be delegated across multiple tools or agents. Existing scope-based models are not expressive enough to represent these requirements safely and transparently.¶
Provide explicit and verifiable identity for AI agents.¶
Support capability-based authorization with enforceable constraints.¶
Bind access tokens to specific tasks and declared purposes.¶
Enable auditable delegation across agents and tools.¶
Support the expression of human oversight requirements.¶
Remain compatible with OAuth 2.0, JWT, Token Exchange, and proof-of-possession mechanisms.¶
| Term | Definition |
|---|---|
| Agent | Autonomous software entity (e.g. LLM, bot) that acts as an OAuth client and performs actions on behalf of an operator. |
| Authorization Server (AS) | Server that issues access tokens in accordance with OAuth 2.0 and applies AAP policies. |
| Capability | Permitted action (e.g. action) together with its restrictions (constraints). |
| Delegation | Transfer of a subset of privileges to another entity (tool or sub-agent) via token exchange or other mechanism. |
| Operator | Organization or human role that registers and authorizes the agent. |
| Proof-of-possession (PoP) | Mechanism by which the client demonstrates possession of a key (e.g. DPoP, mTLS) when using the token. |
| Resource Server (RS) | Server that protects resources and validates AAP tokens before allowing access. |
| Task | Unit of work to which the token is bound (identifier, purpose, sensitivity, etc.). |
AAP token: An access token issued by an Authorization Server that conforms to this profile and contains AAP claims (e.g. agent, task, capabilities).¶
Claim: A name/value pair in a JWT [RFC7519] payload. AAP defines additional claim names and structures for agent identity, task binding, capabilities, oversight, delegation, context, and audit.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. For conformance: "MUST" and "SHALL" indicate mandatory requirements; "SHOULD" and "RECOMMENDED" indicate recommended but not mandatory behavior; "MAY" and "OPTIONAL" indicate optional behavior.¶
AAP operates within a standard OAuth architecture consisting of an Authorization Server (AS), Resource Servers (RS), and clients. In AAP, the client is an autonomous AI agent. Token issuance follows OAuth 2.0; typically the Client Credentials Grant [RFC6749] Section 4.4 is used for agent-to-API (M2M) flows. Client (agent) authentication MAY use standard client authentication (client secret, mTLS, etc.) or assertions (e.g. JWT-based client authentication) as per the deployment profile. When the agent is a workload identified by SPIFFE [SPIFFE], the AS MAY accept SVIDs or derived tokens as part of client authentication; AAP does not define a new flow but MAY integrate with SPIFFE. Tokens issued by the AS include additional structured claims that Resource Servers MUST evaluate before allowing operations.¶
AAP does not introduce a new identity or protocol scheme; it reuses existing standards and adds a layer of claims and validation rules.¶
OAuth 2.0 -- AAP uses the standard OAuth flow (AS, RS, client); the client is the agent; tokens are JWTs with additional AAP claims.¶
OpenID Connect -- Agent identity MAY be based on OIDC sub and iss; AAP adds agent-, task-, and capability-specific claims.¶
mTLS [RFC8705] -- RECOMMENDED for proof-of-possession and for agent authentication toward the AS and RS.¶
DPoP [RFC9449] -- Alternative to mTLS for proof-of-possession; RECOMMENDED when mTLS is not feasible.¶
SPIFFE -- OPTIONAL; the agent identifier (e.g. in agent) MAY be a SPIFFE ID (spiffe://trust-domain/...) when the deployment uses SPIFFE/SPIRE for workload identity.¶
Token Exchange [RFC8693] -- Used for delegation and for privilege reduction on token re-issuance; the act (actor) claim MAY be used in the delegation chain.¶
AAP tokens extend standard JWT claims [RFC7519] with the following structured sections. The normative claim names are: agent, task, capabilities, oversight, delegation, context, audit. These names are registered in the IANA "JSON Web Token Claims" registry (see Section 14).¶
Formal Schema: Complete JSON Schema definitions for all AAP claims are provided in Appendix A and in the /schemas directory of the reference implementation. Implementations SHOULD validate tokens against these schemas to ensure conformance.¶
Agent identity -- MAY be expressed via OIDC sub and iss, or via the agent claim. The agent claim MAY contain, among other fields, a SPIFFE ID (spiffe://trust-domain/...) when the deployment uses SPIFFE/SPIRE for workload identity.¶
Delegation -- The delegation chain MAY use the standard act (actor) claim from [RFC8693]. Optionally, delegation MAY carry additional metadata (e.g. depth, origin) when more than act is required.¶
Oversight -- Human oversight requirements are expressed as policy metadata in oversight (e.g. requires_approval_for for certain capability types, or max_autonomous_scope). AAP only carries the intent; enforcement is at the Resource Server or orchestrator (e.g. OIDC step-up with acr_values or an external approval API), and is out of scope for this profile.¶
Audit -- Trace identifiers in audit SHOULD be compatible with existing trace context propagation (e.g. W3C Trace Context, OpenTelemetry [OpenTelemetry]) so that logs can be correlated with distributed traces without defining a new audit schema.¶
The following examples illustrate concrete claim shapes using the normative claim names defined above. Standard JWT claims (iss, sub, aud, exp, iat, jti) are assumed.¶
Agent identity -- Identifies the autonomous agent and its execution context.¶
{
"agent": {
"id": "agent-researcher-01",
"type": "llm-autonomous",
"operator": "org:blogcorp",
"model": {
"provider": "provider-name",
"id": "model-id",
"version": "model-version"
},
"runtime": {
"environment": "kubernetes",
"attested": true
}
}
}
¶
Task binding -- Binds the token to a specific task and purpose.¶
{
"task": {
"id": "task-id",
"purpose": "research_and_draft_article",
"topic": "example-topic",
"data_sensitivity": "public",
"created_by": "user-id"
}
}
¶
Capabilities -- Authorized actions and constraints.¶
{
"capabilities": [
{
"action": "search.web",
"constraints": {
"domains_allowed": ["example.org"],
"max_requests_per_hour": 50
}
},
{
"action": "cms.create_draft",
"constraints": {
"status": "draft_only"
}
}
]
}
¶
Token Size Considerations:¶
AAP tokens with multiple capabilities and constraints can produce large JWTs. Many HTTP servers impose limits on the Authorization header (nginx default: 8KB, Apache: 8KB, AWS ALB: 16KB). Implementations SHOULD monitor token size and:¶
SHOULD warn when a serialized token exceeds 4KB¶
SHOULD use token introspection [RFC7662] or reference tokens when capabilities exceed 10 entries¶
MAY define a capabilities_ref claim containing a URI that references an external capability set, reducing token size while maintaining capability semantics¶
Oversight -- Human approval requirements for certain actions.¶
{
"oversight": {
"requires_human_approval_for": [
"cms.publish",
"execute.payment"
],
"approval_reference": "policy-id"
}
}
¶
Delegation -- Depth and chain of delegation.¶
{
"delegation": {
"depth": 0,
"max_depth": 2,
"chain": ["agent:agent-researcher-01"]
}
}
¶
Context -- Network, time, and geo restrictions.¶
{
"context": {
"network_zone": "public-internet-only",
"time_window": {
"start": "ISO-8601",
"end": "ISO-8601"
},
"geo_restriction": "none"
}
}
¶
Audit -- Trace and session identifiers for logging.¶
{
"audit": {
"log_level": "full",
"trace_id": "trace-id",
"session_id": "session-id"
}
}
¶
To prevent abuse and ensure interoperability, implementations SHOULD enforce the following string length limits:¶
| Claim Field | Min Length | Max Length |
|---|---|---|
agent.id
|
1 | 128 |
agent.type
|
1 | 64 |
agent.operator
|
1 | 256 |
task.id
|
1 | 128 |
task.purpose
|
1 | 256 |
capabilities[].action
|
1 | 128 |
delegation.chain[] (each entry) |
1 | 128 |
audit.trace_id
|
1 | 256 |
Authorization Servers MUST reject token requests containing claim values exceeding these limits. Resource Servers SHOULD reject tokens with values exceeding these limits.¶
The following is a single JSON object representing the decoded payload of an AAP access token (claims only; signature and encoding are per RFC 7519). Standard JWT claims and all AAP claims are combined with consistent values (e.g. same agent.id and task.id referenced in audit).¶
{
"iss": "https://as.example.com",
"sub": "agent-researcher-01",
"aud": "https://api.example.com",
"exp": 1704067200,
"iat": 1704063600,
"jti": "token-unique-id-123",
"agent": {
"id": "agent-researcher-01",
"type": "llm-autonomous",
"operator": "org:blogcorp",
"model": {
"provider": "provider-name",
"id": "model-id",
"version": "model-version"
},
"runtime": {
"environment": "kubernetes",
"attested": true
}
},
"task": {
"id": "task-id",
"purpose": "research_and_draft_article",
"topic": "example-topic",
"data_sensitivity": "public",
"created_by": "user-id"
},
"capabilities": [
{
"action": "search.web",
"constraints": {
"domains_allowed": ["example.org"],
"max_requests_per_hour": 50
}
},
{
"action": "cms.create_draft",
"constraints": {
"status": "draft_only"
}
}
],
"oversight": {
"requires_human_approval_for": [
"cms.publish",
"execute.payment"
],
"approval_reference": "policy-id"
},
"delegation": {
"depth": 0,
"max_depth": 2,
"chain": ["agent:agent-researcher-01"]
},
"context": {
"network_zone": "public-internet-only",
"time_window": {
"start": "2024-01-01T00:00:00Z",
"end": "2024-01-01T23:59:59Z"
},
"geo_restriction": "none"
},
"audit": {
"log_level": "full",
"trace_id": "trace-id",
"session_id": "session-id"
}
}
¶
nbf) Claim
The nbf (Not Before) claim [RFC7519] Section 4.1.5 MAY be included in AAP tokens. This is useful for:
- Scheduled tasks that should not start before a given time
- Tokens pre-issued for future use (e.g., batch operations starting at a specific hour)¶
If present, Resource Servers MUST reject tokens presented before the nbf time minus clock skew tolerance. The same clock skew tolerance applied to exp validation (RECOMMENDED: 5 minutes) SHOULD be applied to nbf validation.¶
Action names in the action field of capabilities MUST conform to the following ABNF grammar [RFC5234]:¶
action-name = component *( "." component ) component = ALPHA *( ALPHA / DIGIT / "-" / "_" )¶
Where:
- ALPHA is any ASCII alphabetic character (a-z, A-Z)
- DIGIT is any ASCII digit (0-9)
- Component names MUST start with an alphabetic character
- Component names MAY contain hyphens and underscores after the first character
- Action names are formed by concatenating components with dots (.)¶
Examples of valid action names:
- search.web
- cms.create_draft
- cms.publish
- execute.payment
- api.v2.users.read
- data-pipeline.transform_records¶
Examples of invalid action names:
- search..web (double dot)
- .search.web (starts with dot)
- search.web. (ends with dot)
- 9api.read (component starts with digit)
- search.web* (wildcard not allowed)¶
Matching Semantics:¶
Resource Servers MUST perform exact string matching on action names. Wildcard matching (e.g., cms.* matching cms.publish) is NOT part of this specification but MAY be defined in future extensions.¶
Action names are case-sensitive. search.Web and search.web are different actions.¶
Versioning MAY be expressed through namespace components:
- api.v1.search.web
- api.v2.search.web¶
This section defines the semantics of standard constraint types used within capability constraints. Resource Servers MUST enforce these constraints according to the semantics defined here.¶
Constraint Enforcement Semantics:¶
When multiple capabilities match the same action: - OR semantics: If ANY capability grants the action, the request is authorized (subject to that capability's constraints) - Resource Server evaluates capabilities in order and uses the first match¶
When multiple constraints exist within a single capability: - AND semantics: ALL constraints MUST be satisfied for the action to be authorized - If any constraint fails, the entire request MUST be denied¶
Empty Constraints:¶
When constraints is an empty object {} or is absent from a capability, NO restrictions are applied to that capability. The capability grants the action without rate limits, domain restrictions, or time windows. An empty constraints object and a missing constraints key are semantically equivalent.¶
Constraint Precedence Rules:¶
When multiple constraints of the same type exist (e.g., from capability-level and global policy), the following precedence rules apply:
- Numeric constraints (rate limits, size limits): Use the MORE restrictive (lower) value
- Allow-lists (domains_allowed, allowed_methods, allowed_regions): Use intersection
- Block-lists (domains_blocked): Use union
- Time windows: Use intersection of time ranges (narrower window)¶
| Constraint Name | Type | Semantics | Example |
|---|---|---|---|
max_requests_per_hour
|
integer | Fixed hourly quota. Window resets at minute 0 of each hour (clock hour). Failed requests count toward quota. Retries count as new requests. |
50
|
max_requests_per_minute
|
integer | Sliding 60-second window from current request time backwards. Resource Server MUST track request timestamps. |
10
|
max_requests_per_day
|
integer | Fixed daily quota. Window resets at 00:00:00 UTC. Failed requests count toward quota. |
1000
|
Implementation Notes:
- Rate limits are per token (identified by jti claim)
- Resource Servers SHOULD use distributed rate limiting for multi-instance deployments
- On quota exceeded: Resource Server MUST return HTTP 429 with aap_constraint_violation error and a Retry-After header
- Rate limit state SHOULD be cleared when token expires
- Rate limit enforcement MUST use strict UTC timestamps. Clock skew tolerance applies only to token expiration (exp and nbf claims), NOT to rate limit windows¶
domains_allowed (array of strings):DNS suffix matching (rightmost matching).
subdomain.example.org matches example.org
in allowlist. Resource Server MUST extract domain
from request target URL and validate.
Example: ["example.org", "trusted.example"]¶
domains_blocked (array of strings):Blocklist takes precedence over allowlist.
If both are present, blocked domains MUST be
checked first.
Example: ["malicious.example"]¶
ip_ranges_allowed (array of CIDR strings):IP ranges in CIDR notation. Resource Server
validates destination IP of request.
Example: ["192.168.1.0/24"]¶
Domain Matching Algorithm:¶
1. Extract domain from request target URL 2. If domains_blocked is present and domain matches any blocked entry: DENY 3. If domains_allowed is present: a. Check if domain is exact match or has allowed domain as suffix b. If match found: ALLOW (proceed to other constraints) c. If no match: DENY 4. If neither constraint present: proceed to other constraints¶
| Constraint Name | Type | Semantics | Example |
|---|---|---|---|
time_window.start
|
ISO 8601 string | Request timestamp MUST be after or equal to this time (inclusive). Resource Server uses its own clock with max 5-minute skew tolerance. |
"2024-01-01T00:00:00Z"
|
time_window.end
|
ISO 8601 string | Request timestamp MUST be before this time (exclusive). |
"2024-12-31T23:59:59Z"
|
Clock Skew Handling:
- Resource Server clock is authoritative
- Resource Server MAY tolerate up to 5 minutes of clock skew
- If request timestamp is outside window beyond skew tolerance: DENY with aap_constraint_violation¶
| Constraint Name | Type | Semantics | Example |
|---|---|---|---|
max_depth
|
integer (0-10) | Maximum delegation depth for this capability. 0 means no delegation allowed. Resource Server MUST validate delegation.depth <= max_depth. |
2
|
| Constraint Name | Type | Semantics | Example |
|---|---|---|---|
max_response_size
|
integer | Maximum response size in bytes. Resource Server SHOULD enforce during response streaming. |
10485760 (10MB) |
max_request_size
|
integer | Maximum request payload size in bytes. Resource Server MUST validate before processing. |
1048576 (1MB) |
data_classification_max
|
enum string | Maximum data classification level accessible. Values: public, internal, confidential, restricted. Resource Server enforces based on resource classification. |
"internal"
|
allowed_methods
|
array of strings | HTTP methods allowed. Resource Server MUST validate request method against this list. |
["GET", "POST"]
|
allowed_regions
|
array of ISO 3166-1 alpha-2 codes | Geographic regions where requests are allowed. Resource Server validates based on request origin or target resource location. |
["US", "CA", "GB"]
|
The delegation claim tracks authorization delegation across agents and tools using OAuth Token Exchange [RFC8693].¶
Delegation Depth Calculation:¶
depth = 0: Original agent token (no delegation) depth = 1: Token obtained via Token Exchange from depth=0 token depth = n: Token obtained via Token Exchange from depth=n-1 token¶
Authorization Server Requirements:
- AS MUST verify that depth < max_depth in the parent token BEFORE issuing a derived token with depth = parent_depth + 1. That is, the AS MUST reject the Token Exchange request if the parent token's delegation.depth >= delegation.max_depth.
- AS MUST increment delegation.depth by 1 on each Token Exchange
- AS MUST append the current agent/tool identifier to delegation.chain array
- AS MUST copy and preserve delegation.chain from parent token
- AS MUST NOT issue token if resulting depth would exceed capability's max_depth constraint
- AS MUST NOT issue token if resulting depth exceeds delegation.max_depth claim¶
Resource Server Requirements:
- RS MUST reject requests if delegation.depth > delegation.max_depth
- RS MUST validate delegation depth against capability-specific max_depth constraints
- RS MUST validate that delegation.chain length equals delegation.depth + 1¶
Delegation Chain Format:¶
{
"delegation": {
"depth": 2,
"max_depth": 3,
"chain": [
"spiffe://trust.example.com/agent/researcher-01",
"spiffe://trust.example.com/tool/web-scraper",
"https://as.example.com/agents/translator"
],
"parent_jti": "parent-token-jti-value"
}
}
¶
Privilege Reduction Requirements:¶
When issuing a derived token via Token Exchange, the Authorization Server MUST reduce privileges by one or more of:
- Removing capabilities (subset of parent capabilities)
- Adding stricter constraints (lower rate limits, narrower domain lists)
- Reducing token lifetime (shorter exp time)
- Reducing max_depth (limit further delegation)¶
The Authorization Server MUST NOT grant capabilities not present in the parent token.¶
Token Refresh Strategy:¶
AAP tokens, especially delegated tokens with reduced lifetimes, may require refresh before expiration: - Agents SHOULD refresh tokens at 80% of the token's lifetime (e.g., at 48 minutes for a 60-minute token) - Refresh MUST use the same grant type that obtained the original token (Client Credentials Grant for original tokens) - Delegated tokens (obtained via Token Exchange) MUST NOT be refreshed; a new Token Exchange MUST be performed against the parent token - If the parent token has expired, the agent MUST obtain a new original token before performing Token Exchange¶
Preventing Confused Deputy Attacks:¶
To prevent confused deputy attacks where a delegated token is replayed:
- Each token MUST have a unique jti (JWT ID)
- Delegation chain MUST be immutable (copied, never modified)
- Token Exchange MUST record parent_jti linking to parent token
- Authorization Server MAY implement token family revocation (revoking parent revokes all descendants)¶
AAP assumes environments where autonomous AI agents can access APIs, perform chained actions, and operate for extended periods without direct human intervention. The following threats are in scope; for each, agent-specific risks and AAP mitigations are noted.¶
Threat: An attacker obtains agent credentials or steals a token and acts as an authorized agent.¶
Agent-specific risk: An agent may have broad permissions and act many times per minute, amplifying impact.¶
Mitigations: Short-lived tokens; Proof-of-Possession (mTLS or DPoP); attested workload identity when possible; strong agent identity claims (agent.id, agent.model, runtime.attested).¶
Threat: The agent attempts actions beyond what is authorized (e.g. publish instead of create draft).¶
Agent-specific risk: Agents may generate new strategies or calls not anticipated by the developer.¶
Mitigations: Structured capabilities with constraints (not broad scopes); mandatory validation of action + constraints by the Resource Server; task-bound tokens (task.purpose); explicit separation between automatic and human-supervised actions.¶
Threat: A token issued for one task is reused for another (e.g. token for "public health research" used for "extracting sensitive data").¶
Mitigations: Mandatory task claim with purpose; Resource Servers verify consistency between declared purpose and requested operation; short time windows; reject requests that do not match the declared context.¶
Threat: An agent delegates to tools or sub-agents with more privileges than intended.¶
Agent-specific risk: Agent ecosystems are often modular and chained.¶
Mitigations: OAuth Token Exchange with privilege reduction; delegation.depth and delegation.chain claims; maximum depth limit (max_depth); prohibition of delegation for certain critical capabilities.¶
Threat: An authorized agent performs valid actions at harmful volume (spam, abusive scraping, mass resource creation).¶
Mitigations: Quantitative constraints in capabilities (max_requests_per_hour, etc.); enforced by the Resource Server; monitoring and rapid token revocation; mandatory audit with traceability by task and agent.¶
Threat: A third party manipulates external data to induce the agent to use its permissions in unwanted ways.¶
Note: AAP does not control the AI model but can limit impact.¶
Mitigations: Tokens bound to specific purpose; restriction of domains, action types, and volumes; separation of read vs. write vs. execute capabilities; human oversight required for high-impact actions.¶
Threat: Inability to reconstruct which agent did which action under which authorization.¶
Agent-specific risk: Decisions can be complex and chained.¶
Mitigations: Audit claims (audit.trace_id, task.id); mandatory propagation of trace identifiers; inclusion of delegation chain in derived tokens.¶
Threat: A valid token is used from a network, region, or environment other than the one authorized.¶
Mitigations: Context claims (context.network_zone, time windows); additional validation by the Resource Server; combination with traditional network controls.¶
AAP assumes that agents are potentially powerful and highly automated; risk depends not only on who accesses but on purpose, limits, and delegation chain; authorization MUST be contextual, restricted, and auditable. AAP extends OAuth from a broad-permission model toward verifiable operational contracts between organizations, agents, and services.¶
This section defines the validation rules that a Resource Server (RS) MUST apply before accepting a request authenticated with an AAP access token. These rules extend standard OAuth 2.x token validation with agent-specific, task-bound, and capability-aware checks.¶
Recommended Validation Order:¶
Resource Servers SHOULD validate tokens in the following order to fail fast on inexpensive checks:¶
Decode JWT header (reject unknown algorithms)¶
Verify signature using trusted AS public key¶
Check exp (with clock skew tolerance); check nbf if present¶
Check aud matches Resource Server identifier¶
Check iss is a trusted Authorization Server¶
Validate required AAP claims are present (agent, task, capabilities)¶
Validate agent identity (id, type, operator)¶
Validate task binding (id, purpose)¶
Validate delegation chain (depth, chain length) if delegation present¶
Match capability to requested action¶
Enforce capability constraints (rate limits, domains, time windows, etc.)¶
The RS MUST verify the token signature using trusted Authorization Server keys.¶
The RS MUST verify the token has not expired (exp claim) and is within acceptable clock skew.¶
The RS MUST verify the audience (aud) matches the Resource Server.¶
The RS MUST verify the issuer (iss) is trusted.¶
The RS MUST verify the token has not been revoked if a revocation or introspection mechanism is in place ([RFC7009], [RFC7662] when introspection is used).¶
JWKS Caching and Refresh:¶
Resource Servers that obtain AS public keys via JWKS endpoint MUST implement the following caching behavior:
- SHOULD cache JWKS responses for at least 5 minutes to avoid excessive requests
- MUST refresh JWKS when encountering an unknown kid (key ID) in a token header
- SHOULD implement exponential backoff for JWKS refresh failures (starting at 1 second, maximum 5 minutes)
- MUST NOT cache JWKS responses for more than 24 hours
- SHOULD respect HTTP cache control headers (Cache-Control, Expires) from the JWKS endpoint response¶
For AAP tokens, proof-of-possession is RECOMMENDED; for high-risk profiles it SHOULD be REQUIRED. Implementations MUST support at least one of: DPoP [RFC9449] or mTLS client authentication [RFC8705]. If mTLS or DPoP is used, the RS MUST validate that the requester demonstrates possession of the key bound to the token. Bearer-only usage is not sufficient for high-risk agent capabilities.¶
The RS MUST ensure the agent claim is present and well-formed.¶
The RS MUST verify agent.id is recognized or allowed by local policy.¶
If present, the RS MUST evaluate agent.runtime.attested according to local trust requirements.¶
If model information is included, the RS MUST ensure the model identifier is not on a deny list.¶
The RS MUST ensure the task claim is present for agent-issued tokens.¶
The RS MUST verify the current request is consistent with task.purpose.¶
The RS MUST reject requests that clearly fall outside the declared purpose or data sensitivity.¶
The RS MAY enforce that the token is used only within the declared time window.¶
Task Consistency Levels:¶
Implementations SHOULD apply task consistency validation at the following levels:¶
Structural (MUST): task.id and task.purpose are present and non-empty strings.¶
Temporal (SHOULD): If task.created_at is present, it MUST NOT be in the future (beyond clock skew tolerance). If task.expires_at is present, the RS MUST reject tokens for tasks past their expiration.¶
Semantic (MAY): The RS MAY implement application-specific logic to validate that the requested action is plausibly related to task.purpose (e.g., a research purpose should not trigger data.delete actions). This level is implementation-specific and not standardized by this profile.¶
The Resource Server MUST treat the capabilities claim as the authoritative source of permitted actions.¶
The RS MUST match the requested operation to a capability.action entry.¶
The RS MUST enforce all constraints associated with the matching capability.¶
The RS MUST deny the request if no matching capability is found.¶
The RS MUST apply quantitative limits such as rate limits or volume caps defined in constraints.¶
If a delegation claim is present, the RS MUST verify that delegation.depth does not exceed local policy limits.¶
The RS MUST inspect delegation.chain to understand upstream actors.¶
The RS SHOULD apply stricter policy if the chain includes untrusted or unknown actors.¶
The RS MUST ensure delegated tokens do not contain broader capabilities than the original agent token.¶
If any mandatory validation step fails, the RS MUST deny the request.¶
Error responses SHOULD avoid leaking sensitive authorization details.¶
Repeated violations MAY trigger rate limiting or temporary blocking of the agent identity.¶
Error responses: On validation failure, the RS MUST use the following HTTP status codes:¶
| HTTP Status | Error Code | Condition |
|---|---|---|
| 401 Unauthorized |
invalid_token
|
Signature invalid, token expired, audience mismatch, issuer untrusted, missing required claims |
| 403 Forbidden |
aap_invalid_capability
|
No matching capability for requested action |
| 403 Forbidden |
aap_domain_not_allowed
|
Domain constraint violation |
| 403 Forbidden |
aap_capability_expired
|
Time window constraint violation |
| 403 Forbidden |
aap_approval_required
|
Human oversight required |
| 403 Forbidden |
aap_excessive_delegation
|
Delegation depth exceeded |
| 403 Forbidden |
aap_invalid_delegation_chain
|
Malformed delegation chain |
| 403 Forbidden |
aap_task_mismatch
|
Request inconsistent with task purpose |
| 403 Forbidden |
aap_agent_not_recognized
|
Agent identity not recognized by policy |
| 403 Forbidden |
aap_invalid_context
|
Context restriction violated |
| 413 Payload Too Large |
request_too_large
|
Payload exceeds max_request_size constraint |
| 429 Too Many Requests |
aap_constraint_violation
|
Rate limit constraint exceeded |
Note: Rate limit violations MUST return HTTP 429 (Too Many Requests) with a Retry-After header, NOT HTTP 403. Other constraint violations (domain, time window) MUST return HTTP 403.¶
The response body SHOULD follow a structure such as error and optional error_description (e.g. RFC 6749 / RFC 6750 style) without revealing internal authorization details. Avoid including in error_description the exact authorization rule that failed, so as not to leak information to an attacker. See Appendix C for the complete error code reference.¶
An operator defines allowed capabilities and policies for an agent.¶
The agent authenticates with the Authorization Server (e.g. Client Credentials Grant).¶
The agent requests a task-bound access token; optional token exchange (RFC 8693) for delegation or privilege reduction.¶
The Authorization Server issues a JWT containing AAP claims.¶
The agent calls Resource Servers using the token (with DPoP or mTLS when proof-of-possession is required).¶
Resource Servers validate the token and enforce capabilities and constraints.¶
All actions are logged with trace identifiers for audit.¶
AAP is designed as a profile and allows additional claims or constraints to be defined by industry groups or organizations, provided they do not weaken core validation requirements.¶
AAP is designed as a profile on top of OAuth 2.0 and JWT. The following backwards compatibility properties hold:¶
AAP tokens are valid JWTs and MAY be presented to non-AAP Resource Servers. Non-AAP RSes will ignore AAP claims and process only standard JWT claims (iss, sub, aud, exp, iat).¶
Non-AAP RSes MUST NOT be treated as enforcing AAP constraints. The scope claim MAY be included alongside capabilities for backwards compatibility with legacy systems.¶
AAP-aware Resource Servers MUST validate AAP claims when present. If a token contains both scope and capabilities, the RS MUST use capabilities as the authoritative source of permissions and MUST ignore scope for AAP-governed actions.¶
Organizations adopting AAP from traditional OAuth 2.0 SHOULD follow a phased transition:¶
Phase 1 (Dual Issuance): Authorization Server includes both scope and capabilities in tokens. Legacy RSes use scope; AAP-aware RSes use capabilities.¶
Phase 2 (Capabilities Preferred): Resource Servers validate capabilities when present, fall back to scope only for legacy tokens.¶
Phase 3 (Capabilities Required): Remove scope from tokens; require capabilities for all agent-issued tokens.¶
During migration, agents SHOULD request tokens with both scope and capabilities parameters to ensure compatibility with both legacy and AAP-aware Resource Servers.¶
A conforming implementation satisfies the requirements of this profile for its role (Authorization Server or Resource Server).¶
Authorization Server: A conforming AS MUST satisfy all requirements in Section 8. It MUST issue tokens that include the AAP claims required by the deployment profile and MUST support proof-of-possession (DPoP and/or mTLS) when the profile requires it. It SHOULD support token exchange [RFC8693] and revocation [RFC7009] [RFC7662] as appropriate.¶
Resource Server: A conforming RS MUST apply all rules in Section 7 (standard token validation, proof-of-possession when required, agent identity, task binding, capability enforcement, oversight, delegation chain, contextual restrictions, audit and trace propagation, failure handling). It MUST deny requests when any mandatory validation step fails and MUST NOT leak sensitive authorization details in error responses.¶
A conforming implementation MAY support additional claims or options provided they do not weaken the requirements above.¶
This section addresses security considerations specific to AAP beyond those covered in OAuth 2.0 Security Best Current Practice and related standards.¶
Token Signing (REQUIRED):¶
Authorization Servers MUST sign AAP tokens using asymmetric cryptography. The following algorithms are REQUIRED:¶
ES256 (ECDSA with P-256 curve and SHA-256): RECOMMENDED for new deployments¶
RS256 (RSA with SHA-256): REQUIRED for backward compatibility¶
Authorization Servers MUST NOT use symmetric signing algorithms (HS256, HS384, HS512) for AAP tokens. Symmetric algorithms require sharing the signing key between AS and RS, which violates trust boundaries: any RS that validates tokens could forge new ones. Only asymmetric algorithms (ES256, RS256, EdDSA) are permitted.¶
Proof-of-Possession Algorithms:¶
When using DPoP [RFC9449]: - Agents MUST use ES256 for DPoP proof generation - RS256 MAY be supported for legacy clients - DPoP proof lifetime SHOULD be short (maximum 60 seconds)¶
When using mTLS [RFC8705]: - TLS 1.3 REQUIRED; TLS 1.2 MAY be supported with restricted cipher suites - Cipher suites: ECDHE_ECDSA or ECDHE_RSA with AES_GCM - Client certificates MUST be validated against trusted CA or certificate pinning¶
Key Sizes:¶
| Key Type | Minimum | Recommended | Security Level |
|---|---|---|---|
| RSA | 2048-bit | 3072-bit | ~112-bit / ~128-bit |
| ECDSA | P-256 | P-384 | 128-bit / 192-bit |
| Symmetric (client secrets) | 128-bit entropy | 256-bit entropy | 128-bit / 256-bit |
Key Rotation:¶
AS signing keys SHOULD be rotated every 90 days¶
Previous keys MUST be retained for token validation during overlap period (RECOMMENDED: 24 hours after rotation)¶
Resource Servers MUST support validation with multiple concurrent AS public keys¶
Key rotation MUST be coordinated via JWKS (JSON Web Key Set) endpoint [RFC7517]¶
Key Storage:¶
Authorization Server private signing keys MUST be stored in Hardware Security Modules (HSM) or equivalent secure key management services for production deployments¶
Agent client credentials (secrets, private keys) SHOULD be stored in secure vaults (e.g., HashiCorp Vault, cloud KMS)¶
Keys MUST NOT be logged, included in error messages, or transmitted over insecure channels¶
Risk Assessment:¶
Bearer tokens (tokens without proof-of-possession) present elevated risk for autonomous agents due to: - High request rates amplify impact of stolen tokens - Agents may operate unattended for extended periods - Token theft from agent memory or logs enables replay attacks¶
Deployment Profiles:¶
AAP defines three security profiles for proof-of-possession:¶
| Profile | PoP Requirement | Use Case |
|---|---|---|
| Strict | REQUIRED (mTLS or DPoP) | Production systems, confidential data, high-risk capabilities |
| Standard | RECOMMENDED | Development, internal tools, low-risk capabilities |
| Legacy | OPTIONAL | Migration scenarios, backward compatibility |
Profile Selection Criteria:¶
Proof-of-Possession SHOULD be REQUIRED when any of the following apply:
- Capability includes data_classification_max >= "confidential"
- Capability includes write, delete, or execute actions
- oversight.level >= "approval"
- Token lifetime > 1 hour
- Agent accesses resources in different trust domains¶
Token Binding (cnf claim):¶
When PoP is used, tokens MUST include the cnf (confirmation) claim [RFC7800]:¶
For DPoP:¶
{
"cnf": {
"jkt": "0ZcOCORZNYy-DWpqq30jZyJGHTN0d2HglBV3uiguA4I"
}
}
¶
For mTLS:¶
{
"cnf": {
"x5t#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg"
}
}
¶
Resource Servers MUST validate the proof matches the cnf claim before accepting the token.¶
Token Lifetime Guidelines:¶
| Capability Risk Level | Recommended Lifetime | Maximum Lifetime |
|---|---|---|
| Read-only, public data | 60 minutes | 120 minutes |
| Read-only, internal data | 30 minutes | 60 minutes |
| Write, low-risk | 15 minutes | 30 minutes |
| Write, high-risk | 5 minutes | 15 minutes |
| Execute, delete | 5 minutes | 10 minutes |
Token lifetime SHOULD be reduced for: - Derived tokens (via Token Exchange): 50% of parent lifetime - Tokens with high delegation depth: Reduce by 25% per depth level - Tokens without proof-of-possession: 50% of normal lifetime¶
Revocation Requirements:¶
Authorization Servers MUST support token revocation via one or both of: - Revocation endpoint [RFC7009]: Agent or operator can revoke token - Token introspection [RFC7662]: RS queries AS for token validity¶
Rapid Revocation:¶
For the purposes of this specification, "rapid revocation" is defined as: - Maximum 60 seconds from revocation request to enforcement by all Resource Servers - Authorization Server MUST distribute revocation events to Resource Servers within 30 seconds - Resource Server MUST apply revocation updates within 30 seconds of receipt¶
Revocation Distribution:¶
For multi-RS deployments, AS SHOULD use: - Push-based revocation (AS pushes to RS) rather than pull-based (RS polls AS) - Revocation event stream (e.g., Server-Sent Events, WebSockets, message queue) - Fallback to token introspection if revocation list fails to propagate¶
Token Family Revocation:¶
When a token is revoked:
- Authorization Server MAY revoke all descendant tokens (derived via Token Exchange)
- This is achieved by tracking parent_jti linkage
- Token family revocation enhances security but requires AS to maintain token graph¶
Server-Side Enforcement (REQUIRED):¶
All capability constraints MUST be enforced by the Resource Server, NOT trusted to agent logic. Agents are potentially adversarial; they may attempt to bypass constraints.¶
Rate Limiting in Distributed Systems:¶
For Resource Servers deployed across multiple instances: - Rate limits MUST be enforced consistently across all instances - Use distributed rate limiting (e.g., Redis, shared counter service) - Accept eventual consistency with conservative limits (deny when uncertain)¶
Constraint Validation Failures:¶
When a constraint is violated, Resource Server MUST:
- Return HTTP 403 (Forbidden) or 429 (Too Many Requests) as appropriate
- Include error code aap_constraint_violation in response
- Log violation event with agent.id, task.id, violated constraint
- NOT return details of constraint values in error response (privacy)¶
Privilege Reduction (REQUIRED):¶
When issuing derived tokens via Token Exchange [RFC8693], the Authorization Server MUST reduce privileges by one or more of:
- Capability removal: Subset of parent capabilities only
- Constraint tightening: Lower rate limits, narrower domain lists, shorter time windows
- Lifetime reduction: Shorter exp time than parent token
- Depth limit reduction: Lower max_depth to limit further delegation¶
The Authorization Server MUST NOT grant capabilities not present in the parent token. "Privilege escalation via delegation" MUST be prevented.¶
Delegation Depth Enforcement:¶
Both Authorization Server and Resource Server MUST enforce delegation depth limits:
- AS MUST NOT issue token if resulting delegation.depth would exceed delegation.max_depth
- RS MUST reject requests if delegation.depth > delegation.max_depth
- Defense-in-depth: Both layers validate to prevent bypass¶
Confused Deputy Prevention:¶
To prevent confused deputy attacks where delegation chains are replayed:
- Each token MUST have unique jti (JWT ID)
- Derived tokens MUST include delegation.parent_jti linking to parent token
- AS MUST validate parent token exists and is not expired/revoked before issuing derived token
- Delegation chain MUST be immutable (copied and appended, never modified by client)¶
Approval Workflow Security:¶
When oversight.requires_human_approval_for includes an action:
- Resource Server MUST NOT execute action automatically
- RS MUST return HTTP 403 with error code aap_approval_required
- Response SHOULD include approval_reference URL for requesting approval
- Approval mechanism is out of scope for AAP but may use OIDC step-up authentication, external workflow systems, etc.¶
Approval Bypass Prevention:¶
Input Validation:¶
Resource Servers MUST validate:
- Token signature with trusted AS public key
- Token expiration (exp) with acceptable clock skew (RECOMMENDED: <=5 minutes)
- Audience (aud) matches Resource Server identifier
- Agent identity (agent.id) is recognized or allowed by policy
- All constraints in matching capability¶
Error Handling (Privacy-Preserving):¶
Resource Servers MUST NOT leak authorization details in error responses:¶
Bad (leaks constraint values):¶
{
"error": "aap_constraint_violation",
"error_description": "Rate limit exceeded"
}
¶
Good (privacy-preserving):¶
{
"error": "aap_constraint_violation",
"error_description": "Request violates capability constraints"
}
¶
Detailed violation information SHOULD be logged server-side for audit, not returned to client.¶
Agents and intermediaries MAY cache tokens for reuse within their lifetime. The following security guidance applies:¶
Tokens SHOULD be stored in memory only and MUST NOT be persisted to disk in plaintext¶
Cached tokens SHOULD be evicted before expiration (at 80% of remaining lifetime) to avoid using tokens that may expire during a request¶
Token caches MUST be cleared on process termination¶
Delegated tokens MUST NOT be cached longer than their parent token's expiration¶
Agents MUST NOT share cached tokens across different task contexts¶
When an AS signing key is compromised or suspected of compromise, the following incident response procedure SHOULD be followed:¶
Immediate rotation: Generate and deploy a new key pair. Update the JWKS endpoint to include the new key.¶
JWKS update: Publish updated JWKS with the new key. The compromised kid SHOULD be removed from the JWKS endpoint or marked with a revocation indicator.¶
RS propagation: All Resource Servers MUST refresh their JWKS cache within the cache TTL. RSes SHOULD treat tokens signed with the compromised kid as invalid.¶
Token invalidation: All outstanding tokens signed with the compromised key SHOULD be considered invalid. If token introspection is in use, the AS MUST return active: false for tokens signed with the compromised key.¶
Agent notification: Agents MUST request new tokens after key rotation. The AS SHOULD reject new token requests until the rotation is complete.¶
Organizations SHOULD have a documented key compromise response plan and SHOULD test it periodically.¶
AAP token validation is computationally more expensive than standard OAuth due to larger JWT payloads, multiple validation steps (agent, task, delegation, capabilities), and stateful constraint enforcement (rate limiting).¶
Resource Servers SHOULD implement the following DoS mitigations: - Reject tokens larger than 16KB before parsing (pre-validation size limit) - Rate-limit the number of token validation attempts per source IP - Cache validation results for recently-seen JTIs (with TTL equal to remaining token lifetime) to avoid re-validating the same token - Implement circuit breakers for JWKS endpoint requests to prevent cascading failures when the AS is unavailable¶
Authorization Servers SHOULD: - Rate-limit the token endpoint itself (per client, per IP) - Monitor and alert on anomalous token issuance patterns (sudden volume spikes, unusual capability combinations)¶
Token Logging:¶
Tokens MUST NOT be logged in plaintext in application logs¶
Use token redaction in logging libraries (replace with hash or truncated value)¶
If logging is necessary for debugging, use separate secure audit log with strict access control¶
Clock Skew:¶
Resource Servers SHOULD tolerate up to 5 minutes of clock skew for exp and nbf validation¶
Skew tolerance MUST NOT exceed 5 minutes (to limit window for expired token use)¶
Organizations SHOULD use NTP or equivalent for clock synchronization¶
Compliance Considerations:¶
AAP enables compliance with regulations requiring: - Explicit authorization (GDPR Article 6) - Purpose limitation (GDPR Article 5) - Audit trails (SOC 2, ISO 27001, HIPAA) - Access controls (PCI-DSS, FedRAMP)¶
However, AAP alone is not sufficient for compliance; organizational policies, procedures, and controls are also required.¶
AAP tokens and audit logs may contain information that could identify agents, organizations, individuals, or sensitive operational details. This section provides guidance on privacy protection in AAP implementations.¶
AAP tokens MAY contain personal data under GDPR, CCPA, and similar privacy regulations:¶
Potentially Personal Claims:
- agent.operator: Organization identifier (may be personal if sole proprietor or individual developer)
- task.created_by: User ID who initiated the task
- task.purpose: May contain user-identifying details if not carefully crafted
- audit.trace_id: Potentially correlatable across requests (tracking)
- delegation.chain: Reveals agent interaction patterns and organizational structure
- context.location: Geographic location information¶
Data Controller and Processor: - Authorization Server operator is typically the data controller for token claims - Resource Server operators are data processors when validating tokens - Delegation across organizations may create complex controller/processor relationships¶
Implementations SHOULD apply the principle of data minimization (GDPR Article 5(1)(c)):¶
Guideline: Include Only What Is Necessary¶
| Claim | Privacy-Preserving Approach | Privacy-Risky Approach |
|---|---|---|
agent.id
|
Use pseudonymous ID: urn:uuid:550e8400-...
|
Use descriptive name: agent-for-alice@example.com
|
task.id
|
Use UUID: 550e8400-e29b-41d4-...
|
Use descriptive ID: task-research-for-alice-project-secret
|
task.purpose
|
Use category: research or content-creation
|
Use full description: Research climate data for Alice's PhD thesis on...
|
task.created_by
|
Use pseudonymous ID: user:u123456
|
Use email: alice.smith@example.com
|
audit.trace_id
|
Use per-task UUID (rotated) | Use stable agent-wide ID (enables long-term correlation) |
Unnecessary Claims SHOULD Be Omitted:
- Don't include agent.name if agent.id is sufficient for authorization
- Don't include task.metadata unless necessary for constraint enforcement
- Don't include context.location.ip_address unless geofencing is required¶
Token Retention:
- Tokens expire per exp claim (typically minutes to hours)
- Expired tokens SHOULD be immediately discarded by agents
- Tokens SHOULD NOT be persisted to disk (memory-only storage)¶
Audit Log Retention: - Audit logs SHOULD follow organizational retention policy - Minimum retention: As required by compliance framework (e.g., SOC 2: 1 year) - Maximum retention: Only as long as necessary for audit and investigation - After retention period: Logs MUST be securely deleted or anonymized¶
Delegation Chain Retention: - Delegation chains SHOULD NOT be retained in logs beyond audit window - When logging delegation events, consider hashing agent IDs rather than storing plaintext¶
Right to Erasure (GDPR Article 17):
- If task.created_by contains personal data, organizations MUST support erasure requests
- Consider using pseudonymous IDs that can be de-linked from personal data
- Audit logs may be exempt from erasure if required for legal compliance; consult legal counsel¶
Threat: Malicious Resource Servers in different organizations could correlate requests across services using stable identifiers in AAP tokens (e.g., audit.trace_id, agent.id).¶
Impact: - Agent behavior profiling (what capabilities, what resources, what patterns) - Competitive intelligence (infer agent strategies from request patterns) - Privacy violation (correlate agent activity across unrelated services)¶
Mitigations:¶
Trace ID Rotation (REQUIRED for Cross-Domain):
- When token audience changes trust domain, generate new audit.trace_id
- Example: Token for api.example.com has trace_id: abc123; delegated token for external.example has trace_id: xyz789
- Correlation within single organization preserved; cross-organization correlation prevented¶
Domain-Specific Agent IDs:
- Use different agent.id per Resource Server trust domain
- Example: Agent presents agent:internal-001 to internal APIs, agent:partner-facing-alpha to partner APIs
- Authorization Server maintains mapping; Resource Servers see domain-specific IDs¶
Minimize Identifiable Information in Delegated Tokens:
- When delegating to external tool, remove non-essential claims
- Example: Strip task.created_by, context.location when crossing trust boundary
- Token Exchange request SHOULD specify required_claims (minimal set)¶
Trace ID Scope Claim (RECOMMENDED):¶
{
"audit": {
"trace_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id_scope": "task"
}
}
¶
This signals the intended correlation boundary:
- task: Trace ID unique per task (rotated between tasks)
- session: Trace ID unique per agent session (rotated on agent restart)
- agent: Trace ID stable for agent lifetime (enables long-term correlation; privacy-risky)
- domain: Trace ID unique per trust domain (rotated when crossing domains)¶
Resource Servers MUST NOT leak authorization details in error responses that could enable privacy violations or capability profiling.¶
Avoid: - "Agent does not have capability 'delete.data'" (reveals capabilities) - "Rate limit: 51 requests, max allowed 50" (reveals constraint values) - "Domain blocked: malicious.example is in blocklist" (reveals policy details) - "Task purpose 'research for Alice' does not match action 'publish'" (reveals task details)¶
Prefer: - "Insufficient permissions" (generic, privacy-preserving) - "Request violates capability constraints" (doesn't specify which constraint) - "Authorization failed" (minimal information disclosure)¶
Detailed Error Information: - Log server-side with full details (for audit and debugging) - Include error correlation ID in response for support tickets - Client can reference correlation ID when contacting support; support team accesses server logs¶
Example Privacy-Preserving Error Response:¶
{
"error": "insufficient_permissions",
"error_description": "The request could not be authorized",
"error_correlation_id": "err-550e8400-e29b-41d4-a716-446655440000"
}
¶
Server log (not returned to client):¶
{
"error_correlation_id": "err-550e8400-e29b-41d4-a716-446655440000",
"error": "aap_constraint_violation",
"constraint_violated": "domains_allowed",
"requested_domain": "malicious.example",
"allowed_domains": ["example.org"],
"agent_id": "agent-researcher-01",
"task_id": "task-12345",
"timestamp": "2024-01-01T12:00:00Z"
}
¶
Pseudonymization (GDPR Article 4(5)):¶
Pseudonymization is the processing of personal data such that it can no longer be attributed to a specific data subject without additional information (kept separately and secured).¶
AAP Pseudonymization Techniques:¶
| Data Type | Pseudonymization Approach |
|---|---|
User IDs (task.created_by) |
Use UUID mapped to real user ID in separate database |
| Agent names | Use agent:0001 instead of agent-for-alice
|
| Task purposes | Use task category codes instead of free-text descriptions |
| Trace IDs | Use cryptographic hash of (user ID + task ID + salt) |
Anonymization (Irreversible):¶
For audit logs past retention period:
- Replace agent.id with hash (if agent identity no longer needed)
- Remove task.created_by entirely
- Aggregate statistics (e.g., "1000 requests by research agents") instead of individual records¶
Agent Operator Transparency:¶
When an agent acts on behalf of a human user: - User SHOULD be informed that an agent will perform actions - User SHOULD be shown the task purpose and capabilities granted - User SHOULD be able to review and revoke agent authorizations¶
Example User Notification:¶
Your request to "research climate change impacts" has been assigned to an AI agent. The agent will be able to: - Search web resources from example.org (max 50 requests/hour) - Create draft articles in the CMS The agent will NOT be able to: - Publish articles (requires your approval) - Access data outside example.org - Perform actions unrelated to research You can revoke this authorization at any time in your account settings.¶
Token Transparency:¶
For compliance with transparency requirements (GDPR Article 13-14): - Organizations SHOULD document what claims are included in AAP tokens - Organizations SHOULD inform users when their actions trigger agent authorization - Organizations SHOULD provide access to audit logs (subject to security and legal constraints)¶
When delegating to third-party tools (external organizations):¶
Data Sharing Agreement: - Delegation to external tool constitutes data sharing - Organizations SHOULD have data processing agreements (DPAs) with tool providers - Token Exchange to external AS SHOULD trigger data sharing notification/consent¶
Claim Filtering:
- Authorization Server SHOULD filter claims when delegating to external tool
- Remove non-essential claims: task.created_by, agent.operator internal details
- Retain only authorization-essential claims: capabilities, delegation.depth¶
Example Filtered Delegation:¶
Original token (internal):¶
{
"agent": {
"id": "agent-001",
"operator": "org:acme-corp"
},
"task": {
"id": "task-123",
"purpose": "research",
"created_by": "user:alice"
},
"capabilities": [
{"action": "search.web"}
]
}
¶
Delegated token (external tool):¶
{
"agent": {
"id": "delegated-from:acme-corp",
"operator": "org:acme-corp"
},
"task": {
"id": "task-123-external",
"purpose": "research"
},
"capabilities": [
{
"action": "search.web",
"constraints": {
"domains_allowed": ["example.org"]
}
}
],
"delegation": {
"depth": 1,
"chain": ["agent-001", "external-tool"]
}
}
¶
For Authorization Server Implementations:¶
Default to short trace ID rotation (per-task, not per-agent)¶
Provide configuration options for privacy levels (minimal, standard, full disclosure)¶
Support claim filtering on Token Exchange¶
Log privacy-impacting events (cross-domain delegation, long trace ID retention)¶
For Resource Server Implementations:¶
Never log tokens in plaintext¶
Redact personal data in error responses¶
Provide audit log access controls (only authorized personnel)¶
Support audit log anonymization after retention period¶
For Agent Implementations:¶
GDPR Compliance: - AAP supports GDPR principles: purpose limitation (task binding), data minimization (constrained capabilities), accountability (audit logs) - Organizations MUST implement additional controls: consent management, data subject rights, DPIAs¶
CCPA Compliance: - AAP audit logs may constitute "personal information" if they identify consumers - Organizations MUST support consumer rights: access, deletion, opt-out of sale - Consider using pseudonymous IDs to reduce CCPA applicability¶
HIPAA Compliance (Healthcare): - AAP tokens accessing Protected Health Information (PHI) MUST use proof-of-possession - Audit logs MUST meet HIPAA retention requirements (6 years) - Delegation chains provide required access audit trail¶
Note: AAP is an authorization protocol, not a complete privacy framework. Organizations MUST implement privacy policies, procedures, and controls beyond AAP technical mechanisms.¶
This document registers the following claim names in the IANA "JSON Web Token Claims" registry established by [RFC7519].¶
The following claims are registered per the "Specification Required" policy defined in [RFC7519] Section 10.1:¶
| Claim Name | Claim Description | Change Controller | Reference |
|---|---|---|---|
agent
|
Agent identity and metadata | IETF | [this document] Section 5.1 |
task
|
Task binding information | IETF | [this document] Section 5.2 |
capabilities
|
Granted capabilities with constraints | IETF | [this document] Section 5.3 |
delegation
|
Delegation chain tracking | IETF | [this document] Section 5.4 |
oversight
|
Human oversight requirements | IETF | [this document] Section 5.8 |
audit
|
Audit and tracing metadata | IETF | [this document] Section 5.9 |
context
|
Execution context restrictions | IETF | [this document] Section 5.10 |
This document registers the following error codes in the OAuth Extensions Error Registry:¶
| Error Code | Usage Location | Protocol Extension | Reference |
|---|---|---|---|
aap_invalid_capability
|
Resource access error response | AAP | [this document] Appendix C |
aap_constraint_violation
|
Resource access error response | AAP | [this document] Appendix C |
aap_approval_required
|
Resource access error response | AAP | [this document] Appendix C |
aap_excessive_delegation
|
Resource access error response | AAP | [this document] Appendix C |
aap_domain_not_allowed
|
Resource access error response | AAP | [this document] Appendix C |
aap_task_mismatch
|
Resource access error response | AAP | [this document] Appendix C |
aap_agent_not_recognized
|
Resource access error response | AAP | [this document] Appendix C |
aap_invalid_delegation_chain
|
Resource access error response | AAP | [this document] Appendix C |
aap_capability_expired
|
Resource access error response | AAP | [this document] Appendix C |
aap_invalid_context
|
Resource access error response | AAP | [this document] Appendix C |
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942].¶
Organization: AAP Project¶
Implementation: Python reference implementation (Authorization Server + Resource Server)¶
Description: Complete implementation of AAP token issuance, Token Exchange, and Resource Server validation with constraint enforcement¶
Maturity: Alpha¶
Coverage: All MUST-level requirements in Sections 7 and 8¶
Licensing: Apache 2.0¶
Contact: See project repository¶
URL: See /reference-impl/ in the project repository¶
A comprehensive test vector suite is available for interoperability testing: - 15 test vector files covering valid tokens, invalid tokens, constraint violations, and edge cases - 80+ individual test cases - Coverage of all specification sections referenced in Sections 5, 7, and 8¶
Implementations SHOULD pass all test vectors in valid-tokens/ and edge-cases/ categories. Implementations MUST correctly reject all test vectors in invalid-tokens/ and constraint-violations/ categories with the specified error codes.¶
This appendix provides links to the complete JSON Schema definitions for AAP tokens. These schemas are normative and MUST be used for validation in conforming implementations.¶
All schemas are available in the /schemas directory of the reference implementation repository:¶
aap-token.schema.json - Root schema for complete AAP token payload¶
aap-agent.schema.json - Schema for agent claim¶
aap-task.schema.json - Schema for task claim¶
aap-capabilities.schema.json - Schema for capabilities array¶
aap-constraints.schema.json - Schema for constraint objects¶
aap-oversight.schema.json - Schema for oversight claim¶
aap-delegation.schema.json - Schema for delegation claim¶
aap-context.schema.json - Schema for context claim¶
aap-audit.schema.json - Schema for audit claim¶
JSON Schema Version: All schemas use JSON Schema Draft 2020-12.¶
Validation Example (Node.js with Ajv):¶
const Ajv = require('ajv');
const addFormats = require('ajv-formats');
const ajv = new Ajv();
addFormats(ajv);
// Load all schemas
const schemas = {
token: require('./schemas/aap-token.schema.json'),
agent: require('./schemas/aap-agent.schema.json'),
task: require('./schemas/aap-task.schema.json'),
};
// Add referenced schemas
ajv.addSchema(schemas.agent);
ajv.addSchema(schemas.task);
// Validate token
const validate = ajv.compile(schemas.token);
const valid = validate(decodedJWT);
if (!valid) {
console.error('Validation errors:', validate.errors);
}
¶
Validation Example (Python with jsonschema):¶
import jsonschema
import json
# Load schemas
with open('schemas/aap-token.schema.json') as f:
token_schema = json.load(f)
# Create resolver for $ref
store = {}
for schema_file in ['aap-agent.schema.json', 'aap-task.schema.json']:
with open(f'schemas/{schema_file}') as f:
store[schema_file] = json.load(f)
resolver = jsonschema.RefResolver.from_schema(
token_schema, store=store)
# Validate
try:
jsonschema.validate(decoded_jwt, token_schema, resolver=resolver)
print("Token is valid")
except jsonschema.ValidationError as e:
print(f"Validation error: {e.message}")
¶
When the AAP specification is updated:
- Schema version will be incremented in the $id field
- Breaking changes will trigger new major version
- Non-breaking additions (new optional fields) will increment minor version
- Implementations SHOULD validate against the schema version matching the specification version¶
This appendix provides a detailed example of OAuth 2.0 Token Exchange [RFC8693] for AAP delegation scenarios.¶
A research agent (Agent A) needs to delegate web scraping capability to a specialized tool (Tool B):¶
Request to Authorization Server:¶
POST /token HTTP/1.1 Host: as.example.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_id=agent-researcher-01 &client_secret=[SECRET] &scope=aap:research¶
Authorization Server Response:¶
{
"access_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "aap:research"
}
¶
Decoded Token Payload (Original):¶
{
"iss": "https://as.example.com",
"sub": "agent-researcher-01",
"aud": "https://api.example.com",
"exp": 1704067200,
"iat": 1704063600,
"jti": "token-original-123",
"agent": {
"id": "agent-researcher-01",
"type": "llm-autonomous",
"operator": "org:acme-corp"
},
"task": {
"id": "task-123",
"purpose": "research_climate_data"
},
"capabilities": [
{
"action": "search.web",
"constraints": {
"domains_allowed": ["example.org", "trusted.example"],
"max_requests_per_hour": 100
}
},
{
"action": "cms.create_draft"
}
],
"delegation": {
"depth": 0,
"max_depth": 2,
"chain": ["agent-researcher-01"]
}
}
¶
Token Exchange Request:¶
POST /token HTTP/1.1 Host: as.example.com Content-Type: application/x-www-form-urlencoded grant_type=urn:ietf:params:oauth:grant-type:token-exchange &subject_token=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9... &subject_token_type=urn:ietf:params:oauth:token-type:access_token &resource=https://tool-scraper.example.com &scope=aap:research.scraping &requested_token_type=urn:ietf:params:oauth:token-type:access_token¶
Key Parameters:
- grant_type: Token Exchange grant type
- subject_token: The original AAP token (from Step 1)
- resource: Intended audience for derived token (Tool B)
- scope: Reduced scope for delegation¶
Authorization Server Processing:¶
Validate subject_token (signature, expiration, issuer)¶
Extract delegation depth from subject token: depth = 0¶
Check if delegation allowed: depth < max_depth (0 < 2) PASS¶
Determine reduced capabilities:¶
Reduce token lifetime: 3600s -> 1800s (50% reduction for delegated token)¶
Increment delegation depth: 0 -> 1¶
Append to delegation chain: ["agent-researcher-01"] -> ["agent-researcher-01", "tool-web-scraper"]¶
Record parent_jti: token-original-123¶
Generate new jti: token-delegated-456¶
Sign and issue derived token¶
Authorization Server Response:¶
{
"access_token": "eyJhbGciOiJFUzI1NiJ9...",
"issued_token_type": "urn:ietf:params:oauth:token-type:access_token",
"token_type": "Bearer",
"expires_in": 1800,
"scope": "aap:research.scraping"
}
¶
Decoded Token Payload (Derived):¶
{
"iss": "https://as.example.com",
"sub": "agent-researcher-01",
"aud": "https://tool-scraper.example.com",
"exp": 1704065400,
"iat": 1704063600,
"jti": "token-delegated-456",
"agent": {
"id": "agent-researcher-01",
"type": "llm-autonomous",
"operator": "org:acme-corp"
},
"task": {
"id": "task-123",
"purpose": "research_climate_data"
},
"capabilities": [
{
"action": "search.web",
"constraints": {
"domains_allowed": ["example.org"],
"max_requests_per_hour": 50
}
}
],
"delegation": {
"depth": 1,
"max_depth": 2,
"chain": [
"agent-researcher-01",
"tool-web-scraper"
],
"parent_jti": "token-original-123",
"privilege_reduction": {
"capabilities_removed": ["cms.create_draft"],
"constraints_added": [],
"lifetime_reduced_by": 1800
}
}
}
¶
| Field | Change |
|---|---|
aud
|
Changed to tool audience |
exp
|
Lifetime reduced 50% |
jti
|
New unique ID |
capabilities
|
Removed cms.create_draft
|
domains_allowed
|
Narrowed to example.org only |
max_requests_per_hour
|
Reduced from 100 to 50 |
delegation.depth
|
Incremented from 0 to 1 |
delegation.chain
|
Tool appended |
delegation.parent_jti
|
Parent link added |
The Authorization Server applied the principle of least privilege by:¶
Capability Removal: Tool doesn't need cms.create_draft (CMS access) for scraping task¶
Constraint Tightening: Reduced rate limit from 100 to 50 requests/hour¶
Domain Narrowing: Removed trusted.example from allowed domains (tool only accesses example.org)¶
Lifetime Reduction: 1800s instead of 3600s (shorter validity window reduces risk)¶
These reductions ensure that if the tool is compromised or malicious, damage is limited to the specific delegated capabilities and constraints.¶
If Tool B needs to delegate to another tool (e.g., HTML parser), it can repeat the Token Exchange process:¶
This appendix defines error codes specific to AAP authorization failures, extending the OAuth 2.0 error code registry.¶
aap_invalid_capability (403):No matching capability for requested action.
Example: Agent has search.web but requests cms.publish.¶
aap_constraint_violation (429 or 403):Capability constraint violated.
Example: 51st request when max_requests_per_hour is 50.¶
aap_task_mismatch (403):Request inconsistent with task purpose. Example: Token for "research" task used for data deletion.¶
aap_approval_required (403):Action requires human approval.
Example: cms.publish listed in
oversight.requires_human_approval_for.¶
aap_excessive_delegation (403):Delegation depth exceeded. Example: Token with depth=3 when max_depth=2.¶
aap_invalid_context (403):Context restriction violated.
Example: Request outside time_window or from blocked region.¶
aap_domain_not_allowed (403):Target domain not in allowlist.
Example: Request to malicious.example when
domains_allowed is ["example.org"].¶
aap_agent_not_recognized (403):Agent identity not recognized by policy.
Example: Unknown agent.id value.¶
aap_invalid_delegation_chain (403):Delegation chain validation failed. Example: Chain length does not match depth, or parent token is invalid.¶
aap_capability_expired (403):Time-based capability expired.
Example: Request after time_window.end.¶
AAP error responses SHOULD follow OAuth 2.0 error response format [RFC6749] Section 5.2 with AAP-specific error codes:¶
{
"error": "aap_constraint_violation",
"error_description": "The request violates capability constraints",
"error_uri": "https://aap.example/errors#constraint-violation"
}
¶
Privacy Consideration: Error descriptions SHOULD be generic and MUST NOT leak constraint values, agent details, or policy information. Detailed errors SHOULD be logged server-side only.¶
Example 1: Rate Limit Exceeded¶
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 3600
{
"error": "aap_constraint_violation",
"error_description": "Rate limit exceeded for this capability"
}
¶
Example 2: Domain Not Allowed¶
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "aap_domain_not_allowed",
"error_description": "Domain not in allowed list"
}
¶
Example 3: Approval Required¶
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "aap_approval_required",
"error_description": "This action requires human approval",
"approval_reference": "https://approve.example.com/task-123"
}
¶
When receiving AAP error codes, agents SHOULD:¶
aap_constraint_violation with 429: Respect Retry-After header; back off requests¶
aap_approval_required: Present approval_reference to operator for human approval¶
aap_invalid_capability: Do not retry; request new token with correct capabilities¶
aap_excessive_delegation: Do not attempt further delegation; use current token directly¶
aap_domain_not_allowed: Validate domains before requests to avoid repeated errors¶
Agents MUST NOT attempt to bypass errors by modifying tokens (signature validation will fail).¶
This appendix provides implementation checklists for Authorization Servers and Resource Servers to verify AAP conformance.¶
An AAP-conformant Resource Server MUST implement the following:¶
Standard Token Validation:¶
Validates token signature using AS public key (via JWKS)¶
Validates token expiration (exp claim) with acceptable clock skew (<=5 minutes)¶
Validates audience (aud claim) matches Resource Server identifier¶
Validates issuer (iss claim) is trusted Authorization Server¶
Checks token revocation status (if revocation mechanism in place)¶
Proof-of-Possession Validation:¶
Validates DPoP proof if cnf.jkt present in token¶
Validates mTLS client certificate if cnf.x5t#S256 present in token¶
Rejects bearer tokens if proof-of-possession is required by policy¶
Agent Identity Validation:¶
Validates agent claim is present and well-formed¶
Validates agent.id is recognized or allowed by local policy¶
Validates agent.runtime.attested if required by policy¶
Rejects tokens with agents on deny list¶
Task Binding Validation:¶
Validates task claim is present¶
Validates requested action is consistent with task.purpose¶
Rejects requests that clearly fall outside declared purpose¶
Enforces time window if task.expires_at is present¶
Capability Enforcement:¶
Matches requested operation to capability.action entry¶
Uses exact string matching for action names (case-sensitive)¶
Denies request if no matching capability found (returns aap_invalid_capability)¶
Enforces ALL constraints in matching capability (AND semantics)¶
Constraint Enforcement:¶
Enforces max_requests_per_hour (fixed window, resets at minute 0)¶
Enforces max_requests_per_minute (sliding 60-second window)¶
Enforces domains_allowed (DNS suffix matching, rightmost)¶
Enforces domains_blocked (takes precedence over allowlist)¶
Enforces time_window (inclusive start, exclusive end)¶
Enforces max_depth for delegation¶
Uses distributed rate limiting for multi-instance deployments¶
Oversight Enforcement:¶
Checks if action in oversight.requires_human_approval_for¶
Returns HTTP 403 with aap_approval_required if approval needed¶
Includes approval_reference in error response¶
Delegation Validation:¶
Validates delegation.depth <= delegation.max_depth¶
Validates delegation.chain length equals depth + 1¶
Validates delegation depth against capability-specific max_depth constraints¶
Error Handling:¶
Returns privacy-preserving error messages (no constraint values, agent details)¶
Returns appropriate HTTP status codes (401, 403, 429)¶
Returns AAP-specific error codes (Appendix C)¶
Logs detailed error information server-side (not in response)¶
Audit and Logging:¶
Authorization Server:¶
Supports multiple token lifetimes based on risk level¶
Supports dynamic rate limit adjustment¶
Implements behavioral anomaly detection¶
Provides policy approval workflow (draft -> review -> active)¶
Supports claim filtering on Token Exchange (privacy)¶
Resource Server:¶
Organizations SHOULD test conformance using: - Test Vectors: Validate against AAP test vectors (valid and invalid tokens) - Interoperability Tests: Verify interoperability with reference implementations - Security Audits: Third-party security review of AS and RS implementations - Compliance Scans: Automated conformance checking tools¶
Operator Policy (JSON format):¶
{
"policy_id": "policy-research-agents-v1",
"policy_version": "1.0",
"applies_to": {
"agent_type": "llm-autonomous",
"operator": "org:acme-corp"
},
"allowed_capabilities": [
{
"action": "search.web",
"default_constraints": {
"domains_allowed": ["example.org", "trusted.example"],
"max_requests_per_hour": 100,
"max_requests_per_minute": 10
}
},
{
"action": "cms.create_draft",
"default_constraints": {
"max_requests_per_hour": 20
}
},
{
"action": "cms.publish",
"requires_oversight": true
}
],
"global_constraints": {
"token_lifetime": 3600,
"max_delegation_depth": 2,
"require_pop": true
},
"oversight": {
"level": "approval",
"requires_human_approval_for": [
"cms.publish", "data.delete"
],
"approval_reference": "https://approve.example.com/agents"
},
"audit": {
"log_level": "full",
"retention_period_days": 90,
"compliance_framework": ["SOC2", "GDPR"]
}
}
¶
def validate_aap_token(token, request):
# 1. Standard OAuth validation
if not verify_signature(token, AS_PUBLIC_KEY):
raise InvalidSignature()
if token.exp < now():
raise TokenExpired()
if token.aud != RESOURCE_SERVER_ID:
raise InvalidAudience()
# 2. Proof-of-possession (if required)
if REQUIRE_POP:
if 'cnf' not in token:
raise ProofOfPossessionRequired()
validate_pop(token.cnf, request)
# 3. Agent identity
if token.agent.id not in ALLOWED_AGENTS:
raise AgentNotRecognized()
# 4. Task binding
if not is_consistent(request.action, token.task.purpose):
raise TaskMismatch()
# 5. Capability matching
matching_cap = find_capability(
token.capabilities, request.action)
if not matching_cap:
raise NoMatchingCapability()
# 6. Constraint enforcement
enforce_constraints(matching_cap.constraints, request, token)
# 7. Oversight
approvals = token.oversight.requires_human_approval_for
if request.action in approvals:
ref = token.oversight.approval_reference
raise ApprovalRequired(ref)
# 8. Delegation depth
depth = token.delegation.depth
if depth > token.delegation.max_depth:
raise ExcessiveDelegation()
# 9. Audit logging
log_authorized_request(
token.agent.id, token.task.id,
request.action)
return AUTHORIZED
def enforce_constraints(constraints, request, token):
# Rate limiting
if 'max_requests_per_hour' in constraints:
hourly = constraints.max_requests_per_hour
if get_hourly_count(token.jti) >= hourly:
raise RateLimitExceeded()
increment_hourly_count(token.jti)
# Domain allowlist
if 'domains_allowed' in constraints:
domain = extract_domain(request.target_url)
allowed = constraints.domains_allowed
if not domain_matches_allowlist(domain, allowed):
raise DomainNotAllowed()
# Time window
if 'time_window' in constraints:
tw = constraints.time_window
if not (tw.start <= now() < tw.end):
raise OutsideTimeWindow()
# Additional constraints...
¶
This appendix provides canonical test vectors for validating AAP implementations. A complete test vector suite is maintained separately (see Section 15.2). The examples below are normative and illustrate key validation scenarios.¶
The following JWT payload represents a valid AAP token for a research agent with web search capability:¶
{
"iss": "https://as.example.com",
"sub": "agent-researcher-01",
"aud": "https://api.example.com",
"exp": 1735689600,
"iat": 1735686000,
"jti": "tv-valid-basic-001",
"agent": {
"id": "agent-researcher-01",
"type": "llm-autonomous",
"operator": "org:acme-corp"
},
"task": {
"id": "task-research-001",
"purpose": "research"
},
"capabilities": [
{
"action": "search.web",
"constraints": {
"domains_allowed": ["example.org", "trusted.example"],
"max_requests_per_hour": 100
}
}
],
"delegation": {
"depth": 0,
"max_depth": 2,
"chain": ["agent-researcher-01"]
}
}
¶
Expected Results:
- Request to search.web targeting example.org: AUTHORIZED
- Request to search.web targeting malicious.example: FORBIDDEN (aap_domain_not_allowed)
- Request to cms.publish: FORBIDDEN (aap_invalid_capability)¶
{
"iss": "https://as.example.com",
"sub": "agent-researcher-01",
"aud": "https://api.example.com",
"exp": 1735689600,
"iat": 1735686000,
"jti": "tv-invalid-delegation-001",
"agent": {
"id": "agent-researcher-01",
"type": "llm-autonomous",
"operator": "org:acme-corp"
},
"task": {
"id": "task-001",
"purpose": "research"
},
"capabilities": [
{
"action": "search.web"
}
],
"delegation": {
"depth": 4,
"max_depth": 3,
"chain": ["agent-01", "tool-a", "tool-b", "tool-c", "tool-d"],
"parent_jti": "parent-token-id"
}
}
¶
Expected Result: REJECTED -- aap_excessive_delegation (HTTP 403). The delegation.depth (4) exceeds delegation.max_depth (3).¶
Given a token with exp: 1735686000 and a clock skew tolerance of 300 seconds (5 minutes):¶
| Validation Time | Seconds Past exp | Expected Result | Reason |
|---|---|---|---|
| 1735686000 | 0 | REJECTED | Token is expired at exp (exclusive boundary) |
| 1735686240 | 240 | ACCEPTED | Within 5-minute tolerance |
| 1735686300 | 300 | ACCEPTED | At boundary of tolerance (inclusive) |
| 1735686301 | 301 | REJECTED | Beyond tolerance |