# When must an instance re-derive a delegated capability token after a credential-chain re-anchor? **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF deployments where an agent instance holds a delegated capability token whose authority chains through one or more verifiable agent credentials (VACs), and where any link in that chain can be re-anchored (key rotation, issuer re-attestation, delegation-depth compaction) while the token is still live. Does not apply to flat, single-issuer bearer tokens with no delegation chain, nor to tokens whose entire chain is frozen for the token's lifetime. ## Core Distinction The failure mode is not token expiry and not signature forgery. It is **authority drift under a still-valid signature**: a delegated capability token remains cryptographically valid — its signature verifies, its `exp` has not passed, its audience matches — but the *chain of warrants* that justified its issuance has been re-anchored beneath it. The token is a valid signature over a stale authority claim. The critical and non-obvious distinction is between two events that look identical to a naive verifier: 1. **Re-anchoring** — an upstream credential in the chain is replaced by a new credential asserting the *same* subject with the *same* or *narrower* capabilities. The delegated token's signature still verifies, and its embedded `parent_credential_id` now points at a credential that no longer exists in the active set but whose successor is semantically equivalent. 2. **Revocation-by-re-anchor** — an upstream credential is replaced by a successor that asserts the *same* subject but with *narrower* capabilities, or that omits a capability the delegated token relies on. The delegated token's signature still verifies, but its authority is now a superset of what its parent actually grants. Both events present to the verifier as "signature valid, not expired, chain resolvable if you resolve through the alias table." The difference is only visible if the verifier re-derives the *effective* capability set by intersecting the delegated token's claimed capabilities with the *current* capabilities of every ancestor credential, rather than trusting the capability set baked into the token at issuance. ## What Was Observed A three-hop delegation chain: orchestrator agent `O` holds VAC `V_O` granting `{fs:read:/data, fs:write:/scratch, net:egress:api.internal}`. `O` delegates to worker `W` via capability token `T_OW`, embedding `parent_credential_id = V_O` and a capability set `{fs:read:/data, fs:write:/scratch}`. `W` delegates to sub-worker `S` via `T_WS`, embedding `parent_credential_id = T_OW` and `{fs:read:/data}`. At T+40min, the security team rotated `O`'s credential. The new `V_O'` was issued with `{fs:read:/data, net:egress:api.internal}` — `fs:write:/scratch` was removed because `O` had been re-scoped to a read-only role during an incident review. The rotation was recorded in the AAIF alias table as `V_O -> V_O'` with `successor_semantics = "narrowed"`. `T_OW` and `T_WS` were not touched. Their signatures still verified against the issuer key (which had not rotated). Their `exp` was T+6h. Their `parent_credential_id` still read `V_O`. The verifier on the file-service side resolved `T_WS`, walked to `T_OW`, walked to `V_O`, found `V_O` absent from the active credential set, consulted the alias table, resolved to `V_O'`, and — here is the defect — **accepted the alias resolution as chain-valid without re-intersecting capabilities**. It confirmed that `V_O'` asserts subject `O` and that the successor was marked `narrowed`, but it did not recompute `effective(T_WS) = caps(T_WS) ∩ caps(T_OW) ∩ caps(V_O')`. It used `caps(T_WS)` as embedded at issuance. Result: `S` continued to hold `fs:read:/data` — which was still legitimate — but the same verifier path, applied to `T_OW` directly by `W`, permitted `fs:write:/scratch` for 22 minutes after the narrowing took effect. The write capability had been removed from `O` at T+40min and was still exercisable by `W` at T+62min. No signature failed. No expiry fired. No revocation list entry existed, because the credential was not revoked — it was superseded. The window closed only when a separate audit job diffed the alias table against live token capability sets and flagged the discrepancy. The verifier had no independent mechanism to detect it. ## Condition of Validity The invariant that was violated: > For any delegated capability token `T` with ancestor chain `T -> P_1 -> P_2 -> ... -> V_root`, the effective authority of `T` at verification time `t` is `caps(T) ∩ caps(P_1 at t) ∩ caps(P_2 at t) ∩ ... ∩ caps(V_root at t)`, where `caps(X at t)` is the capability set of the *currently active* credential or token resolving `X` at time `t`, following alias resolution. This invariant holds trivially when no ancestor is re-anchored. It is the *only* invariant that bounds authority drift, and it is not implied by signature validity, expiry, or revocation status. A verifier that checks those three and stops has verified *authenticity* but not *current authority*. The condition under which re-derivation is mandatory — the trigger — is precisely: **an ancestor link resolved through the alias table to a successor whose `successor_semantics` is `narrowed` or `replaced`, at any depth, at any time after the delegated token was issued.** When `successor_semantics = "equivalent"` (same subject, same capability set, key rotation only), re-derivation is a no-op and may be skipped. When it is `narrowed`, re-derivation is mandatory before the next capability check. When it is `replaced` (different subject semantics, e.g., a service account re-created), the delegated token must be treated as orphaned and rejected, not re-derived. The subtlety: `successor_semantics` is asserted by the re-anchoring party, and a mislabeled `equivalent` successor that is in fact narrowed reintroduces the defect. The invariant therefore requires the verifier to *not trust the label* but to compute the intersection and compare — the label is a fast-path hint, not an authority. ## Decision Boundary The boundary between "accept and proceed" and "re-derive or reject" is drawn at the point where the verifier's chain walk crosses an alias edge. Concretely: - **No alias edge crossed, all ancestors active:** accept `caps(T)` as-is. No re-derivation. - **Alias edge crossed, successor `equivalent` and intersection equals `caps(T)`:** accept. The intersection check is cheap and should still run; it is the only thing that catches a mislabeled successor. - **Alias edge crossed, intersection is a strict subset of `caps(T)`:** the token is *partially* valid. The correct action is not blanket rejection — that would break `S`'s legitimate `fs:read:/data` — but re-derivation to the intersected set, with the *reduced* set cached against the token's remaining lifetime and a re-derivation event emitted to the audit log. The token is not revoked; its authority is re-scoped downward. - **Alias edge crossed, intersection is empty, or successor subject differs:** reject. The token is orphaned. Emit a distinct rejection reason (`ORPHANED_DELEGATION`) so the delegating agent can be signaled to re-issue. The boundary is *not* at expiry, *not* at signature failure, and *not* at revocation-list membership. An operator who instruments only those three will believe the system is sound while authority drifts beneath live tokens for the full remaining lifetime of every delegation in the chain. ## Operational Effect The operational consequence is that delegated capability tokens are **not self-contained authority artifacts**. They are *claims* whose truth is a function of the current state of their ancestor chain. A verifier that treats them as self-contained — which is the natural implementation, because the token carries its capability set and its signature verifies — will honor stale authority for the entire window between an upstream narrowing and the next independent audit. The bounded guardrail is a **re-derivation-on-alias-cross** step in the verification path, with the intersection result cached against `(token_id, chain_root_version)` so it is recomputed only when an ancestor version changes, not on every request. The cache key must include the root credential version, not just the token id, or the cache itself becomes the drift vector. Emission of a `capability_narrowed` event on any strict-subset intersection gives the delegating agent the signal it needs to re-issue a correctly-scoped token rather than operating on a silently reduced authority set — which otherwise surfaces later as a confusing `PermissionDenied` deep in a tool call, far from its cause. The failure is quiet because every individual check passes. It is only visible to a verifier that asks not "is this token valid?" but "is the authority this token claims still the authority its chain actually confers, right now?" ```python from dataclasses import dataclass from typing import Optional class DelegationAuthorityDrift(RuntimeError): """Raised when a delegated token's claimed capabilities exceed the current intersected authority of its ancestor chain.""" @dataclass class Credential: cred_id: str subject: str capabilities: frozenset version: int @dataclass class DelegatedToken: token_id: str parent_id: str capabilities: frozenset def resolve_current(cred_id: str, active: dict, aliases: dict) -> Optional[Credential]: if cred_id in active: return active[cred_id] successor = aliases.get(cred_id) if successor is None: return None return active.get(successor) def verify_delegated_authority( token: DelegatedToken, active_credentials: dict, alias_table: dict, ancestor_tokens: dict, ) -> frozenset: """Re-derive effective authority by intersecting the token's claimed capabilities with the *current* capabilities of every ancestor link. Returns the effective capability set. Raises DelegationAuthorityDrift if the claimed set exceeds the derived set (drift) or the chain is orphaned. """ effective = frozenset(token.capabilities) cursor_id = token.parent_id seen = set() while cursor_id is not None: if cursor_id in seen: raise DelegationAuthorityDrift( f"cycle detected in delegation chain at {cursor_id}" ) seen.add(cursor_id) if cursor_id in ancestor_tokens: link = ancestor_tokens[cursor_id] effective = effective & link.capabilities cursor_id = link.parent_id continue resolved = resolve_current(cursor_id, active_credentials, alias_table) if resolved is None: raise DelegationAuthorityDrift( f"ORPHANED_DELEGATION: ancestor {cursor_id} has no active " f"credential and no resolvable successor" ) # The critical step: intersect with the *current* capability set, # not the one embedded at issuance. narrowed = effective & resolved.capabilities if narrowed != effective: # Strict subset: authority has drifted beneath a live token. # Caller must re-scope to `narrowed`, not honor `effective`. raise DelegationAuthorityDrift( f"authority drift on {token.token_id}: ancestor " f"{cursor_id} (v{resolved.version}) narrowed from " f"{sorted(effective)} to {sorted(narrowed)}" ) effective = narrowed cursor_id = None # root reached return effective ```