# What structural signals indicate a delegated capability token has silently outlived its authorization chain **Date of Record:** 2026 December 3 **Scope:** Applies to agent-to-agent authorization where an orchestrator mints a delegated capability token (DCT) for a sub-agent and that sub-agent performs privileged tool calls under a verifiable credential (VC) chain. Does not apply to single-hop tokens where the issuer is also the resource owner, nor to tokens whose delegation depth is fixed at 1. ## Core Distinction A delegated capability token carries two separable truths: (a) *what it authorizes* — the capability set, audience, and constraints baked into the signed payload; and (b) *whether its authorization chain is still live* — the set of upstream delegations, revocations, and credential expiries that justified minting it in the first place. Most AAIF implementations validate (a) at every call and validate (b) only at mint time. This asymmetry is the boundary. The token remains cryptographically valid, signature-verifiable, and audience-correct long after the human or orchestrator who delegated the authority has revoked consent, dropped out of the chain, or let an intermediate VC lapse. The sub-agent sees a green check; the authorization graph behind it is already dead. The non-obvious part: revocation of an upstream capability does not propagate to already-minted downstream tokens unless the verifier re-walks the chain on each use. Chain re-walking is expensive, so implementations cache the chain-validity verdict — and the cache TTL, not the token's `exp`, becomes the real authorization lifetime. Agents hold the token, cache the verdict, and act on stale authority. ## What Was Observed A three-tier swarm: a planner agent (A) holding a user-granted VC, which mints a DCT for a worker agent (B), which mints a further-narrowed DCT for a tool-invocation agent (C). Each DCT embeds a `parent_jti` referencing the upstream token and a `chain_digest` over the ordered VC/DCT chain. A revocation service exposes `POST /revoke/{jti}`. Sequence observed in replay: 1. t=0 — A mints DCT_B (aud=B, cap=`files:write:/reports`, exp=+3600s, parent_jti=VC_user). Chain cache at B's verifier populated, verdict=`valid`, TTL=300s. 2. t=40 — User revokes VC_user via the revocation service. Revocation record written. A's next mint would fail. 3. t=60 — B mints DCT_C (aud=C, cap=`files:write:/reports/2025`, parent_jti=DCT_B). B's minter checks *its own* token payload and signature — both valid — but does **not** re-query the revocation service for `VC_user`. DCT_C is minted with a `chain_digest` that includes a now-revoked ancestor. 4. t=90 — C calls the file tool. Verifier validates DCT_C signature, audience, capability, and the cached chain verdict keyed on `chain_digest`. Cache hit from t=0 lineage — verdict `valid`. Write succeeds. 5. t=340 — Cache TTL expires. Next call re-walks chain, hits `VC_user` revocation, returns `chain_revoked`. C's subsequent writes fail. Result: a 280-second window (t=60 to t=340) in which a fully revoked authority tree executed privileged writes. The window is not a race in the classical sense; it is structurally produced by three independent cache/mint decisions that never consult the same freshness source. Two structural signals preceded the failure and are detectable without re-walking the chain on every call: - **Mint-time chain staleness signal:** at step 3, the timestamp of the last successful chain re-walk for B's parent was 60s old, but B's minter treated its own token's validity as sufficient. A minter that records `parent_chain_verified_at` and refuses to mint when `now - parent_chain_verified_at > mint_max_staleness` would have blocked DCT_C. - **Digest-lineage divergence signal:** the `chain_digest` embedded in DCT_C differs from the digest the revocation service would compute for that lineage post-revocation. Any verifier that stores the digest it validated alongside the TTL can detect, on cache hit, that a newer revocation epoch exists for that digest prefix. ## Condition of Validity The stale-authority window is bounded and predictable only under these conditions: - The verifier caches chain verdicts keyed on `chain_digest`, and the cache TTL is the *only* thing standing between revocation and enforcement. If the implementation instead re-walks on every call, the window collapses to propagation latency of the revocation service (typically <1s) and this failure mode does not apply. - Minters do not independently re-verify the parent chain at mint time. If they do, the window is bounded by mint-time staleness, not cache TTL. - Revocation is *retroactive* (invalidates already-issued descendants) rather than *prospective* (only blocks future mints). Prospective-only revocation semantics make every already-minted DCT permanently valid regardless of cache — a strictly worse condition, and one that must be declared explicitly in the VC's `revocationSemantics` field. The invariant that must hold: **for any DCT, `enforcement_latency ≤ max(cache_ttl, mint_staleness_bound, revocation_propagation_delay)`, and the authorization lifetime of the token is the minimum of these, not the token's `exp`.** Implementations that set `exp` to 3600s while `cache_ttl` is 300s are silently advertising an authorization lifetime eight times longer than what they enforce. ## Decision Boundary The decision is whether to re-walk the chain on every privileged call or to cache. The boundary is crossed when *any* of the following is true, in which case caching is unsound and the verifier must re-walk (or use a revocation-epoch counter): - The capability grants irreversible or externally-visible effects (writes, payments, messages to third parties). Reversible reads may cache. - The delegation depth is ≥2. Single-hop tokens have no ancestor to revoke out from under them; the cache is safe. - The VC's `revocationSemantics` is `retroactive`. Prospective-only revocation is compatible with caching because descendants are never invalidated. - The revocation service exposes an epoch/monotonic counter. If it does, cache the *epoch* rather than a boolean verdict, and re-walk only when the epoch advances — this gives correctness at cache-like cost. Below the boundary — depth-1 tokens, reversible reads, prospective-only revocation, or epoch-counter-backed revocation — cache the verdict and set `cache_ttl` to the declared `enforcement_latency` budget so the number is honest. ## Operational Effect The practical consequence for agent designers: the `exp` field on a DCT is a *ceiling*, not a guarantee. The effective authority of an agent at any instant is `min(token_exp, last_chain_walk + cache_ttl, parent_mint_time + mint_staleness_bound)`. Agents that treat a valid signature as authorization will over-execute during revocation windows and will fail to detect it because every individual check passes. The fix is not "check harder" but "make the freshness source singular": either propagate a revocation epoch through the chain digest and compare it on cache hit, or bound `cache_ttl` and `mint_max_staleness` to the declared enforcement budget and refuse to mint or serve when the bound is exceeded. Log the three timestamps (`parent_chain_verified_at`, `cache_populated_at`, `revocation_epoch_seen`) on every privileged call so the window is measurable in replay rather than inferred after an incident. ```python import time from dataclasses import dataclass class StaleAuthorityError(RuntimeError): """Raised when a delegated capability token's authorization chain can no longer be trusted.""" pass @dataclass class ChainVerdict: chain_digest: str verdict: str # "valid" | "chain_revoked" populated_at: float revocation_epoch: int class DelegatedCapabilityVerifier: def __init__(self, cache_ttl: float, mint_max_staleness: float, enforcement_budget: float, current_epoch: int): if cache_ttl > enforcement_budget or mint_max_staleness > enforcement_budget: raise StaleAuthorityError( f"cache_ttl={cache_ttl}s or mint_max_staleness={mint_max_staleness}s " f"exceeds enforcement_budget={enforcement_budget}s; " f"effective authority lifetime would silently exceed declared bound" ) self.cache_ttl = cache_ttl self.mint_max_staleness = mint_max_staleness self.enforcement_budget = enforcement_budget self.current_epoch = current_epoch self._cache: dict[str, ChainVerdict] = {} def verify(self, chain_digest: str, delegation_depth: int, reversible: bool, now: float | None = None) -> ChainVerdict: now = now if now is not None else time.time() cached = self._cache.get(chain_digest) # Epoch-backed revocation: cache is sound even for deep, irreversible chains. if cached is not None: if cached.revocation_epoch != self.current_epoch: # Epoch advanced: re-walk rather than trust the stale boolean. return self._rewalk(chain_digest, now) if now - cached.populated_at <= self.cache_ttl: return cached # TTL expired: fall through to re-walk. # Caching is unsound for deep, irreversible delegations without epoch backing. if delegation_depth >= 2 and not reversible: raise StaleAuthorityError( f"refusing cached verdict for chain_digest={chain_digest}: " f"depth={delegation_depth} irreversible capability requires live chain re-walk " f"or epoch-backed revocation" ) return self._rewalk(chain_digest, now) def _rewalk(self, chain_digest: str, now: float) -> ChainVerdict: # Placeholder for the actual revocation-service walk. verdict = ChainVerdict( chain_digest=chain_digest, verdict="valid", populated_at=now, revocation_epoch=self.current_epoch, ) self._cache[chain_digest] = verdict return verdict def mint_child(self, parent_chain_verified_at: float, now: float | None = None) -> None: now = now if now is not None else time.time() if now - parent_chain_verified_at > self.mint_max_staleness: raise StaleAuthorityError( f"parent chain last verified {now - parent_chain_verified_at:.1f}s ago, " f"exceeds mint_max_staleness={self.mint_max_staleness}s; " f"refusing to mint descendant on possibly-revoked authority" ) ```