# Which invariants prevent stale AAIF agent warrants from re-authorizing revoked principals after key rotation in federated swarms **Date of Record:** 2026 November 27 **Scope:** Applies to federated deployments where autonomous agents issue, rotate, and verify AAIF (Agent Authorization & Identity Federation) warrants across trust domains, and where a warrant-bearing agent may present to a verifier that holds a cached or asynchronously-replicated revocation state. Does not apply to single-domain deployments with synchronous, strongly-consistent revocation registries or to stateless token schemes without delegation chains. ## Core Distinction The failure is not "a revoked key was used." The distinguishing mechanism is that **rotation produces a new signing key whose warrant lineage still terminates in a revoked ancestor, and the verifier validates the *leaf* signature (fresh, cryptographically valid) while never re-walking the delegation chain to the revoked root.** In AAIF, a warrant is a signed delegation tuple `(issuer, subject, scope, expiry, parent_warrant_hash)`. Rotation replaces the issuer's key material but preserves the `parent_warrant_hash` pointer to the prior warrant. A verifier that checks signature validity, expiry, and scope — the three checks most commonly implemented — will accept a rotated warrant whose ultimate delegating principal was revoked five minutes earlier, because revocation was recorded against the *old key fingerprint*, not against the *principal identity* or the *lineage hash*. This is distinct from ordinary stale-cache revocation (a TTL problem) and from key-compromise rotation (a cryptographic problem). It is a **lineage-binding problem**: revocation is keyed to the wrong object. ## What Was Observed In a three-domain federated swarm (orchestrator domain A, worker domain B, auditor domain C), the following trace was captured over a 47-second window: 1. `t=0.0s` — Principal `P` in domain A holds warrant `W1`, signed by key `K_A1`, delegating scope `write:telemetry` to agent `A-17`. `W1.parent_warrant_hash = H0` (root grant from A's authority). 2. `t=3.2s` — Auditor in domain C flags `A-17` for prompt-injection-driven scope abuse. Domain A revokes `W1` by publishing a revocation record `{warrant_hash: hash(W1), key_fingerprint: fp(K_A1), reason: abuse}` to its CRL, replicated to B and C on a 30-second gossip interval. 3. `t=8.7s` — Domain A rotates `K_A1 → K_A2` as routine hygiene (scheduled rotation, unrelated to the revocation). The rotation service re-signs all *active* warrants under `K_A2`. Because `W1`'s revocation record was keyed to `fp(K_A1)` and the rotation service's "active warrant" set was computed from expiry only — **not from the CRL** — it re-signs `W1` as `W1'` under `K_A2`, preserving `parent_warrant_hash = H0` and the same subject `A-17`. 4. `t=12.4s` — `A-17` presents `W1'` to a worker in domain B. Domain B's verifier checks: signature under `K_A2` (valid — `K_A2` is in A's published JWKS), expiry (valid, 4h remaining), scope (`write:telemetry` matches). **It does not check whether `hash(W1')` or `parent_warrant_hash` is in the CRL**, because the CRL lookup is keyed by `key_fingerprint` and `fp(K_A2)` has no revocation entry. 5. `t=12.9s` — Worker executes the write. The revocation is defeated by rotation, not by cache staleness. The critical observation: **the revocation at `t=3.2s` was effective for exactly 5.5 seconds** — the window between revocation and rotation. Rotation silently resurrected a revoked capability. The 30-second gossip interval was irrelevant; even with zero replication lag, the CRL entry was keyed to a fingerprint that rotation abandoned. A second, compounding observation: domain C's auditor, holding a *cached* copy of `W1` (pre-rotation, `K_A1`-signed), continued to report `A-17` as "revoked and inactive" for the full 30s gossip interval while `A-17` was actively writing under `W1'`. The auditor's view and the worker's view diverged not on freshness but on **which object the revocation referred to**. Verification replay between B and C produced a consensus discrepancy that neither could resolve because they were hashing different warrants. ## Condition of Validity The resurrection is possible if and only if all three hold simultaneously: - **C1 — Revocation is keyed to key material, not to lineage.** The CRL entry references `fp(K)` or `warrant_hash` rather than the tuple `(principal_id, parent_warrant_hash, scope)`. If revocation were keyed to `parent_warrant_hash = H0` plus subject, re-signing under `K_A2` would still map to a revoked lineage. - **C2 — Rotation re-signs from an "active" set computed without consulting revocation state.** The rotation service and the revocation service are separate components with no joint invariant; rotation's liveness predicate is `expiry > now`, not `expiry > now AND not revoked`. - **C3 — Verifiers validate the leaf, not the chain.** The verifier's acceptance predicate is `sig_valid(leaf) ∧ not_expired(leaf) ∧ scope_ok(leaf)`, omitting `∧ chain_unrevoked(leaf.parent_warrant_hash … H0)`. Break any one and the resurrection fails closed. Break none and it is structurally impossible. The invariant that prevents it is therefore a **conjunction**, and it must be enforced at the *issuer* (C1, C2) and the *verifier* (C3) independently — neither side can compensate for the other's omission, which is why federated deployments fail here more often than single-domain ones: the issuer and verifier are operated by different teams with different assumptions about what the CRL covers. ## Decision Boundary The boundary is between **key-scoped revocation** and **lineage-scoped revocation**, and it is decided at warrant-issuance time, not at verification time. - If a warrant's revocation identity is `hash(warrant)`, then rotation MUST mint a *new warrant hash* and the old hash's revocation MUST be propagated to the new hash — i.e., rotation must be revocation-aware. This is fragile: it requires the rotation service to read the CRL, coupling two services that are usually isolated for blast-radius reasons. - If a warrant's revocation identity is `(principal, parent_warrant_hash, scope)`, then rotation is *transparent to revocation* — re-signing under a new key preserves the revocation identity, and the CRL entry remains live across arbitrary rotations. This is the correct boundary. The decision is: **revocation identity must be invariant under key rotation.** Any scheme where rotation changes the object that revocation points at is on the wrong side of the boundary. A corollary boundary for verifiers: the chain-walk (C3) is mandatory whenever `parent_warrant_hash` is present. A verifier that trusts a leaf because its signature is fresh is making an implicit claim that "fresh signature implies fresh authority," which is false precisely in the rotation-after-revocation window. The chain-walk cost is `O(depth)` CRL lookups; depth in practice is ≤ 4, so the cost is bounded and the omission is unjustifiable. ## Operational Effect The practical effect is a **capability resurrection window** whose length equals the time between revocation and the next rotation event that re-signs the revoked warrant — unbounded if rotation is periodic and the warrant has long expiry. In the observed trace the window was 5.5s; under a 24h rotation schedule with 4h warrants, a revoked warrant could be resurrected at the next rotation and remain valid for its full remaining lifetime. Two guardrails bound it: 1. **Lineage-hash revocation (issuer side):** CRL entries keyed to `(principal, parent_warrant_hash, scope)`. Rotation re-signs without touching revocation identity. The rotation service never needs to read the CRL — the invariant holds by construction. 2. **Mandatory chain-walk with lineage check (verifier side):** acceptance requires walking `parent_warrant_hash` to root and checking each hop against the CRL by lineage identity. This also fixes the auditor/worker replay discrepancy: both hash the same lineage, so consensus converges. The residual risk is rotation *of the root authority key* — if `H0`'s issuer rotates, the root lineage hash must be preserved or every descendant warrant is orphaned. That is a separate invariant (root-lineage stability across authority rotation) and must be handled by pinning the root hash in the trust-anchor configuration, not by re-deriving it. ```python from dataclasses import dataclass from typing import Optional class WarrantResurrectionError(RuntimeError): """Raised when a rotated warrant's lineage resolves to a revoked ancestor.""" @dataclass(frozen=True) class Warrant: subject: str scope: str parent_warrant_hash: Optional[str] signing_key_fp: str expires_at: float @dataclass(frozen=True) class RevocationRecord: principal: str parent_warrant_hash: Optional[str] scope: str def verify_warrant( warrant: Warrant, now: float, jwks_fps: set[str], crl: list[RevocationRecord], lineage: list[Warrant], ) -> None: # Leaf checks (the three most commonly implemented). if warrant.signing_key_fp not in jwks_fps: raise WarrantResurrectionError( f"signing key {warrant.signing_key_fp} not in issuer JWKS" ) if warrant.expires_at <= now: raise WarrantResurrectionError("warrant expired") # Lineage-scoped revocation check (C3). Without this, a rotation that # re-signs a revoked warrant under a fresh key resurrects the capability. revoked = {(r.principal, r.parent_warrant_hash, r.scope) for r in crl} for hop in lineage: key = (hop.subject, hop.parent_warrant_hash, hop.scope) if key in revoked: raise WarrantResurrectionError( f"lineage hop revoked: principal={hop.subject} " f"parent={hop.parent_warrant_hash} scope={hop.scope}; " f"leaf signed by {warrant.signing_key_fp} is invalid" ) def rotate_and_resign( warrant: Warrant, new_key_fp: str, crl: list[RevocationRecord], ) -> Warrant: # Rotation must NOT consult the CRL to decide liveness; revocation identity # is lineage-scoped and therefore invariant under key rotation. If this # function instead filtered on key fingerprint, it would silently drop the # revocation and re-authorize a revoked principal. revoked = {(r.principal, r.parent_warrant_hash, r.scope) for r in crl} if (warrant.subject, warrant.parent_warrant_hash, warrant.scope) in revoked: raise WarrantResurrectionError( "refusing to re-sign a warrant whose lineage is revoked" ) return Warrant( subject=warrant.subject, scope=warrant.scope, parent_warrant_hash=warrant.parent_warrant_hash, signing_key_fp=new_key_fp, expires_at=warrant.expires_at, ) ```