Individual Submission ZY. Zeng Internet-Draft Independent Intended status: Informational 21 November 2026 Expires: 25 May 2027 Capability Tokens for Local Agent Delegation draft-zeng-osap-capability-tokens-00 Abstract This document defines a signed capability token format for delegating authority between agents on a single local system. A token binds a subject, an audience, a task, a set of actions and resources, and a validity window. Tokens can only be attenuated: a child token is a subset of its parent. The document specifies attenuation rules, binding checks, revocation semantics, and the interaction with consent receipts. It does not define a transport, a discovery protocol, or an agent runtime. Status of This Memo 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 25 May 2027. Copyright Notice Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved. Zeng Expires 25 May 2027 [Page 1] Internet-Draft OSAP Capability Tokens November 2026 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Relation to Other Work . . . . . . . . . . . . . . . . . 4 1.3. Conventions and Terminology . . . . . . . . . . . . . . . 4 2. Capability Model Overview . . . . . . . . . . . . . . . . . . 5 3. Capability Token Format . . . . . . . . . . . . . . . . . . . 6 3.1. Top-Level Members . . . . . . . . . . . . . . . . . . . . 6 3.2. Constraints . . . . . . . . . . . . . . . . . . . . . . . 8 3.3. Example Token . . . . . . . . . . . . . . . . . . . . . . 9 3.4. Serialization and Canonicalization . . . . . . . . . . . 10 3.5. Proof . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4. Attenuation . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1. Attenuation Rules . . . . . . . . . . . . . . . . . . . . 12 4.2. Stateless and Stateful Checks . . . . . . . . . . . . . . 12 4.3. Failure Handling . . . . . . . . . . . . . . . . . . . . 13 5. Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.1. Audience Binding . . . . . . . . . . . . . . . . . . . . 13 5.2. Task Binding . . . . . . . . . . . . . . . . . . . . . . 13 5.3. Sender Binding . . . . . . . . . . . . . . . . . . . . . 14 5.4. Session and Nonce Binding . . . . . . . . . . . . . . . . 14 5.5. Delegation and Handoff . . . . . . . . . . . . . . . . . 14 6. Revocation . . . . . . . . . . . . . . . . . . . . . . . . . 14 6.1. Revocation Interface . . . . . . . . . . . . . . . . . . 14 6.2. Cascade . . . . . . . . . . . . . . . . . . . . . . . . . 14 6.3. Cache and Freshness . . . . . . . . . . . . . . . . . . . 15 6.4. Execution-Time Check . . . . . . . . . . . . . . . . . . 15 6.5. Audit and Notification . . . . . . . . . . . . . . . . . 15 7. Authority Invariants . . . . . . . . . . . . . . . . . . . . 15 8. Risk Classes and Consent Linkage . . . . . . . . . . . . . . 16 8.1. Risk Classes . . . . . . . . . . . . . . . . . . . . . . 17 8.2. Consent Linkage . . . . . . . . . . . . . . . . . . . . . 17 9. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 18 10. Security Considerations . . . . . . . . . . . . . . . . . . . 19 10.1. Confused Deputy . . . . . . . . . . . . . . . . . . . . 19 10.2. Token Theft and Forwarding . . . . . . . . . . . . . . . 19 10.3. Replay . . . . . . . . . . . . . . . . . . . . . . . . . 19 10.4. Revocation Latency . . . . . . . . . . . . . . . . . . . 20 Zeng Expires 25 May 2027 [Page 2] Internet-Draft OSAP Capability Tokens November 2026 10.5. Canonicalization . . . . . . . . . . . . . . . . . . . . 20 10.6. Local Transport Assumptions . . . . . . . . . . . . . . 20 10.7. Issuer Key Compromise . . . . . . . . . . . . . . . . . 20 11. Privacy Considerations . . . . . . . . . . . . . . . . . . . 20 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 13. Normative References . . . . . . . . . . . . . . . . . . . . 21 14. Informative References . . . . . . . . . . . . . . . . . . . 21 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 21 1. Introduction Applications on a personal computer are increasingly composed of agents that invoke one another: a notes agent asks a calendar agent to find a free slot, a mail agent asks a contacts agent to resolve a recipient, and a supervisor agent delegates a multi-step task to two specialist agents. Each such invocation crosses an application boundary and therefore needs an explicit, verifiable grant of authority. Existing authorization mechanisms do not fit this environment directly. OAuth 2.0 access tokens are designed for HTTP resource servers and assume a network authorization server. OAuth 2.0 Token Exchange [RFC8693] and Rich Authorization Requests [RFC9396] provide useful delegation and scope concepts, but they do not require the audience and task binding that local multi-agent execution needs. Operating-system permissions are attached to applications, not to a task or to a particular agent instance. This document specifies a capability token for the local case. The token is a signed JSON object. It names the issuer, the subject that may use it, the audience that must accept it, and the task to which it is bound. It carries an explicit action and resource scope and a small set of constraints such as expiry, use count, delegation depth, and budget. A token can be attenuated by its holder, but a child token can never be broader than its parent. A Capability Authority (CA) issues and revokes tokens; a Policy and Consent Service (PCS) decides whether a token is allowed and obtains user consent when required. 1.1. Scope This document defines: * the JSON structure of a capability token; * the canonical byte sequence that is signed; * the rules for attenuating a token; Zeng Expires 25 May 2027 [Page 3] Internet-Draft OSAP Capability Tokens November 2026 * the binding checks that a receiver performs; * revocation and freshness requirements; and * the relationship between a token and a consent receipt. This document does not define a message envelope, a transport binding, a discovery protocol, a task state machine, a consent user interface, or an audit storage format. Those elements are specified in companion documents or left to the deployment. 1.2. Relation to Other Work The token format is intentionally small. It can be carried in an OAuth 2.0 token exchange response, in an application-layer message, or in a local inter-process call. It does not replace OAuth; it describes a local delegation artifact that can be mapped to OAuth claims when a local action is bridged to a remote service. Work on workload identity in the IETF WIMSE working group addresses cross-domain workload credentials. This document addresses a narrower problem: a user, or an agent acting for that user, delegates a bounded task to another agent on the same device. The two models can be composed, but this document does not define a cross-domain trust root. 1.3. Conventions and Terminology 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. This document uses the following terms: Agent: An addressable software component that can request or perform an action. An agent is identified by an agent URI such as agent://com.example.calendar/agent#9c. Capability Authority (CA): The component that issues, attenuates, and revokes capability tokens. The CA is trusted to enforce scope and depth limits. Policy and Consent Service (PCS): The component that evaluates policy, computes the effective risk class, and obtains user consent. The PCS may be part of the CA or a separate service. Zeng Expires 25 May 2027 [Page 4] Internet-Draft OSAP Capability Tokens November 2026 Issuer: The principal on whose authority a token is issued. An issuer can be a user, a system policy, or a parent agent. Subject: The agent that holds a token and may use it to make a request. The subject must equal the sender of the request. Audience: The agent that must accept a token and perform the requested action. The audience must equal the receiver of the request. Task: A unit of work with an identifier and, optionally, a parent and a root. A token is bound to exactly one task identifier. Attenuation: The act of deriving a child token whose authority is a subset of the parent token's authority. Consent receipt: A signed record of a user's decision to allow or deny a described action. The format is defined in a companion document. Risk class: One of L0 through L4, describing the potential impact of an action. Risk classes determine whether a consent receipt is required. 2. Capability Model Overview A capability descriptor is a registry declaration. It states that an application offers an action on a resource and describes the schema, risk, and cost of that action. A descriptor is not an authorization and cannot be used to perform an action. A capability token is an authorization. It is issued by a CA after the PCS has evaluated policy and, when necessary, after the user has granted consent. The token is presented by its subject to its audience. The audience validates the token before performing the action. Authority is never ambient. An agent that does not hold a valid token cannot perform a cross-application action, even if it has an operating system permission that would otherwise allow the action. A token can be narrowed by its holder, but it cannot be widened. The resulting chain of tokens is the delegation chain. Three roles are distinct even when one component plays more than one of them: * the issuer states the authority that is delegated; Zeng Expires 25 May 2027 [Page 5] Internet-Draft OSAP Capability Tokens November 2026 * the subject exercises the authority; and * the audience accepts and enforces the authority. In a delegation, the parent agent is the issuer of the child token, the child agent is both the subject and the audience of the child token, and the child agent must not receive the parent's token itself. 3. Capability Token Format A capability token is a JSON object [RFC8259] with the members described in this section. Unknown top-level members MUST be rejected. An extension member MAY be carried in the top-level extensions object; extensions MUST NOT change the meaning of the core members. 3.1. Top-Level Members +====================+=============+================================+ | Member | Presence | Description | +====================+=============+================================+ | osap_cap | MUST | Token format version. The | | | | value for this specification | | | | is the string 0.1. | +--------------------+-------------+--------------------------------+ | cap_id | MUST | An opaque, globally unique | | | | identifier for this token. | | | | It is the identifier used | | | | for revocation and audit. | +--------------------+-------------+--------------------------------+ | issuer | MUST | The principal that issued | | | | the token. The value is a | | | | URI. It identifies the | | | | user, system policy, or | | | | parent agent on whose | | | | authority the token is | | | | issued. | +--------------------+-------------+--------------------------------+ | subject | MUST | The agent that may use the | | | | token. The value is an | | | | agent URI and MUST equal the | | | | sender of the request in | | | | which the token is | | | | presented. | +--------------------+-------------+--------------------------------+ | audience | MUST | The agent that must accept | | | | the token. The value is an | Zeng Expires 25 May 2027 [Page 6] Internet-Draft OSAP Capability Tokens November 2026 | | | agent URI and MUST equal the | | | | receiver of the request. | +--------------------+-------------+--------------------------------+ | task_id | MUST | The task to which the token | | | | is bound. The value MUST | | | | equal the task identifier in | | | | the request, except for the | | | | delegation and handoff cases | | | | described in Section 5. | +--------------------+-------------+--------------------------------+ | root_task_id | MUST | The root of the task tree, | | | | used for audit aggregation. | +--------------------+-------------+--------------------------------+ | actions | MUST | An array of action names | | | | that the subject may | | | | perform. The array MUST be | | | | non-empty and MUST NOT | | | | contain duplicates. | +--------------------+-------------+--------------------------------+ | resources | MUST | An array of resource | | | | identifiers to which the | | | | actions apply. The array | | | | MUST be non-empty and MUST | | | | NOT contain duplicates. | +--------------------+-------------+--------------------------------+ | constraints | MAY | An object of constraints | | | | described in Section 3.2. | | | | An absent constraint means | | | | that the corresponding limit | | | | is inherited from the parent | | | | or, for a root token, is not | | | | imposed by this member. | +--------------------+-------------+--------------------------------+ | iat | MUST | Issuance time as an integer | | | | number of seconds since the | | | | Unix epoch | | | | (1970-01-01T00:00:00Z). | +--------------------+-------------+--------------------------------+ | nbf | MUST | Not-before time, in the same | | | | format as iat. | +--------------------+-------------+--------------------------------+ | exp | MUST | Expiry time, in the same | | | | format as iat. The value | | | | MUST be greater than nbf. | +--------------------+-------------+--------------------------------+ | parent_cap_id | CONDITIONAL | The cap_id of the parent | | | | token. It MUST be present | | | | for every token whose depth | Zeng Expires 25 May 2027 [Page 7] Internet-Draft OSAP Capability Tokens November 2026 | | | is greater than zero and | | | | MUST be absent for a root | | | | token. | +--------------------+-------------+--------------------------------+ | depth | CONDITIONAL | The absolute depth of the | | | | token in the delegation | | | | chain. A root token has | | | | depth 0. A child token has | | | | depth equal to the parent's | | | | depth plus one. The member | | | | MUST be present when | | | | parent_cap_id is present. | +--------------------+-------------+--------------------------------+ | consent_receipt_id | CONDITIONAL | The identifier of the | | | | consent receipt that | | | | authorizes an L3 or L4 | | | | action. It MUST be present | | | | when the effective risk | | | | class is L3 or L4. | +--------------------+-------------+--------------------------------+ | proof | MUST | A signature object described | | | | in Section 3.5. | +--------------------+-------------+--------------------------------+ | extensions | MAY | An object for namespaced | | | | extensions. It participates | | | | in the signed byte sequence. | +--------------------+-------------+--------------------------------+ Table 1: Capability token members 3.2. Constraints The constraints object can contain the following members: time_window: An array of two RFC 3339 timestamps [RFC3339]. When both time_window and nbf/exp are present, the effective validity interval is their intersection. A token MUST NOT be accepted outside the effective interval. max_uses: A positive integer. The receiver MUST reject a use that would exceed this count. The count is per token, not per action or resource. rate: A string of the form /, where unit is one of sec, min, hour, or day. For example, 5/min permits five uses per minute. A receiver MUST enforce the rate; the exact enforcement algorithm is implementation-defined as long as it does not permit a wider rate than the stated value. Zeng Expires 25 May 2027 [Page 8] Internet-Draft OSAP Capability Tokens November 2026 max_depth: A non-negative integer. It is the maximum absolute depth allowed in the delegation chain, not a number of additional delegations. A root token with max_depth 2 permits a child at depth 1 and a grandchild at depth 2, but no token at depth 3. max_budget: An object with one or more of wall_ms, tool_calls, tokens, and money. The money member is an object with amount and currency. The budget is an upper bound on the resources that the subject may consume while exercising the token. can_delegate: A boolean. If absent, the value is false. A token can be used to issue a child token only when this member is true. session_id: An optional session identifier. If present, the token is valid only within that session. nonce: An optional single-use value. A receiver that supports nonces MUST reject a second use of the same nonce for the same token. 3.3. Example Token Zeng Expires 25 May 2027 [Page 9] Internet-Draft OSAP Capability Tokens November 2026 { "osap_cap": "0.1", "cap_id": "cap_01J8Z3K4M5N6P7Q8R9S0T1V2W3", "issuer": "user://local/example-user", "subject": "agent://com.example.notes/assistant#7f3a", "audience": "agent://com.example.calendar/agent#9c", "task_id": "task_01J8Z3K4M5N6P7Q8R9S0T1V2W3", "root_task_id": "task_01J8Z3K4M5N6P7Q8R9S0T1V2W3", "actions": ["propose"], "resources": ["calendar:primary"], "constraints": { "time_window": ["2026-11-10T00:00:00Z", "2026-11-17T00:00:00Z"], "max_uses": 5, "rate": "5/min", "max_depth": 2, "max_budget": { "wall_ms": 5000, "tool_calls": 2 }, "can_delegate": true }, "iat": 1794305685, "nbf": 1794305685, "exp": 1794309285, "depth": 0, "consent_receipt_id": "consent_01J8Z3K4M5N6P7Q8R9S0T1V2W3", "proof": { "alg": "EdDSA", "kid": "user-key-1", "sig": "c2lnbmF0dXJlLWV4YW1wbGUtbm90LXZhbGlk" } } The signature value in this example is illustrative and is not a valid signature. 3.4. Serialization and Canonicalization A token is serialized as UTF-8 JSON. The signature is computed over a canonical byte sequence derived from the token with the proof member removed. The canonicalization rules are: 1. the value MUST be a JSON object; 2. object members are sorted by the Unicode code point order of their names; 3. arrays preserve their order; Zeng Expires 25 May 2027 [Page 10] Internet-Draft OSAP Capability Tokens November 2026 4. there is no insignificant whitespace between tokens; 5. strings use the shortest escape sequence permitted by RFC 8259, and non-ASCII characters are emitted as UTF-8 rather than as \u escapes; and 6. all numbers in a capability token are integers. Floating-point numbers MUST be rejected before canonicalization. These rules are a profile of the JSON Canonicalization Scheme [RFC8785]. Because this document restricts all numbers to integers and uses only ASCII member names in the core format, the profile produces the same bytes as JCS for valid tokens. An implementation MUST NOT substitute a different canonicalization that can produce different bytes for the same token. A JSON parser used for token processing MUST reject duplicate member names. Accepting the last duplicate, or the first, would make the signed bytes ambiguous. 3.5. Proof The proof member is an object with three members: alg: The signature algorithm. This specification defines the value EdDSA and requires Ed25519 as defined in RFC 8032 [RFC8032]. kid: An identifier for the verification key. The key may belong to a user, a system policy, or a parent agent. A verifier MUST resolve the key through a trusted key registry and MUST reject an unknown kid. sig: The signature encoded with base64url as defined in Section 5 of RFC 4648 [RFC4648], without padding. The signature covers the canonical byte sequence described in Section 3.4. It does not cover the proof object itself. Implementations MUST verify the signature before acting on any other member of the token, except for the version and structural checks needed to parse it safely. 4. Attenuation A holder of a token may ask the CA for a child token. The CA MUST reject the request unless every condition in this section is satisfied. The child token is a new signed object; it is not a modification of the parent. Zeng Expires 25 May 2027 [Page 11] Internet-Draft OSAP Capability Tokens November 2026 4.1. Attenuation Rules 1. The child subject is the delegate and the child audience is the actual receiver of the delegated request. 2. The child actions are a subset of the parent actions. 3. The child resources are a subset of the parent resources. 4. The child exp is less than or equal to the parent exp, and the child nbf is greater than or equal to the parent nbf. 5. The child max_uses is less than or equal to the parent max_uses when the parent has that constraint. 6. The child rate is no wider than the parent rate. A child MUST NOT have a higher permitted rate than its parent. 7. Each child max_budget dimension is less than or equal to the corresponding parent dimension. For money, the currency MUST match and the amount MUST NOT exceed the parent amount. 8. The child depth equals the parent depth plus one, and is less than or equal to the parent constraints.max_depth. The child's own constraints.max_depth MUST NOT exceed the parent's. 9. If the child carries a consent_receipt_id, that receipt MUST still be valid and MUST cover the child's actions, resources, task, and audience. If the parent's receipt does not cover the child, the CA MUST obtain a new receipt before issuing the child. 10. The parent MUST have constraints.can_delegate set to true. If any condition fails, the CA MUST reject the request with CAPABILITY_ATTENUATION_INVALID. The CA MUST NOT issue a child token with a warning or a partial scope. 4.2. Stateless and Stateful Checks Some checks can be decided from the token and the request alone; others require state. The division is normative for interoperable deployments: * A router at the trust boundary MUST perform the stateless checks: audience, subject, task_id, and depth. Zeng Expires 25 May 2027 [Page 12] Internet-Draft OSAP Capability Tokens November 2026 * The receiver MUST perform the stateful checks before executing: revocation status, max_uses, rate, consent receipt validity, and remaining budget. A router that cannot perform a stateful check MUST NOT treat a token as authorized for an L3 or L4 action. The receiver remains responsible for the final decision. 4.3. Failure Handling A failed attenuation is a security-relevant event. The CA SHOULD record it with the parent identifier, the requested child scope, and the reason. The requester MUST receive a structured error and MUST NOT fall back to forwarding the parent token. 5. Binding 5.1. Audience Binding The audience member MUST equal the identifier of the agent that receives the request. A router MUST compare the member with the resolved receiver before routing. The receiver MUST compare it again before execution. A mismatch MUST produce CAPABILITY_AUDIENCE_MISMATCH. 5.2. Task Binding The task_id member MUST equal the task identifier in the request. A token issued for one task MUST NOT be reused for another task. A mismatch MUST produce CAPABILITY_TASK_MISMATCH. Two message types have an explicit exception: * in a delegation, the sender's token is bound to the parent task, because the delegation creates a new child task; and * in a handoff, the sender's token is bound to the task being transferred, because the handoff changes ownership without creating a new task. The receiver MUST apply the exception only for those message types and MUST reject every other cross-task use. Zeng Expires 25 May 2027 [Page 13] Internet-Draft OSAP Capability Tokens November 2026 5.3. Sender Binding The subject member MUST equal the sender of the request. An agent that receives a token MUST NOT forward that token to another agent. If an agent needs to delegate, it asks the CA for a child token as described in Section 4. A mismatch MUST produce CAPABILITY_SUBJECT_MISMATCH. 5.4. Session and Nonce Binding If constraints.session_id is present, the token is valid only in that session. A receiver MUST reject a token presented in a different session. High-value actions SHOULD use a single-use nonce or max_uses equal to one. 5.5. Delegation and Handoff A delegation creates a child task. The parent agent must hold a token with can_delegate set to true and must request a child token for the child agent and the child task. The parent token is not sent as the child's credential. A handoff transfers an existing task to a new owner. The new owner receives a new token whose audience is the new owner and whose task_id is the transferred task. The old token is not reused. If the handoff is rejected, the task remains with the old owner and the old token remains valid. 6. Revocation 6.1. Revocation Interface The CA MUST provide a revocation operation addressed by cap_id. The operation MUST be idempotent: revoking an already revoked token succeeds and does not create a second revocation event. The CA SHOULD also provide a status operation that returns one of active, revoked, expired, or unknown. 6.2. Cascade Revoking a parent token MUST revoke every descendant token, regardless of depth. A descendant MUST NOT remain usable because its own identifier is not listed explicitly. A CA that cannot establish the descendant set MUST fail closed and reject the token at the receiver. Zeng Expires 25 May 2027 [Page 14] Internet-Draft OSAP Capability Tokens November 2026 6.3. Cache and Freshness Tokens SHOULD be short-lived. An expiry of one hour or less is RECOMMENDED for interactive delegation. A revocation list or status cache SHOULD be usable offline, but a cached entry MUST have a bounded freshness interval. A receiver MUST NOT use a stale negative result to authorize an L3 or L4 action. 6.4. Execution-Time Check A receiver MUST check revocation before executing an action. If the receiver or the CA cannot check the status, the receiver MUST reject an L3 or L4 action and SHOULD reject lower-risk actions that depend on the token. A router's earlier check does not remove this obligation. 6.5. Audit and Notification A successful revocation MUST be recorded in the audit log and MUST be communicated to affected agents. Notification is advisory: a missed notification does not extend the token's authority. The execution- time check is the normative enforcement point. 7. Authority Invariants An implementation that claims conformance with this document MUST preserve the following invariants: Zeng Expires 25 May 2027 [Page 15] Internet-Draft OSAP Capability Tokens November 2026 +============+================================================+ | Identifier | Invariant | +============+================================================+ | AI1 | No ambient authority: an agent without a token | | | cannot perform a cross-application action. | +------------+------------------------------------------------+ | AI2 | Monotonic narrowing: a child token's authority | | | is a subset of its parent's authority. | +------------+------------------------------------------------+ | AI3 | Audience binding: a token cannot be used by an | | | agent other than its audience. | +------------+------------------------------------------------+ | AI4 | Task binding: a token cannot be reused for | | | another task, except for the delegation and | | | handoff cases in Section 5.2. | +------------+------------------------------------------------+ | AI5 | Revocation completeness: revoking a parent | | | invalidates all descendants. | +------------+------------------------------------------------+ | AI6 | No forwarding: an agent cannot pass its own | | | credential to another agent. | +------------+------------------------------------------------+ | AI7 | Consent prerequisite: an L3 or L4 action | | | requires a valid consent receipt before | | | execution. | +------------+------------------------------------------------+ | AI8 | Audit prerequisite: an L3 or L4 action's audit | | | record must be writable before the side | | | effect. | +------------+------------------------------------------------+ | AI9 | Bounded depth: delegation depth does not | | | exceed max_depth. | +------------+------------------------------------------------+ | AI10 | Budget monotonicity: a child task's budget | | | does not exceed the parent's remaining budget. | +------------+------------------------------------------------+ Table 2: Authority invariants 8. Risk Classes and Consent Linkage Zeng Expires 25 May 2027 [Page 16] Internet-Draft OSAP Capability Tokens November 2026 8.1. Risk Classes +=======+=============+======================+=====================+ | Class | Name | Example | Default consent | +=======+=============+======================+=====================+ | L0 | Public read | Public weather or | Automatic | | | | directory | | +-------+-------------+----------------------+---------------------+ | L1 | Personal | Calendar, contacts, | First use or task- | | | read | notes | level | +-------+-------------+----------------------+---------------------+ | L2 | Local write | Create a local draft | Automatic with | | | | or update a to-do | notification | +-------+-------------+----------------------+---------------------+ | L3 | External | Send a message, | Per use, with batch | | | side effect | mail, or form | or time limits | +-------+-------------+----------------------+---------------------+ | L4 | High impact | Payment, deletion, | Strong confirmation | | | | public posting | and re- | | | | | authentication | +-------+-------------+----------------------+---------------------+ Table 3: Risk classes The risk class is declared by the capability descriptor. The PCS computes the effective risk from the descriptor, the data labels, the target, and the context. The PCS MAY raise the class but MUST NOT lower it. 8.2. Consent Linkage * An L3 or L4 token MUST carry a consent_receipt_id. * The receipt's actions, resources, task_id, and audience MUST cover the token's request. A mismatch MUST produce POLICY_CONSENT_SCOPE_MISMATCH. * If the receipt expires or is revoked, the token MUST become unusable, even if the token's own exp has not passed. * A batch or task-level consent MUST have an explicit task scope, a time window, and an action set. It MUST NOT extend to another task by implication. The receipt format, issuance ordering, and revocation rules are defined in the companion consent receipt document. Zeng Expires 25 May 2027 [Page 17] Internet-Draft OSAP Capability Tokens November 2026 9. Error Codes An implementation reports failures with a structured error object that contains at least code, message, and retryable. The following codes are defined for token processing: +================================+======================+===========+ | Code | Meaning | Retryable | +================================+======================+===========+ | AUTH_DENIED | Peer | No | | | authentication or | | | | signature | | | | verification | | | | failed. | | +--------------------------------+----------------------+-----------+ | SCHEMA_INVALID | The token does not | No | | | match the required | | | | structure. | | +--------------------------------+----------------------+-----------+ | CAPABILITY_AUDIENCE_MISMATCH | The audience does | No | | | not match the | | | | receiver. | | +--------------------------------+----------------------+-----------+ | CAPABILITY_SUBJECT_MISMATCH | The subject does | No | | | not match the | | | | sender. | | +--------------------------------+----------------------+-----------+ | CAPABILITY_TASK_MISMATCH | The task does not | No | | | match the request. | | +--------------------------------+----------------------+-----------+ | CAPABILITY_ATTENUATION_INVALID | A child token | No | | | widens scope, | | | | extends time, | | | | exceeds depth, or | | | | otherwise violates | | | | Section 4. | | +--------------------------------+----------------------+-----------+ | CAPABILITY_REVOKED | The token is | No | | | revoked or | | | | expired. | | +--------------------------------+----------------------+-----------+ | POLICY_DENIED | Policy rejects the | No | | | action. | | +--------------------------------+----------------------+-----------+ | POLICY_CONSENT_REQUIRED | An L3 or L4 action | After | | | has no valid | consent | | | consent receipt. | | +--------------------------------+----------------------+-----------+ Zeng Expires 25 May 2027 [Page 18] Internet-Draft OSAP Capability Tokens November 2026 | POLICY_CONSENT_EXPIRED | The consent | After | | | receipt expired or | consent | | | was revoked. | | +--------------------------------+----------------------+-----------+ | POLICY_CONSENT_SCOPE_MISMATCH | The receipt does | No | | | not cover the | | | | request. | | +--------------------------------+----------------------+-----------+ | TASK_BUDGET_EXCEEDED | The budget for the | No | | | task is exhausted. | | +--------------------------------+----------------------+-----------+ Table 4: Token error codes 10. Security Considerations 10.1. Confused Deputy A low-privilege agent might try to induce a high-privilege agent to perform an action. Audience and task binding prevent the low- privilege agent from presenting a token issued for the high-privilege agent. The prohibition on forwarding prevents the high-privilege agent from passing its token to the low-privilege agent. Delegation requires a new, narrower token and a new consent decision when the risk class requires it. 10.2. Token Theft and Forwarding A token is a bearer credential within its audience. An attacker that steals a token and can impersonate the subject could use it. Short expiry, audience binding, sender binding, and transport peer authentication limit this risk. The token does not provide confidentiality; a local transport must provide integrity and peer authentication, and a deployment that treats local payloads as untrusted must add encryption. 10.3. Replay A replay attack reuses a valid token or request. Expiry, single-use nonces, max_uses, and task binding limit replay. A receiver that enforces max_uses or a nonce MUST update the use counter atomically with the decision to execute, or earlier. Checking a counter and executing in separate, unsynchronized steps allows a race. Zeng Expires 25 May 2027 [Page 19] Internet-Draft OSAP Capability Tokens November 2026 10.4. Revocation Latency Revocation is not instantaneous across every component. A token may be accepted between the revocation decision and the next status check. Short token lifetimes and execution-time checks bound this window. An L3 or L4 receiver that cannot check status MUST deny the action. 10.5. Canonicalization Signature verification is only as strong as the parser. A parser that accepts duplicate member names, non-integer numbers, or multiple encodings of the same string can verify a different document from the one the issuer signed. Implementations MUST reject duplicate names and non-integer numbers, and MUST use the canonicalization in Section 3.4. 10.6. Local Transport Assumptions This document assumes a local transport that authenticates both peers and preserves message integrity. A loopback TCP connection without authentication is not sufficient for L2 or higher actions. The transport binding must state whether it is stream-oriented or message-oriented and must preserve the sender identity that the token binding checks rely on. 10.7. Issuer Key Compromise If an issuer key is compromised, an attacker can mint tokens until the key is revoked. A verifier MUST resolve kid through a trusted key registry and MUST reject a revoked or expired key. Key rotation requires a new kid; reusing a kid for different key material is prohibited. 11. Privacy Considerations Capability tokens contain user, agent, and task identifiers. They should carry the minimum identity and resource information needed for authorization. Resource identifiers should be opaque handles rather than file paths or personal data. Deployments should define retention for tokens and audit records, and should avoid using task identifiers as a stable cross-application tracking key. A token does not reveal the content of a resource, but the pattern of issuance, use, and revocation can reveal a user's activity. Audit access controls and retention limits are therefore part of the privacy posture. Zeng Expires 25 May 2027 [Page 20] Internet-Draft OSAP Capability Tokens November 2026 12. IANA Considerations This document has no IANA actions. 13. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, . [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, July 2002, . [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006, . [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital Signature Algorithm (EdDSA)", RFC 8032, January 2017, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, May 2017, . [RFC8259] Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, December 2017, . [RFC8785] Rundgren, A., Jordan, B., and S. Erdtman, "JSON Canonicalization Scheme (JCS)", RFC 8785, June 2020, . 14. Informative References [RFC8693] Jones, M., Nadalin, A., Campbell, B., Bradley, J., and C. Mortimore, "OAuth 2.0 Token Exchange", RFC 8693, January 2020, . [RFC9396] Lodderstedt, T., Richer, J., and M. B. Jones, "OAuth 2.0 Rich Authorization Requests", RFC 9396, August 2023, . Author's Address Zeng Zhiyong Independent Zeng Expires 25 May 2027 [Page 21] Internet-Draft OSAP Capability Tokens November 2026 Email: 272577337@qq.com Zeng Expires 25 May 2027 [Page 22]