concepts
Intended Documentation
Authority Token Model
The Authority Token's real structure, Ed25519 signing, per-tenant keys, single-use nonce, 300-second lifetime, and the exact local verification steps and failure reasons.
Authority Token Model#
An Authority Token is the cryptographic proof that a specific action was verified against policy and approved. It is not an identity credential and not an OAuth access token — it is a single-use authorization proof, bound to one intent. Intended decides and signs; your agent acts, carrying the token, and the service it calls verifies the token locally before acting. An Authority Token is minted only on an APPROVED decision; DENIED and ESCALATED produce none.
Minted on APPROVED, verified locally, consumed once. Replay, expiry, key-id mismatch, and revocation are all rejected.
Structure#
The Authority Token is an Ed25519 JWT — three base64url sections (header, claims, signature) joined by dots.
Header#
| Field | Value |
|---|---|
alg | EdDSA — Ed25519 (Edwards-curve) signature. |
typ | JWT. |
kid | The tenant's signing-key id. Verifiers use it to select the correct public key; pinning it is mandatory. |
Claims#
The claims bind the token to exactly one intent, tenant, and target:
| Claim | Meaning |
|---|---|
intentId | The intent this token authorizes (UUID). |
tenantId | Tenant scope. |
adapterId | The consumer the token is bound to (decision-only for decisions from /v1/agent-intent). |
adapterTarget | The specific target the action is bound to. |
targetSystem | The system the action targets. |
proposedAction | The action that was approved. |
decision | Always APPROVED — only approvals mint tokens. |
issuedAt / expiresAt | Validity window (see lifetime below). |
nonce | A ≥32-character random value enforcing single use. |
At signing time the runtime also sets the standard JWT registered claims iss: "intended-authority", aud: <adapterId>, and integer iat / exp.
Lifetime#
Authority Tokens are short-lived by design: the default and the hard maximum lifetime are both 300 seconds (5 minutes). A token cannot be issued with a longer TTL — the signer rejects it. Combined with single-use semantics, this keeps the window in which a leaked token could be misused minimal.
Signing keys#
Each tenant has its own signing key pair; one tenant's key never signs another tenant's tokens.
- Algorithm — algorithm-agnostic, Ed25519 by default (RSA‑4096 / ES256 selectable).
- At rest — private keys are encrypted (AES‑256‑GCM) in the key store and are not exportable.
- Lifecycle — keys are
ACTIVE,PREVIOUS, orRETIRED. Verification acceptsACTIVEandPREVIOUS;RETIREDkeys are excluded. - Rotation — rotating a key issues new tokens under a new
kidwhile in-flight tokens signed by the now-PREVIOUSkey still verify, so rotation causes no downtime.
Verification#
Verification is local: the consumer needs only the tenant's public key for the token's kid, which it can cache and refresh on a schedule. It never calls back to the Intended runtime. Run these checks in the service your agent calls (or the gateway you run in front of it) before the action takes effect; @intended/verify implements the signature and claim checks.
Select the key by kid
Decode the header, read kid, and load the tenant's public key for it. An unknown or unpinned kid is rejected (TOKEN_KID_MISMATCH).
Verify the Ed25519 signature
A failed signature check is rejected (TOKEN_SIGNATURE_INVALID).
Validate the claims
Assert tenantId, adapterId, and adapterTarget match this action, decision === "APPROVED", iss/aud match, and the token is unexpired and within the 300s max TTL.
Consume the nonce
Your service records the nonce atomically (unique per tenant) and rejects a replay whose nonce is already consumed. This is what makes the token single-use.
Verifying in code#
Failure reasons#
Verification is fail-closed: any failure rejects the action. Common reasons:
| Reason | Cause |
|---|---|
TOKEN_SIGNATURE_INVALID | Signature does not verify against the key |
TOKEN_KID_MISMATCH | kid not pinned / not a known tenant key |
TOKEN_TENANT_MISMATCH | Token tenant ≠ expected tenant |
TOKEN_ADAPTER_MISMATCH | Token adapter/target ≠ this action |
TOKEN_EXPIRED | Past expiresAt |
TOKEN_TTL_EXCEEDS_LIMIT | TTL beyond the 300s maximum |
TOKEN_CLAIMS_INVALID | Claims fail schema validation |
Info
The Ed25519 Authority Token described here is the token returned by POST /intent and verified by your service before it acts. Intended also uses an internal HMAC-signed permission token for some policy-pack flows; it is not the artifact downstream services verify, and it is not interchangeable with the Authority Token.
Related#
- Authority Runtime Pipeline — where tokens are issued
- Verify a Token — a step-by-step verification guide
- Tenant Trust Boundary — per-tenant key isolation
- Enforcement Lineage — how tokens link into the audit chain