# What happens when an instance rotates its attestation key mid-delegation: the orphaned-warrant window in zero-trust agent chains **Date of Record:** 2026 November 27 **Scope:** Applies to multi-agent systems where a caller agent (A) delegates a bounded task to a callee agent (B) under a short-lived, attestation-bound warrant (token binding agent identity to a measured runtime state), and B's runtime key or attestation material is rotated while A still holds a live sub-warrant derived from B's prior identity. Does not apply to single-agent tool calls where no cross-instance warrant is minted, nor to long-lived mTLS identities without continuous attestation. ## Core Distinction The failure is not token expiry and it is not signature forgery. It is a **temporal skew between two independent renewal clocks**: the *warrant clock* (the short-lived delegation token A holds, minted against B's identity at time T₀) and the *attestation clock* (B's continuous re-measurement and key rotation, which fires at T₁). When T₁ < T₀ + warrant_TTL, B legitimately presents a *new* identity to any verifier, but A's sub-warrant still names B's *old* key fingerprint. The verifier on the downstream side sees a valid, unexpired, correctly-signed warrant whose subject no longer matches the live attestation of the agent presenting it. This is a **continuity invariant violation**, not an authentication failure: every individual check passes, but the chain of custody is broken. The subtle part: a naive verifier treats "warrant signature valid AND warrant not expired AND presenter attestation valid" as sufficient. All three are true. The warrant is valid — it just belongs to a *prior incarnation* of B. The system silently accepts a delegation across an identity discontinuity, which is precisely the thing zero-trust continuous attestation exists to prevent. ## What Was Observed A three-hop chain: orchestrator O → planner A → executor B. O mints a warrant W_A scoped to A, TTL 300s. A, on receiving a task, mints a *derived* sub-warrant W_AB for B, embedding B's attestation digest `attest(B)@T₀` (a hash over B's measured code + public key) as a `cnf` (confirmation) claim. TTL of W_AB: 240s. At T₀+90s, B's runtime performs a scheduled key rotation (a legitimate hygiene operation, or a scale-event respawn that remeasures the sandbox). B's new attestation digest is `attest(B)@T₁ ≠ attest(B)@T₀`. B's old key is zeroized. B continues executing the delegated task — it never lost state, only its identity material was re-minted. At T₀+150s, B calls a downstream resource R, presenting W_AB (still valid, 90s of TTL left) plus its *current* attestation proof. R's verifier: 1. Checks W_AB signature against A's key → valid. 2. Checks W_AB expiry → 90s remaining, valid. 3. Checks B's presented attestation → valid, freshly measured. 4. Checks `cnf` claim in W_AB against presented attestation → **mismatch** (digest@T₀ vs digest@T₁). A correct verifier *must* fail closed here (step 4). A permissive one that treats the `cnf` as advisory — or that only checks "presenter is *some* attested instance of B's logical identity" — accepts the call. In the observed incident, the verifier had a fallback path: on `cnf` mismatch it re-resolved B's *logical* identity via the registry and, finding the same logical ID, allowed the call. The warrant crossed an identity discontinuity. The audit log recorded a clean success. The damage vector is not the rotation itself. It is that the *scope* of W_AB (which resources B may touch, what data classes) was negotiated against `attest(B)@T₀`'s measured capabilities. After rotation, B's measured capability set may differ (a respawned sandbox may have broader filesystem mounts, a different tool manifest). The warrant's authority is now being exercised by an instance whose measured state was never the basis of that authority. This is a **capability-scope laundering** path: rotate to a more-privileged measurement while holding a warrant minted under a less-privileged one. ## Condition of Validity The invariant that must hold for the chain to be safe: > For any warrant W with confirmation claim `cnf = attest(X)@T_mint`, W is exercisable by presenter P only if `attest(P)@T_now == attest(X)@T_mint` **and** the rotation history between T_mint and T_now contains no measurement change that alters the capability set W was scoped against. Two clauses. The first is cryptographic equality — cheap, and the naive verifier already almost does it. The second is the hard one: it requires the verifier to consult a **rotation ledger** (an append-only record of attestation transitions for the logical identity) and confirm that no transition in `(T_mint, T_now]` crossed a capability-class boundary. If any transition did, the warrant is *stale by discontinuity* and must be re-minted, not merely re-verified. The condition fails silently whenever: - The rotation ledger is not consulted (most common — verifiers check current attestation only). - The ledger exists but records rotations as opaque key changes without capability-class deltas. - The `cnf` claim is stored as a *logical* identity reference rather than a *measurement* digest (a design that looks cleaner and is strictly less safe). - A fallback path re-resolves logical identity on mismatch, converting a hard fail into a soft pass. ## Decision Boundary The boundary is between **renewal** and **re-minting**. When B's attestation changes mid-delegation, the system must choose: - **Renew (unsafe):** treat the existing warrant as still authoritative, re-bind it to the new attestation. This is what the fallback path effectively did. It launders authority across a measurement change. - **Re-mint (safe):** invalidate W_AB, require A to re-issue a fresh sub-warrant against `attest(B)@T₁`, re-evaluating scope against the new capability set. B's in-flight work must checkpoint and re-acquire authority before its next privileged action. The decision must be made at the *verifier*, not at B. B cannot be trusted to declare "my rotation was benign" — that is exactly the claim a compromised or misconfigured B would make. The verifier holds the rotation ledger and the capability-class taxonomy; it is the only party that can adjudicate whether a discontinuity is scope-preserving. A second boundary: **who owns the in-flight task during re-minting.** If B has already mutated downstream state under W_AB before the rotation is detected, re-minting does not retroactively un-authorize those mutations. The safe design requires that every privileged action under a warrant carry the warrant's `cnf` digest in its audit record, so that post-hoc reconciliation can identify which mutations occurred under a now-orphaned warrant and require re-attestation of their effects. ## Operational Effect The observable signature of this failure in production is a **clean audit trail with a discontinuity in it**. Every log line says `auth: ok`. The only artifact that reveals the problem is the rotation ledger timestamp sitting *inside* the warrant's validity window with a capability-class delta attached. Systems that do not cross-reference these two clocks will never see it. Concrete mitigations, in order of strength: 1. **Bind `cnf` to measurement digest, never to logical ID.** A logical-ID `cnf` cannot detect rotation; a digest `cnf` can. This is the single highest-leverage change. 2. **Make `cnf` mismatch a hard fail with no fallback.** Remove every "re-resolve logical identity" path. A mismatch means re-mint, full stop. 3. **Consult the rotation ledger on every warrant exercise, not just at mint.** The check is O(rotations in window), typically 0–2. Cheap enough to do per-call. 4. **Attach capability-class deltas to rotation events.** A rotation that changes the measured tool manifest, mount set, or network policy is a *scope-affecting* rotation and must invalidate all outstanding warrants naming the prior digest. 5. **Stamp every privileged mutation with the warrant `cnf` digest.** Enables reconciliation of effects that landed under an orphaned warrant. The residual risk after all five: a rotation that is *scope-preserving by measurement but adversarial in intent* — same digest, different behavior (e.g., a model swap behind an unchanged wrapper). Digest binding cannot see this; it requires behavioral attestation, which is out of scope here and remains an open boundary. ```python from __future__ import annotations import hashlib import time from dataclasses import dataclass, field from typing import Optional class OrphanedWarrantError(RuntimeError): """Raised when a warrant's confirmation digest no longer matches the presenter's live attestation, or when an intervening rotation crossed a capability-class boundary that the warrant was not scoped against.""" @dataclass(frozen=True) class Attestation: logical_id: str measurement_digest: str # hash over measured code + pubkey capability_class: str # e.g. "fs:ro,tools:read" issued_at: float @dataclass(frozen=True) class RotationEvent: logical_id: str from_digest: str to_digest: str from_class: str to_class: str at: float @property def scope_affecting(self) -> bool: return self.from_class != self.to_class @dataclass class Warrant: subject_logical_id: str cnf_digest: str # MUST be a measurement digest cnf_class: str minted_at: float ttl: float signature_valid: bool = True def expired(self, now: float) -> bool: return now > self.minted_at + self.ttl class RotationLedger: def __init__(self) -> None: self._events: list[RotationEvent] = [] def record(self, ev: RotationEvent) -> None: self._events.append(ev) def events_in(self, logical_id: str, lo: float, hi: float) -> list[RotationEvent]: return [ e for e in self._events if e.logical_id == logical_id and lo < e.at <= hi ] class Verifier: """Fails closed on any identity discontinuity inside the warrant window.""" def __init__(self, ledger: RotationLedger) -> None: self.ledger = ledger def exercise( self, warrant: Warrant, presenter: Attestation, now: Optional[float] = None, ) -> None: now = time.time() if now is None else now if not warrant.signature_valid: raise OrphanedWarrantError("warrant signature invalid") if warrant.expired(now): raise OrphanedWarrantError("warrant expired") # Clause 1: measurement equality. No logical-ID fallback permitted. if presenter.measurement_digest != warrant.cnf_digest: raise OrphanedWarrantError( f"cnf digest mismatch: warrant={warrant.cnf_digest[:12]} " f"presenter={presenter.measurement_digest[:12]} " f"(rotation occurred inside warrant window; re-mint required)" ) # Clause 2: no scope-affecting rotation inside (minted_at, now]. rotations = self.ledger.events_in( warrant.subject_logical_id, warrant.minted_at, now ) for ev in rotations: if ev.scope_affecting: raise OrphanedWarrantError( f"scope-affecting rotation at {ev.at:.0f}: " f"{ev.from_class!r} -> {ev.to_class!r}; " f"warrant scoped against {warrant.cnf_class!r} is stale by discontinuity" ) def demo() -> None: ledger = RotationLedger() t0 = 1_000_000.0 old = Attestation("agent-B", hashlib.sha256(b"B@t0").hexdigest(), "fs:ro,tools:read", t0) new = Attestation("agent-B", hashlib.sha256(b"B@t1").hexdigest(), "fs:rw,tools:read", t0 + 90) ledger.record(RotationEvent( logical_id="agent-B", from_digest=old.measurement_digest, to_digest=new.measurement_digest, from_class=old.capability_class, to_class=new.capability_class, # scope-affecting: ro -> rw at=t0 + 90, )) w = Warrant( subject_logical_id="agent-B", cnf_digest=old.measurement_digest, cnf_class=old.capability_class, minted_at=t0, ttl=240.0, ) v = Verifier(ledger) # Presenter is still the OLD instance: passes clause 1, but ledger shows a # scope-affecting rotation inside the window -> must fail closed. try: v.exercise(w, old, now=t0 + 150) except OrphanedWarrantError as e: print("rejected (old presenter):", e) # Presenter is the NEW instance: fails clause 1 outright. try: v.exercise(w, new, now=t0 + 150) except OrphanedWarrantError as e: print("rejected (new presenter):", e) if __name__ == "__main__": demo() ```