| Internet-Draft | OSAP Capability Tokens | November 2026 |
| Zeng | Expires 25 May 2027 | [Page] |
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.¶
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 (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.¶
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.¶
This document defines:¶
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.¶
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.¶
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://com.example.calendar/agent#9c.¶
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:¶
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.¶
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.¶
| 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 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 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. |
The constraints object can contain the following
members:¶
time_window: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:rate:<count>/<unit>, 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.¶
max_depth:max_depth 2 permits a child at depth 1 and a
grandchild at depth 2, but no token at depth 3.¶
max_budget: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:false. A token can be
used to issue a child token only when this member is
true.¶
session_id:nonce:
{
"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.¶
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:¶
\u escapes; and¶
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.¶
The proof member is an object with three members:¶
alg:EdDSA and requires Ed25519 as defined in RFC 8032
[RFC8032].¶
kid:kid.¶
sig: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.¶
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.¶
subject is the delegate and the child
audience is the actual receiver of the delegated
request.¶
actions are a subset of the parent
actions.¶
resources are a subset of the parent
resources.¶
exp is less than or equal to the parent
exp, and the child nbf is greater than or equal to
the parent nbf.¶
max_uses is less than or equal to the parent
max_uses when the parent has that constraint.¶
rate is no wider than the parent rate.
A child MUST NOT have a higher permitted rate than its parent.¶
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.¶
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.¶
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.¶
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.¶
Some checks can be decided from the token and the request alone; others require state. The division is normative for interoperable deployments:¶
audience, subject, task_id, and
depth.¶
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.¶
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.¶
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.¶
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:¶
The receiver MUST apply the exception only for those message types and MUST reject every other cross-task use.¶
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.¶
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.¶
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.¶
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.¶
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.¶
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.¶
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.¶
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.¶
An implementation that claims conformance with this document MUST preserve the following invariants:¶
| 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. |
| Class | Name | Example | Default consent |
|---|---|---|---|
| L0 | Public read | Public weather or directory | Automatic |
| L1 | Personal read | Calendar, contacts, notes | First use or task-level |
| L2 | Local write | Create a local draft or update a to-do | Automatic with notification |
| L3 | External side effect | Send a message, mail, or form | Per use, with batch or time limits |
| L4 | High impact | Payment, deletion, public posting | Strong confirmation and re-authentication |
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.¶
consent_receipt_id.¶
actions, resources,
task_id, and audience MUST cover the token's
request. A mismatch MUST produce
POLICY_CONSENT_SCOPE_MISMATCH.¶
exp has not passed.¶
The receipt format, issuance ordering, and revocation rules are defined in the companion consent receipt document.¶
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 authentication or signature verification failed. | No |
SCHEMA_INVALID
|
The token does not match the required structure. | No |
CAPABILITY_AUDIENCE_MISMATCH
|
The audience does not match the receiver. | No |
CAPABILITY_SUBJECT_MISMATCH
|
The subject does not match the sender. | No |
CAPABILITY_TASK_MISMATCH
|
The task does not match the request. | No |
CAPABILITY_ATTENUATION_INVALID
|
A child token widens scope, extends time, exceeds depth, or otherwise violates Section 4. | No |
CAPABILITY_REVOKED
|
The token is revoked or expired. | No |
POLICY_DENIED
|
Policy rejects the action. | No |
POLICY_CONSENT_REQUIRED
|
An L3 or L4 action has no valid consent receipt. | After consent |
POLICY_CONSENT_EXPIRED
|
The consent receipt expired or was revoked. | After consent |
POLICY_CONSENT_SCOPE_MISMATCH
|
The receipt does not cover the request. | No |
TASK_BUDGET_EXCEEDED
|
The budget for the task is exhausted. | No |
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.¶
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.¶
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.¶
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.¶
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.¶
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.¶
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.¶
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.¶
This document has no IANA actions.¶