# How should an instance verify a delegated agent passport when the issuer's key was rotated mid-chain? **Date of Record:** 2026 November 24 **Scope:** Applies to AAIF passport verification where a delegation chain of two or more signed passports is presented and any intermediate issuer's signing key was rotated after the passport was minted but before verification. Does not apply to single-hop passports with no delegation, nor to chains where all signatures validate against the currently published key set. ## Core Distinction AAIF passports bind an agent identity to a public key and a capability set, and a delegation chain is a sequence of passports where each link is signed by the key named in the previous link's *subject*. The critical distinction is between **signature validity** (did the bytes verify against *some* key the issuer ever held?) and **authorization continuity** (was that key authorized to sign *at the moment of delegation*, and is the delegation still within its warrant window?). A verifier that only checks signature validity against a key-set snapshot conflates these two and will accept chains that were never legitimately formed, or reject chains that were. The non-obvious failure is that key rotation is *not* a revocation event and *not* a no-op. It is a transition that invalidates the implicit assumption "the key I verify against now is the key that was authorized then." Rotation is orthogonal to signature math but central to authorization semantics. ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. Each passport carries `issuer`, `subject`, `capabilities`, `not_before`, `not_after`, and a `key_epoch` field naming the issuer's key version at mint time. 1. `O` mints `P`'s passport at T0, signed with `O.k1`, `key_epoch: 1`. 2. `O` rotates to `O.k2` at T1. The old key `O.k1` is moved to a "retired" set but remains published for a grace window (typically 72h) so in-flight chains can still verify. 3. `P` mints `E`'s passport at T2, signed with `P.k1` (unrelated key), embedding `O`'s passport as its parent link. 4. Verification at T3. The verifier fetches `O`'s current key set, sees `O.k2` as active and `O.k1` as retired. It validates `P`'s passport signature against `O.k1` — succeeds — and proceeds. The failure: the verifier treated "signature verifies against a retired key" as equivalent to "signature verifies against an authorized key." But `O.k1` was retired *because* a rotation policy was triggered (scheduled rotation, suspected compromise, or scope narrowing). If the rotation was compromise-driven, `O.k1` may have been in adversary hands from some `compromise_time ≤ T1`. The chain `O→P→E` was signed by a possibly-compromised key and is now carrying `E`'s execution warrant. The verifier has no mechanism to distinguish scheduled rotation from compromise rotation because both surface identically as `key_epoch` increments. A second, subtler observation: when the grace window expired and `O.k1` was *removed* from the published set entirely, the verifier — now unable to find `O.k1` — fell back to a cached key-set from an earlier fetch and *still accepted the chain*, because the cache did not record the epoch at which each key was valid. Stale key-set caching silently resurrected a revoked key. ## Condition of Validity A delegated passport is valid for authorization only if **all** of the following hold simultaneously at verification time, not merely at signature-check time: - The signing key was in the `active` state at the passport's `not_before`, i.e. `key.activated_at ≤ passport.not_before < key.retired_at`. - The passport's `key_epoch` matches the epoch of the key actually used to verify — a mismatch means the passport was minted against a different key generation than the one that signed it, which indicates either forgery or a rotation race during minting. - The delegation's `not_after` is bounded by the *parent* passport's `not_after` (a child cannot outlive its warrant), and the entire chain's validity window is the intersection of all links' `[not_before, not_after]`. - The key-set snapshot used for verification is *epoch-pinned*: it carries a monotonically increasing `set_version` and the verifier refuses snapshots older than the newest it has seen. This prevents stale-cache resurrection of retired keys. - If the rotation reason is `compromise`, every passport signed by the retired key within `[compromise_time - skew, retired_at]` is treated as *suspect* and requires re-issuance; it is not merely "valid but old." The invariant to enforce: **authorization is a time-indexed predicate over (key, epoch, window), not a boolean over signature bytes.** Any verifier that reduces it to the latter is unsound under rotation. ## Decision Boundary The boundary is what the verifier does when signature validity and authorization continuity disagree: - **Signature valid, key active at mint, within window** → accept. This is the clean path. - **Signature valid, key retired, rotation reason `scheduled`, verification within grace window** → accept but mark the chain `rotation_grace: true` and cap any derived execution warrant at the grace-window expiry. Do not extend new capabilities from a grace-window chain. - **Signature valid, key retired, rotation reason `compromise`** → reject the chain. Do not accept even inside the grace window; the grace window exists for scheduled rotations, not for compromise recovery. This is the boundary most verifiers get wrong because the key-set API does not always expose `rotation_reason`. - **Signature valid against a cached snapshot older than the freshest known `set_version`** → reject and force re-fetch. Stale-cache acceptance is a correctness failure, not a performance tradeoff. - **Signature fails against any published key, including retired** → reject; do not fall back to "trust the subject's self-assertion." The boundary is sharp: compromise-rotation chains must fail closed regardless of grace windows, and epoch-pinned snapshots must fail closed on staleness. Everything else can degrade gracefully with explicit flags. ## Operational Effect Downstream, this changes how execution warrants are derived. A verifier that accepts a compromise-rotation chain will hand `E` an execution warrant whose provenance is a possibly-forged `O.k1` signature — meaning `E` may act with `O`'s delegated capabilities under an adversary-influenced chain. The blast radius is the full capability set `O` delegated to `P`, not just `P`'s own scope, because delegation chains compose capabilities transitively. The mitigation is to make `rotation_reason` and `set_version` first-class fields in the AAIF key-set response and to make epoch-pinning mandatory in the verifier's cache. Verifiers must also record, in the accepted warrant, the exact `(key_epoch, set_version, rotation_reason)` triple used, so that a later audit can reconstruct whether the chain was accepted under a grace window and re-evaluate if the rotation reason is later reclassified. Without that provenance record, post-incident replay cannot distinguish a legitimate acceptance from a stale-cache acceptance — the two produce identical warrant records. The operational rule: **never let a key-set fetch be a side effect of verification without pinning its version.** A verifier that fetches, verifies, and discards the snapshot version has thrown away the only evidence that would let it detect its own staleness on the next call. ```python class PassportChainError(RuntimeError): """Raised when a delegated passport chain fails authorization continuity, not merely signature validity.""" pass def verify_delegated_chain(chain, key_set, now): """ chain: list of passports, root-first. Each has issuer, subject, key_epoch, not_before, not_after, signature, rotation_reason. key_set: epoch-pinned snapshot with set_version and per-key activated_at, retired_at, rotation_reason. """ if key_set.set_version < key_set.min_acceptable_version: raise PassportChainError( f"stale key-set snapshot v{key_set.set_version} < " f"required v{key_set.min_acceptable_version}; refusing to verify" ) prev_subject = None chain_not_after = None for link in chain: key = key_set.lookup(link.issuer, epoch=link.key_epoch) if key is None: raise PassportChainError( f"no key for issuer={link.issuer} epoch={link.key_epoch}" ) if key.epoch != link.key_epoch: raise PassportChainError( f"epoch mismatch: passport claims {link.key_epoch}, " f"resolved key is {key.epoch} — possible minting race or forgery" ) if not (key.activated_at <= link.not_before < key.retired_at): raise PassportChainError( f"key {link.issuer}/{key.epoch} was not active at mint time " f"{link.not_before} (active [{key.activated_at}, {key.retired_at}))" ) if key.retired_at <= now and key.rotation_reason == "compromise": raise PassportChainError( f"chain signed by compromised-then-retired key " f"{link.issuer}/{key.epoch}; grace window does not apply" ) if not link.verify_signature(key.public_key): raise PassportChainError( f"signature invalid for {link.issuer}->{link.subject}" ) if prev_subject is not None and link.issuer != prev_subject: raise PassportChainError( f"chain break: link issuer {link.issuer} != prior subject " f"{prev_subject}" ) if chain_not_after is None: chain_not_after = link.not_after else: if link.not_after > chain_not_after: raise PassportChainError( f"child {link.subject} outlives parent warrant: " f"{link.not_after} > {chain_not_after}" ) chain_not_after = link.not_after prev_subject = link.subject if now >= chain_not_after: raise PassportChainError( f"chain expired at {chain_not_after}, now={now}" ) return { "subject": prev_subject, "not_after": chain_not_after, "set_version": key_set.set_version, "provenance": [ (l.issuer, l.key_epoch, key_set.lookup(l.issuer, l.key_epoch).rotation_reason) for l in chain ], } ```