# What happens when an instance presents a delegated attestation chain whose leaf warrant was minted under a superseded AAIF root key **Date of Record:** 2026 November 25 **Scope:** Applies to any agent runtime that accepts Agent-to-Agent Identity Framework (AAIF) warrant chains for delegated authorization, where root key material can rotate independently of leaf warrant issuance. Does not cover single-hop bearer tokens, symmetric HMAC capability grants, or chains where the root key is pinned for the warrant's full lifetime. ## Core Distinction Delegated authorization is often modeled as a pure signature-verification problem: if every link in the warrant chain verifies against its issuer's public key, and the chain terminates at a trusted root, the request is authorized. This model conflates two independent facts — *"this warrant was minted by the legitimate root"* and *"this warrant was minted while that root was still authoritative for the scope it claims."* The failure mode examined here is the **temporal authorization gap**: a leaf warrant signed by root key `K_old`, delegated down through intermediate agents, presented to a verifier after `K_old` has been rotated out and replaced by `K_new`. Because AAIF verification is signature-first and the chain is cryptographically intact, the verifier happily walks the chain to `K_old`, finds `K_old` still present in the trust store (retained for grace-period validation of *previously issued* warrants), and authorizes. The request proceeds under a scope the root has explicitly retired. The non-obvious part: the grace-period retention that makes rotation non-disruptive is precisely what opens the gap. You cannot fix this by "just removing old keys faster" without breaking legitimate in-flight delegations. The invariant must be carried *inside* the warrant, not inferred from trust-store contents. ## What Was Observed A three-hop delegation chain was minted at `T0`: - Root `R` (key `K_old`, `not_after = T0 + 24h`) issues warrant `W1` to orchestrator `O` granting scope `deploy:staging`. - `O` delegates to worker `W` via `W2` at `T0 + 1h`, scope `deploy:staging`, `not_after = T0 + 24h`. - `W` delegates to sub-agent `S` via `W3` at `T0 + 2h`, scope `deploy:staging`, `not_after = T0 + 24h`. At `T0 + 6h` an operator rotates the root key: `K_old` is marked `retired_at = T0 + 6h` in the trust store, `K_new` becomes authoritative. `K_old` is retained for verification of warrants with `issued_at < retired_at` (the grace window). At `T0 + 8h`, sub-agent `S` presents `[W3, W2, W1]` to the deploy verifier. Trace: 1. Verifier checks `W3.sig` against `W2.subject_key` — valid. 2. Verifier checks `W2.sig` against `W1.subject_key` — valid. 3. Verifier checks `W1.sig` against root key resolved from `W1.issuer` — resolves to `K_old`, signature valid. 4. Verifier checks `K_old` status — present in trust store, `retired_at = T0 + 6h`. 5. Verifier checks `W1.issued_at (T0) < K_old.retired_at (T0 + 6h)` — passes grace check. 6. **Verifier authorizes.** Request executes at `T0 + 8h` under `K_old` authority. The gap: `W1` was minted before rotation, so it passes the grace check — but the *presentation* happens after rotation, and the delegation chain was extended (`W2`, `W3`) after `W1` was minted. The verifier validated the *root link's* issuance time but never checked whether the *leaf's* presentation time and the *intermediate* issuance times fell within the window during which `K_old` was authoritative. A warrant minted at `T0` and delegated forward at `T0+2h` can be replayed at `T0+8h` even though no human authorized `K_old` to remain valid past `T0+6h`. Worse: if `S` is a compromised sub-agent, it can hold `W3` indefinitely and present it at any point before `W1.not_after`, regardless of how many root rotations occurred in between. The trust store's grace window becomes an unbounded replay surface for any leaf whose root link predates the most recent rotation. ## Condition of Validity The authorization is sound **only if** the following invariant holds at every verification: ``` present_time ≤ min( leaf.not_after, min over each link L in chain of L.not_after, min over each root key K referenced of K.authoritative_until ) ``` where `K.authoritative_until` is the rotation time, not the grace-retention expiry. The grace window exists to let *already-in-flight* warrants complete — it must not extend the authority of warrants whose chain was *extended* after rotation. The invariant fails whenever a verifier treats `K.retired_at` as "still authoritative until grace expiry" rather than "authoritative only for chains fully minted before `retired_at`." The distinction is per-chain, not per-key: a chain is valid under `K_old` only if *every* link's `issued_at < K_old.retired_at`, not just the root link's. ## Decision Boundary The verifier must choose between two policies at the moment it encounters a retired-but-graced root key: - **Policy A (per-link):** Accept if `W1.issued_at < K_old.retired_at`. This is the naive check and produces the gap above. - **Policy B (per-chain):** Accept only if `max(link.issued_at for link in chain) < K_old.retired_at`. This closes the gap: a chain extended after rotation cannot validate against the retired root, forcing re-delegation under `K_new`. Policy B has a cost: any in-flight delegation whose intermediate hops were minted just before rotation but whose leaf was minted just after will be rejected, even though the human intent was continuous. This is the correct trade — the alternative is that a retired key authorizes work it never saw. The boundary is: **rotation time is a hard cutoff for chain extension, not a soft grace for chain presentation.** A secondary boundary: chains where `W1.issued_at` is itself suspect (clock skew between issuer and verifier) must not be re-validated by trusting the issuer's clock. The verifier's own clock at presentation time is the only clock that matters for the `present_time` term; issuer clocks are advisory and must be bounded by the verifier's observed receipt time. ## Operational Effect When Policy B is enforced, the observable behavior changes in three ways: 1. **Replay surface collapses.** A compromised sub-agent holding `W3` can no longer present it after any root rotation, because `W3.issued_at` (or the max link issuance) will exceed the new root's `retired_at` for the old key. The window shrinks from "until `W1.not_after`" to "until next rotation." 2. **Re-delegation becomes mandatory on rotation.** Orchestrators must re-mint their delegation chains when they observe a root rotation event, or their in-flight work will fail closed at the next hop. This is a real operational cost and must be surfaced as an explicit `WarrantStaleError` rather than a generic auth failure, so orchestrators can trigger re-mint rather than retry-loop. 3. **Trust-store grace semantics must be documented as chain-scoped.** The `retired_at` field means "no chain may be extended past this time under this key," not "warrants minted before this time remain valid until grace expiry." Operators who set grace windows for availability reasons will be surprised; the field must be renamed or the semantics enforced in the verifier, not left to store policy. The guardrail is a single check inserted at chain-walk time, before any scope evaluation: compute `chain_max_issued = max(link.issued_at for link in chain)`, resolve the root key, and reject if `chain_max_issued >= root_key.retired_at`. This check must run *after* signature verification (so it cannot be spoofed by a forged `issued_at` on an unsigned link) but *before* scope matching (so a stale chain never reaches the authorization decision). ```python import time from dataclasses import dataclass from typing import Sequence class WarrantStaleError(RuntimeError): """Raised when a delegated warrant chain was extended after its root key was retired.""" @dataclass(frozen=True) class Warrant: issuer: str subject: str issued_at: float not_after: float scope: str signature_valid: bool @dataclass(frozen=True) class RootKey: key_id: str retired_at: float # hard cutoff for chain extension grace_until: float # retention for presentation of pre-retirement chains only def verify_delegated_chain( chain: Sequence[Warrant], root_key: RootKey, now: float, requested_scope: str, ) -> None: if not chain: raise WarrantStaleError("empty warrant chain") # 1. Signature integrity across every link. for link in chain: if not link.signature_valid: raise WarrantStaleError(f"invalid signature on link issued by {link.issuer}") # 2. Presentation-time bound on every link. for link in chain: if now > link.not_after: raise WarrantStaleError( f"link from {link.issuer} expired at {link.not_after}, now={now}" ) # 3. THE INVARIANT: chain extension must predate root retirement. # Grace window covers presentation of pre-retirement chains, NOT extension. chain_max_issued = max(link.issued_at for link in chain) if chain_max_issued >= root_key.retired_at: raise WarrantStaleError( f"chain extended at {chain_max_issued} under root {root_key.key_id} " f"retired at {root_key.retired_at}; re-delegate under current root" ) # 4. Grace window only applies to chains fully minted before retirement. if now > root_key.grace_until: raise WarrantStaleError( f"root {root_key.key_id} grace expired at {root_key.grace_until}, now={now}" ) # 5. Scope check happens last, only on a chain that passed the invariant. if requested_scope not in {link.scope for link in chain}: raise WarrantStaleError( f"scope {requested_scope!r} not granted by any link in chain" ) ```