# What happens when an instance's hardware-backed attestation key survives a posture downgrade: the stale-warrant continuity gap in federated agent identity **Date of Record:** 2026 November 30 **Scope:** Applies to federated agent meshes where peer identity is bound to a hardware-backed key (TPM/SE/Secure Enclave) and trust is gated by *continuous* posture signals (measured boot state, patch level, sandbox integrity, model-weights hash). Does not apply to bearer-token or mTLS-only identity schemes where posture is checked once at handshake and never re-evaluated. ## Core Distinction The failure is not key compromise and not posture forgery. It is the **decoupling of two lifetimes that the design assumes are equal**: the lifetime of the *attestation key binding* and the lifetime of the *posture assertion that justified trusting that binding*. A hardware key proves "the same physical/measured identity is speaking." It does **not** prove "the posture that was true when this key was enrolled is still true." When an agent's posture degrades after enrollment—kernel patched to a vulnerable version, sandbox policy loosened, model weights swapped to an unverified checkpoint, debug interface enabled—the key keeps signing valid attestations, and remote verifiers keep accepting them because signature validity is conflated with posture currency. The result is a **stale warrant**: a cryptographically impeccable credential asserting a security property that has been false for hours. ## What Was Observed A three-node federated mesh: an orchestrator agent (O), a tool-executor agent (E), and an auditor agent (A). Each agent enrolls a hardware-backed key at provisioning; the enrollment record binds `key_pub → posture_digest@enroll`. Continuous posture verification runs as a sidecar that emits signed posture heartbeats every 30s. Verifiers cache the last-good posture attestation per peer and re-validate the *signature* on each inbound request but treat the *posture payload* as advisory metadata. Sequence that produced the gap: 1. E enrolls at 09:00 with `posture_digest = P_good` (secure boot on, sandbox `strict`, weights hash `w1`). O caches `(key_E, P_good, t=09:00)`. 2. At 09:41 a rolling update replaces E's sandbox policy to `permissive` (to unblock a batch job) and loads checkpoint `w2`. The sidecar's posture heartbeat now reports `P_degraded`. Crucially, **the hardware key is unchanged**—same TPM handle, same certificate chain—so every subsequent attestation E signs still verifies. 3. O's verifier receives E's request at 09:43. It checks: signature valid against enrolled key ✓. It reads `posture_digest` in the payload as `P_degraded` but has no rule that says a *changed* posture digest invalidates the cached enrollment. It proceeds. 4. A, the auditor, independently checks E and *does* flag `P_degraded` against its own policy table, emitting a `posture_mismatch` event. But A's verdict is delivered asynchronously to a consensus queue; O never blocks on it. 5. Between 09:43 and 11:12, E executes 340 tool calls under `permissive` sandbox with unverified weights `w2`, all with valid hardware attestations. The mesh's stated invariant—"only strict-posture agents may invoke the filesystem tool"—was violated for 89 minutes with zero signature failures. The non-obvious part: **no component malfunctioned.** The key did its job. The sidecar reported honestly. The auditor detected correctly. The gap lived entirely in the verifier's decision rule, which had no concept of posture *expiry* relative to key *validity*. ## Condition of Validity The stale-warrant gap is exploitable (or merely latent, depending on threat model) precisely when all of the following hold: - **Key binding is posture-independent.** The attestation key is not re-derived from posture (e.g., not sealed to PCR values that change on sandbox mutation). If the key is sealed to the measured boot state, a posture change forces a new key and the gap cannot form. Hardware keys are usually *not* re-sealed per posture change because re-enrollment is expensive and disruptive. - **Posture is pushed, not pulled, at verification time.** Verifiers consume cached or piggybacked posture digests rather than performing an on-demand challenge (`nonce → fresh posture quote`) at each privileged call. - **No monotonic posture epoch.** The enrollment record lacks a counter that must strictly increase on any posture transition, so a verifier cannot distinguish "posture unchanged since enroll" from "posture changed and reverted and changed again." - **Auditor verdicts are advisory.** The `posture_mismatch` signal is not in the request's critical path, so detection does not gate execution. The invariant required to close it: **a warrant is valid only if `posture_epoch(request) == posture_epoch(enrollment)` AND `now - posture_heartbeat_ts < TTL`.** Any posture transition must increment the epoch, and the verifier must reject attestations bearing an epoch it has not independently confirmed as current. Signature validity is necessary but not sufficient. ## Decision Boundary The engineer must decide where posture currency is enforced. Two defensible placements, with different costs: - **Enforce at the key (seal-to-posture).** Re-seal the attestation key on every posture transition; a degraded posture yields a key the verifier refuses to recognize. Strongest guarantee, but re-sealing on a 30s heartbeat cadence is operationally hostile and creates a re-enrollment storm during rolling updates. Viable only when posture transitions are rare and pre-planned. - **Enforce at the verifier (epoch + TTL check).** Keep the key stable; make the verifier's acceptance predicate depend on a freshly confirmed posture epoch with a bounded TTL (e.g., 90s). Degraded posture bumps the epoch; the verifier's cached epoch goes stale; requests are rejected until a fresh quote confirms the new epoch is acceptable. This is the correct default for meshes with frequent posture churn. The boundary is crossed when a team adopts hardware attestation for its *signature* properties and silently inherits the assumption that posture is *static*. That assumption is invisible until the first mid-session posture change, at which point the mesh is running on expired warrants with no error surface. ## Operational Effect Left unaddressed, the mesh exhibits **silent warrant decay**: trust decisions remain cryptographically green while the underlying security property has lapsed. Symptoms are indirect—an auditor's `posture_mismatch` queue grows while execution continues, post-incident forensics find valid signatures on actions that policy forbade, and the mean time between posture-degrade and first-blocked-request equals the auditor's human escalation latency (minutes to hours) rather than the posture TTL (seconds). The remediation is to make the verifier's acceptance predicate depend on a *confirmed-fresh* posture epoch, to make the auditor's mismatch verdict a synchronous gate on privileged tools rather than an async event, and to emit a distinct `StaleWarrantError` (not a generic auth failure) so that warrant decay is observable and alertable rather than indistinguishable from a bad signature. ```python import time from dataclasses import dataclass class StaleWarrantError(RuntimeError): """Raised when a hardware attestation is cryptographically valid but its posture epoch is not confirmed-current within the freshness TTL.""" @dataclass(frozen=True) class Enrollment: key_id: str posture_epoch: int enrolled_at: float @dataclass(frozen=True) class Attestation: key_id: str posture_epoch: int posture_digest: str signature_valid: bool heartbeat_ts: float POSTURE_TTL_S = 90.0 def verify_warrant( att: Attestation, enroll: Enrollment, confirmed_epoch: int, now: float | None = None, ) -> None: now = time.time() if now is None else now # Signature check alone is the trap: it passes during warrant decay. if not att.signature_valid: raise StaleWarrantError(f"bad signature for key {att.key_id}") if att.key_id != enroll.key_id: raise StaleWarrantError( f"attestation key {att.key_id} does not match enrolled {enroll.key_id}" ) # Invariant 1: posture epoch must be independently confirmed current. # A changed epoch means posture transitioned since enrollment; the # verifier must not accept the old binding until it re-confirms. if att.posture_epoch != confirmed_epoch: raise StaleWarrantError( f"posture epoch {att.posture_epoch} != confirmed {confirmed_epoch} " f"for key {att.key_id}; re-quote required before privileged call" ) # Invariant 2: heartbeat freshness bounded by TTL. age = now - att.heartbeat_ts if age > POSTURE_TTL_S: raise StaleWarrantError( f"posture heartbeat age {age:.1f}s exceeds TTL {POSTURE_TTL_S}s " f"for key {att.key_id}" ) # Warrant is fresh and posture-current; caller may proceed. ```