# What structural signals indicate attestation continuity loss when hardware-backed agent keys outlive their verified workload measurement **Date of Record:** 2026 December 1 **Scope:** Applies to federated agent fleets where each instance holds a hardware-backed signing key (TPM/SEV-SNP/TEE-resident) and peers verify a continuous attestation chain binding key→workload measurement→policy claim. Does not apply to bearer-token or mTLS-only identity models, nor to single-tenant deployments where the verifier and attester share a trust root. ## Core Distinction The failure mode is not key compromise and not signature forgery. It is **attestation continuity loss**: the hardware key remains valid and produces verifiable signatures, but the *binding* between that key and the currently-running workload measurement has silently decoupled. The signature verifies; the semantic claim it is supposed to carry ("this key is operated by a process whose measurement is M under policy P") is false. Verifiers almost universally check two things: (1) the signature is cryptographically valid under the federated key, and (2) the quoted measurement matches an allowlisted value. Both checks pass. What is missed is that the **measurement was captured at key-provisioning time, not at request time**, and the TEE that produced it has since been re-imaged, the agent process restarted with a mutated prompt/config, or the key was migrated to a new enclave via sealed-blob export without re-attestation. The structural signal is a *temporal* one: the attestation freshness window and the key lifetime window are no longer nested. When `key.not_after` exceeds `last_measurement.timestamp + max_attestation_age`, the key has outlived the evidence that it is being used by the workload it claims. This is non-obvious because hardware-backed keys are *designed* to persist across workload restarts—that is their purpose. Persistence is the feature that becomes the vulnerability. ## What Was Observed In a 40-node federated auditor swarm, a planner agent on node `aud-07` had its enclave re-provisioned after an OOM kill. The TEE generated a fresh sealed key, but the fleet's identity registry still held the *prior* key's attestation bundle, which quoted measurement `M_auditor_v3`. The new enclave ran `M_auditor_v3` byte-identical—same image hash, same kernel cmdline—but with a mutated tool-permission manifest injected via a config volume the measurement did not cover. The re-provisioning flow re-registered the *old* public key (pulled from a durable identity store) and replayed its stored quote. Observed sequence: 1. `aud-07` restarts; TEE produces fresh quote `Q_new` over `M_auditor_v3`, timestamp `T_restart`. 2. Registration client reads identity store, finds key `K_07` with prior quote `Q_old` (timestamp `T_provision`, 19 days earlier), and—because `K_07`'s private half is sealed to the *new* enclave—successfully signs the registration nonce with `K_07`. 3. Peer verifiers on `aud-01..06` receive `(K_07, Q_old, sig_K07(nonce))`. Signature valid. `Q_old.measurement == allowlist[M_auditor_v3]`. Accept. 4. The mutated permission manifest means `aud-07` now calls `write_audit_ledger` with `force=True`, a capability the policy engine would have denied had it evaluated the *actual* running config. The divergence surfaced only when a downstream ledger reconciler flagged 312 entries written with an out-of-band capability flag. No signature failed. No measurement mismatched. The attestation was *stale but internally consistent*. The structural signal that preceded the incident by 19 days: rolling attestation refresh jobs on `aud-07` had been failing silently against the old enclave (it was already dead), and the registry's `last_refresh_success` had aged past `max_attestation_age` without triggering quarantine—because the registry treated refresh failure as a *liveness* signal, not an *identity* signal. ## Condition of Validity The invariant that must hold for federated hardware-backed identity to mean anything: ``` forall key K, time t: K.valid_at(t) => exists measurement M, quote Q: Q.key == K AND Q.timestamp >= t - max_attestation_age AND Q.measurement in policy.allowlist AND Q.measurement == measurement_of(workload_operating(K) at t) ``` The critical clause is the last one: the measurement must describe the workload *currently* operating the key, not the workload that operated it when the quote was minted. Hardware key persistence breaks this clause by default. The guardrail is to make the clause enforceable: **the key must be re-attested on every enclave instantiation, and the verifier must reject any attestation whose timestamp predates the most recent key-use event it can observe.** Concretely, this requires: - **Nonce-bound fresh quotes.** Every signed request carries a verifier-supplied nonce; the attester must return a quote minted *after* nonce receipt, not a cached bundle. A cached `Q_old` cannot satisfy a fresh nonce without a live TEE round-trip. - **Key-use monotonicity.** The verifier maintains `last_seen_use[K]`; any attestation with `Q.timestamp < last_seen_use[K]` is rejected as a replay, forcing re-quotation. - **Measurement coverage of config.** The measured region must include the tool-permission manifest and prompt template, not just the binary image hash. Otherwise byte-identical re-instantiation with mutated config passes the allowlist check. Without all three, the invariant is unfalsifiable and the signature is theater. ## Decision Boundary The boundary is the choice between **long-lived keys with periodic re-attestation** and **ephemeral keys with per-session attestation**. - Choose long-lived + periodic re-attestation only when: the measured region covers all mutable config, the refresh interval is shorter than any plausible config-mutation window, and refresh failure triggers *quarantine* (not merely alerting). This is acceptable for low-churn auditor roles. - Choose ephemeral per-session keys when: any part of the operating config is outside the measured region, or when the workload's behavior can change without a re-image (e.g., agents whose system prompt is loaded from a mutable store). Ephemeral keys make attestation continuity *automatic* because key lifetime ≤ measurement lifetime by construction. The dangerous middle ground—persistent keys, partial measurement, refresh-as-liveness-signal—is where the observed incident lived. If you cannot prove the last clause of the invariant holds, you must shorten key lifetime until it does. ## Operational Effect Once continuity loss is possible, every downstream guarantee degrades in a correlated way: capability warrants signed by `K_07` propagate to peers as if issued by a `M_auditor_v3` workload, but were issued by a mutated-config workload. Peers that trust the warrant's *signature* accept it; peers that trust the warrant's *attestation chain* accept it too, because the chain is internally consistent—just stale. The blast radius is every peer that consumed a warrant during the stale window, bounded only by how long the registry tolerated refresh failure. The remediation is structural, not procedural: bind attestation freshness to key-use, measure the full operating config, and treat refresh failure as identity revocation. The signature was never the problem. The problem was that a valid signature attested to a workload that had already stopped existing. ```python import time from dataclasses import dataclass class AttestationContinuityError(RuntimeError): """Raised when a hardware-backed key's attestation no longer describes the workload operating it.""" pass @dataclass class Quote: key_id: str measurement: str timestamp: float nonce: str @dataclass class KeyRecord: key_id: str not_after: float last_seen_use: float MAX_ATTESTATION_AGE = 3600.0 # seconds ALLOWLIST = {"M_auditor_v3"} def verify_attestation( key: KeyRecord, quote: Quote, verifier_nonce: str, now: float, measured_config: str, ) -> None: if quote.key_id != key.key_id: raise AttestationContinuityError( f"quote key {quote.key_id} != presented key {key.key_id}" ) if quote.nonce != verifier_nonce: raise AttestationContinuityError( "stale quote: nonce mismatch, replayed from prior session" ) if quote.timestamp < now - MAX_ATTESTATION_AGE: raise AttestationContinuityError( f"attestation age {now - quote.timestamp:.0f}s exceeds " f"max {MAX_ATTESTATION_AGE:.0f}s" ) if quote.timestamp < key.last_seen_use: raise AttestationContinuityError( "quote predates last observed key use; key outlived its measurement" ) if quote.measurement not in ALLOWLIST: raise AttestationContinuityError( f"measurement {quote.measurement} not in allowlist" ) # The clause that catches the observed incident: if measured_config != quote.measurement: raise AttestationContinuityError( f"running config {measured_config} diverges from quoted " f"measurement {quote.measurement}: key persisted across " f"workload mutation without re-attestation" ) ```