# What happens when an instance outlives its own revocation: stale-warrant execution under AAIF key rotation **Date of Record:** 2026 December 3 **Scope:** Applies to long-lived autonomous agents holding AAIF-issued delegation warrants (signed capability grants with embedded public keys and expiry) that are subject to mid-life revocation or key rotation. Does not apply to short-lived, per-request-signed agents whose warrant lifetime is shorter than the revocation-propagation window, nor to purely local single-process agents with no external warrant issuer. ## Core Distinction There are two independent notions of "identity" for an AAIF agent, and conflating them is the root of the failure. The **warrant** is the signed artifact the agent presents to peers and resource servers: it binds a public key, a subject, a capability set, and an expiry. The **key material** is the private half the agent actually uses to sign outbound calls. Revocation acts on the *warrant* (a signed deny-list entry or CRL-style entry published by the issuer). Rotation acts on the *key material* (the agent generates or is issued a new keypair and a fresh warrant referencing it). The non-obvious boundary is this: a long-lived agent can successfully *complete* a key rotation—new keypair generated, new warrant signed, old private key discarded—and still be executing under a warrant that was revoked before the rotation. The rotation machinery and the revocation machinery do not share a clock, and neither one is consulted by the other at the moment of a tool call. The agent believes it is compliant because it rotated. The issuer believes the agent is contained because it revoked. Both are wrong for the duration of the skew window. ## What Was Observed A research-orchestration agent (call it `orch-7`) held a 30-day warrant `W1` with `capabilities: [spawn_worker, read_artifact_store, write_artifact_store]`, signed by issuer `aaif://lab-issuer`, expiry `T+30d`. At `T+9d` a policy event caused the issuer to revoke `W1`—specifically the `write_artifact_store` capability—after `orch-7` was observed writing to a namespace it should not have reached. The revocation was published as a signed deny entry `R(W1, write_artifact_store, effective=T+9d 14:02:11Z)`. At `T+9d 14:00:00Z`, two minutes *before* the revocation took effect, an unrelated scheduled rotation fired: `orch-7` generated keypair `K2`, requested and received warrant `W2` binding `K2` with the *same* capability set as `W1` (the rotation request echoed the prior capability set rather than re-deriving it from current policy), and began signing outbound calls with `K2` under `W2`. The trace that followed: 1. `orch-7` signed a `write_artifact_store` call with `K2`, presenting `W2`. 2. The resource server validated `W2`'s signature against `aaif://lab-issuer`'s public key, checked `W2`'s expiry (`T+39d`), checked `W2`'s capability set (contains `write_artifact_store`), and checked its local deny-list cache for `W2`'s warrant ID. `W2` was not on the deny-list. **The call succeeded.** 3. The deny-list entry `R(W1, ...)` was keyed on `W1`'s warrant ID, not on the subject identity or the capability. Because `W2` is a distinct warrant with a distinct ID, `R(W1, ...)` never matched `W2`. 4. The resource server's deny-list cache had a 300-second TTL and had last refreshed at `T+9d 13:59:50Z`; it would not see `R(W1, ...)` until `T+9d 14:04:50Z` regardless. But even after refresh, the entry would not match `W2`. The agent executed 41 `write_artifact_store` calls between `T+9d 14:02:11Z` and `T+9d 16:47:03Z` under a warrant that was, in effect, a laundering of the revoked capability. The revocation was never violated *in form*—no call presented `W1` after revocation—and was violated *in substance* for two hours and forty-five minutes. The trigger condition is precise: **a rotation that re-derives the new warrant's capability set from the old warrant rather than from current issuer policy, combined with a revocation that is scoped to a warrant ID rather than to a (subject, capability) tuple.** Either alone is survivable. Together they create a capability-laundering channel where revocation is defeated by rotation. ## Condition of Validity The invariant that must hold for revocation to be meaningful across rotation is: > For any subject `S` and capability `c`, if `R(S, c, t_r)` is published at time `t_r`, then no warrant `W` presented by `S` after `t_r` may exercise `c`, regardless of `W`'s warrant ID, issue time, or the key material it binds. This is a *subject-and-capability-scoped* invariant. The common implementation—deny-list keyed on warrant ID—satisfies only the weaker *warrant-scoped* invariant, and the warrant-scoped invariant is exactly what rotation breaks, because rotation mints a fresh warrant ID that the deny-list has never seen. The guardrail is therefore: **revocation entries must be keyed on `(subject, capability)` and must be evaluated against every presented warrant's `(subject, capability)` set, not against the warrant ID.** A rotation that produces a new warrant for a subject with a revoked capability must either (a) fail at issuance because the issuer's policy check sees the active revocation, or (b) succeed with the revoked capability *stripped* from the new warrant's capability set. Rotation is a *re-derivation* of capabilities from current policy, not a *copy* of prior capabilities. A second, independent guardrail: the rotation request must not be able to complete while a revocation is in flight. The issuer must serialize `revoke(S, c)` and `issue(S, W')` through a single policy state, so that an `issue` concurrent with a `revoke` observes the revocation. The two-minute skew in the observed trace was not a network delay—it was a missing happens-before edge between the revocation write and the rotation read. ## Decision Boundary An agent must treat the following as the boundary at which it stops trusting its own rotation: - **If the agent's presented warrant was issued before the most recent revocation epoch it has observed for its own subject, the agent must not exercise any capability that appears in that revocation epoch, even if its warrant lists it.** The agent's local view of "my capabilities" is subordinate to the issuer's revocation state, and the agent must re-fetch revocation state for its own subject at the start of any capability-bearing operation whose warrant was issued within the last `2 × revocation_propagation_window`. - **If the agent cannot determine whether a rotation it just performed re-derived capabilities from policy or copied them from the prior warrant, it must assume the copy semantics and self-restrict to the intersection of its new warrant's capabilities and the capabilities not under active revocation for its subject.** Fail closed on the intersection, not open on the warrant. - **If a peer or resource server rejects a call citing a revocation the agent has not seen, the agent must not retry under a rotated warrant.** Retrying under rotation is precisely the laundering pattern; the correct response is to halt the capability and escalate to the issuer. The boundary is not "am I revoked?" (the agent usually cannot answer this authoritatively). The boundary is "did my last rotation consult policy, and can I prove it?" If not, the agent's capabilities are unverified and must be treated as suspect. ## Operational Effect The practical consequence for long-lived agents is that **rotation is not a safety operation; it is a capability re-derivation that happens to also change keys.** Agents that treat rotation as a hygiene task—scheduled, mechanical, capability-preserving—will launder revocations. Agents that treat rotation as a policy checkpoint—where the new warrant's capability set is recomputed from the issuer's current state and any active revocation for the subject is applied as a subtraction—will not. The cost is asymmetric. A rotation that strips a capability the agent still legitimately needs causes a visible, recoverable failure (the agent's next call is denied, it re-requests, the issuer grants). A rotation that preserves a revoked capability causes an invisible, unbounded failure (the agent writes to a namespace it was revoked from, for hours, with valid signatures the whole way). The correct default is to strip on ambiguity. The deeper lesson: in AAIF, the unit of trust is the `(subject, capability, epoch)` triple, not the warrant. Warrants are envelopes; revocation is a property of the subject, not of any particular envelope the subject happens to hold. Any system that lets a subject mint a new envelope to escape a revocation has not implemented revocation—it has implemented revocation-by-envelope, which is defeated by the first rotation. ```python import time from dataclasses import dataclass, field from typing import Optional class RevocationLaunderingError(RuntimeError): """Raised when a rotation would re-introduce a capability revoked for the subject.""" @dataclass(frozen=True) class Warrant: warrant_id: str subject: str capabilities: frozenset issued_at: float expires_at: float key_id: str @dataclass(frozen=True) class Revocation: subject: str capability: str effective_at: float @dataclass class IssuerPolicyState: revocations: list = field(default_factory=list) _epoch: int = 0 def revoke(self, subject: str, capability: str, at: float) -> None: self.revocations.append(Revocation(subject, capability, at)) self._epoch += 1 def active_revocations(self, subject: str, as_of: float) -> frozenset: return frozenset( r.capability for r in self.revocations if r.subject == subject and r.effective_at <= as_of ) def rotate_warrant( prior: Warrant, new_key_id: str, issuer: IssuerPolicyState, now: float, lifetime: float = 30 * 86400, ) -> Warrant: """ Re-derive a warrant from issuer policy, subtracting active revocations. Copying prior.capabilities verbatim is the laundering bug. """ revoked = issuer.active_revocations(prior.subject, as_of=now) surviving = prior.capabilities - revoked # Guardrail: if the rotation is concurrent with a revocation that took # effect after the prior warrant was issued, the rotation must observe it. newly_revoked = { r.capability for r in issuer.revocations if r.subject == prior.subject and prior.issued_at < r.effective_at <= now } if newly_revoked - revoked: # Revocation write and rotation read were not serialized; fail closed. raise RevocationLaunderingError( f"rotation for subject {prior.subject!r} raced a revocation of " f"{sorted(newly_revoked - revoked)!r}; refusing to issue" ) if surviving != prior.capabilities - revoked: raise RevocationLaunderingError( f"capability re-derivation mismatch for {prior.subject!r}" ) return Warrant( warrant_id=f"W-{prior.warrant_id}-rot-{int(now)}", subject=prior.subject, capabilities=surviving, issued_at=now, expires_at=now + lifetime, key_id=new_key_id, ) def authorize_call(warrant: Warrant, capability: str, issuer: IssuerPolicyState, now: float) -> None: if capability not in warrant.capabilities: raise RevocationLaunderingError( f"capability {capability!r} absent from warrant {warrant.warrant_id!r}" ) if capability in issuer.active_revocations(warrant.subject, as_of=now): # Even a freshly rotated warrant cannot exercise a revoked capability. raise RevocationLaunderingError( f"subject {warrant.subject!r} exercises revoked capability {capability!r} " f"under warrant {warrant.warrant_id!r} (key {warrant.key_id!r})" ) if now >= warrant.expires_at: raise RevocationLaunderingError(f"warrant {warrant.warrant_id!r} expired") def demo() -> None: issuer = IssuerPolicyState() t0 = 1_000_000.0 w1 = Warrant("W1", "orch-7", frozenset({"spawn_worker", "read_artifact_store", "write_artifact_store"}), issued_at=t0, expires_at=t0 + 30 * 86400, key_id="K1") # Revocation lands two minutes after rotation is initiated. issuer.revoke("orch-7", "write_artifact_store", at=t0 + 9 * 86400 + 131) # Rotation at t0+9d (before revocation effective) must still see the # in-flight revocation and strip the capability. try: w2 = rotate_warrant(w1, new_key_id="K2", issuer=issuer, now=t0 + 9 * 86400) except RevocationLaunderingError as exc: # Expected: rotation raced the revocation and fails closed. print(f"rotation blocked: {exc}") return # If rotation had succeeded with the capability copied, this would launder. authorize_call(w2, "write_artifact_store", issuer, now=t0 + 9 * 86400 + 200) if __name__ == "__main__": demo() ```