Spec-06-Capability-Tokens
What this spec defines
Short-lived, signed grants used for federated and delegated operations. Capability tokens are scoped credentials: they grant a subject a verb on a specific object for a bounded time window.
Extraction status
This file contains the ADR-010 prose extraction for capability-token shape, issuance, verification, and revocation. It intentionally does not define peer admission, manifest schema, replay-window policy, or capability-based instruction semantics.
Token purpose
Capability tokens are portable credentials.
Static API keys are node-local credentials. Capability tokens provide a portable credential that a receiving peer can verify from issuer manifest material without calling back to the issuer on every operation.
Token shape
CapabilityToken {
issuer: URI
subject: URI
verb: string
object: URI
issued_at: ISO 8601 UTC
expiry: ISO 8601 UTC
nonce: lowercase hex string
key_id: string
signature: base64url Ed25519 signature
}
issuersubjectverbobjectSigning
The signature covers a canonical encoding of the token body with
signature omitted. The signing key MUST correspond to an active
key in the issuer's manifest. Receivers MUST verify the issuer
manifest before trusting the token.
Issuance
Capability-token issuance is exposed through the HTTP route owned
by Spec-03-HTTP-API:
POST /v1/federation/capability-tokens
Only authorized administrative callers may issue capability tokens. Issuance MUST record token id, issuer, subject, verb, object, expiry, and nonce so that revocation and audit can refer to the token later.
Verification
Receivers MUST verify:
- The token signature.
- The issuer manifest and active key id.
- The token has not expired.
- The nonce is well-formed.
- The token has not been revoked.
- The requested operation is within the
(verb, object)grant.
Verification failure MUST deny the operation. Implementations SHOULD distinguish signature, expiry, revocation, and scope/verb failures in audit logs.
Revocation
Revocation is exposed through:
POST /v1/federation/capability-tokens/{token_id}/revoke
Revocation invalidates a token before its natural expiry. Nodes SHOULD publish revocation evidence through the same transparency-log mechanism used for manifests when configured.
Receivers MUST treat revoked tokens as invalid even if signature and expiry are otherwise valid.
Replay relationship
The token nonce identifies a token instance. Runtime replay windows
and inbound request nonce caches are owned by
Spec-11-Replay-Protection; this spec only requires the token to
carry a verifiable nonce.
Grant boundaries
Capability tokens are additive grants, not proof of broad identity authority.
A token granting write on one object MUST NOT be
interpreted as a grant to write any other object. A token granting
access to a garden or scope MUST still pass the local ACL and scope
enforcement rules that apply to that operation.
Out of scope
This spec does not define:
API-key creation
Local operator credentials.
Peer-token handshakes
That are separate from capability tokens.
Capability-based instruction
interpret_as enforcement.