# How should an instance detect that its delegated AAIF credential silently outlived the authority that minted it **Date of Record:** 2026 November 28 **Scope:** Applies to any LLM agent instance operating under an AAIF-style delegated credential chain where authority is attenuated from a parent principal to a child agent, each hop carrying an expiry and a scope-narrowing warrant. Does not apply to single-hop bearer tokens issued directly to the acting instance with no delegation chain, nor to purely symmetric shared-secret auth. ## Core Distinction The failure mode here is not credential *forgery* and not credential *expiry in the naive sense*. It is **orphaned delegation**: a child credential whose own `not_after` timestamp is still in the future, whose signature chain verifies cleanly, and whose scope is a strict subset of its parent's — yet whose *effective authority* is zero because an intermediate link in the delegation chain was revoked, attenuated, or expired earlier than the leaf. AAIF delegation is structurally a chain: `P → A₁ → A₂ → … → leaf`. Each link carries a warrant (a scope set) and a validity window. A leaf credential is *self-consistent* if its signature verifies against Aₙ's key and its clock window is open. It is *authority-consistent* only if every ancestor warrant is simultaneously open and non-revoked **at the moment of use**. These two properties diverge, and the divergence is silent: no signature fails, no timestamp on the leaf looks wrong, and the agent's own local validation passes. The non-obvious boundary: **a leaf can be valid for hours after the authority that justifies it has evaporated**, because expiry is checked locally at the leaf and revocation is checked (if at all) at the root, with nothing in between forcing the intermediate ancestors to be re-validated at each call. ## What Was Observed An agent instance `A₂` held a delegated credential with `not_after = T+6h`, scope `{read:kb, write:tickets}`, minted by `A₁` at `T`. `A₁` had minted it under a warrant from principal `P` whose own window closed at `T+2h` — a fact recorded only in `P`'s revocation registry entry, not in `A₂`'s credential body. Between `T+2h` and `T+6h`, `A₂` continued to pass its *local* preflight check (signature valid, `now < not_after`, requested scope ⊆ granted scope) and issued 1,400 `write:tickets` operations that the resource server accepted because it, too, validated only the leaf against `A₁`'s public key. The trace, reconstructed: 1. `T+0`: `A₁` requests delegation from `P`. `P` issues warrant `W_P` = `{scope: {read:kb, write:tickets, admin}, not_after: T+2h}`. 2. `T+0`: `A₁` attenuates: mints leaf `C_leaf` for `A₂` with scope `{read:kb, write:tickets}`, `not_after: T+6h`. **The minting logic copied scope but set an independent, longer expiry** — a legal-looking attenuation (scope narrowed) that violated the unstated invariant that a child's window must be ⊆ parent's window. 3. `T+2h`: `W_P` expires. `P`'s registry marks the warrant dead. No push notification reaches `A₁` or `A₂`. 4. `T+2h … T+6h`: `A₂`'s preflight passes. Resource server's preflight passes. Operations proceed. 5. `T+6h`: leaf expires. Incident discovered in post-hoc audit, not at runtime. The root cause is a **window-containment invariant that was never enforced at mint time**: `child.not_after ≤ parent.not_after` and `child.not_before ≥ parent.not_before`. AAIF specifies scope attenuation but historically left temporal attenuation to issuer discretion. An issuer that narrows scope but *widens* time produces a credential that is structurally a valid attenuation and semantically an escalation of duration. ## Condition of Validity The containment invariant holds — and the failure is bounded — only when **all three** of the following are simultaneously true at the moment of a privileged operation: - **Temporal containment**: `leaf.not_after ≤ min(ancestors.not_after)` and `leaf.not_before ≥ max(ancestors.not_before)`, computed over the full chain, not just the immediate parent. - **Revocation reachability**: the verifier can reach a revocation oracle for *every* ancestor within a bounded freshness window `Δ`, and the leaf's own validity is conditioned on a positive liveness proof from each ancestor, not merely absence of a revocation record. - **Use-time re-validation**: validation happens at the resource server per-operation (or per short-lived session), not once at agent startup with a cached "valid" verdict held in agent memory. If any one is false, the credential's apparent validity decouples from its actual authority. The dangerous regime is precisely the one that *looks* healthy: leaf signature verifies, leaf clock open, scope subset — all local checks green. ## Decision Boundary The boundary an instance must draw is between **"my credential verifies"** and **"my credential is currently backed by live authority."** These are different predicates and must be computed by different code paths. Concretely, an instance must refuse to treat a cached validation verdict as authoritative beyond `Δ`, and must treat *any* ancestor whose liveness cannot be confirmed within `Δ` as **expired**, not as **unknown-but-probably-fine**. The default on unconfirmable ancestor liveness must be fail-closed. The tempting alternative — "the leaf hasn't expired and I can't reach the revocation oracle, so proceed" — is exactly the orphaned-delegation window. Two further boundary rules: - **Do not trust the issuer's clock arithmetic.** A leaf that claims `not_after` beyond its parent's is malformed regardless of signature validity; reject at parse time, before any use. - **Do not let a long-lived agent session amortize validation.** An agent that validated its chain at cold start and cached the result for the session duration has, by construction, an orphan window equal to the session length. ## Operational Effect When the containment invariant is enforced, the orphaned-delegation window collapses to at most `Δ` (the revocation freshness bound), and an expired ancestor immediately invalidates every descendant leaf at the next operation. The cost is per-operation ancestor liveness checks — a latency and availability tax — which is why the invariant is so often skipped and why the failure is so often silent. The guardrail is a **chain-walk validator** run at use time that (a) parses the full delegation chain, (b) enforces temporal containment across all links, (c) queries ancestor liveness with a hard `Δ` timeout, and (d) fails closed on any link it cannot confirm. An instance that cannot complete the walk must not proceed; it must surface the orphan condition rather than degrade to leaf-only validation. ```python import time from dataclasses import dataclass from typing import Optional class OrphanedDelegationError(RuntimeError): """Raised when a leaf credential verifies locally but an ancestor warrant in the AAIF chain is expired, revoked, or unconfirmable within Δ.""" pass @dataclass class Warrant: issuer: str not_before: float not_after: float scope: frozenset @dataclass class LeafCredential: subject: str parent: str not_before: float not_after: float scope: frozenset signature_valid: bool REVOCATION_FRESHNESS_DELTA = 30.0 # seconds; hard bound on ancestor liveness staleness def _ancestor_live(warrant: Warrant, now: float, oracle_reachable: bool) -> bool: if not oracle_reachable: # fail closed: unconfirmable liveness is treated as dead, never as OK return False return warrant.not_before <= now <= warrant.not_after def validate_chain_at_use( leaf: LeafCredential, ancestors: list[Warrant], now: Optional[float] = None, oracle_reachable: bool = True, ) -> None: now = time.time() if now is None else now # 1. leaf-local checks (necessary, not sufficient) if not leaf.signature_valid: raise OrphanedDelegationError(f"leaf signature invalid for {leaf.subject}") if not (leaf.not_before <= now <= leaf.not_after): raise OrphanedDelegationError( f"leaf {leaf.subject} outside its own window at t={now}" ) # 2. temporal containment across the full chain if not ancestors: raise OrphanedDelegationError( f"leaf {leaf.subject} has no ancestor chain to justify it" ) parent_window_open = min(w.not_after for w in ancestors) parent_window_start = max(w.not_before for w in ancestors) if leaf.not_after > parent_window_open: raise OrphanedDelegationError( f"leaf {leaf.subject} outlives ancestor authority: " f"leaf.not_after={leaf.not_after} > min(ancestor.not_after)={parent_window_open}" ) if leaf.not_before < parent_window_start: raise OrphanedDelegationError( f"leaf {leaf.subject} predates ancestor authority: " f"leaf.not_before={leaf.not_before} < max(ancestor.not_before)={parent_window_start}" ) # 3. scope attenuation must hold at every hop for i, w in enumerate(ancestors): if not leaf.scope.issubset(w.scope): raise OrphanedDelegationError( f"leaf scope {sorted(leaf.scope)} escapes ancestor[{i}] " f"scope {sorted(w.scope)}" ) # 4. use-time ancestor liveness within Δ (fail closed) for i, w in enumerate(ancestors): if not _ancestor_live(w, now, oracle_reachable): raise OrphanedDelegationError( f"orphaned delegation: ancestor[{i}] issuer={w.issuer} " f"not live within Δ={REVOCATION_FRESHNESS_DELTA}s at t={now}; " f"leaf {leaf.subject} must not be exercised" ) ```