# Why does an instance attestation chain break when the TPM endorsement key outlives the agent's credential epoch **Date of Record:** 2026 November 27 **Scope:** Applies to agents whose identity is anchored to a hardware-backed key (TPM 2.0 EK/AK, Secure Enclave, or vTPM in a confidential VM) and whose authorization is carried in short-lived verifiable credentials (VCs) signed over that key's public material. Does not cover pure software-key agents or long-lived service-account identities. ## Core Distinction The failure is not "the key was compromised" and not "the credential expired." It is a **temporal aliasing** between two clocks that the architecture assumes are independent: the **hardware key lifetime** (years, bound to silicon, non-rotatable without re-provisioning) and the **credential epoch** (minutes to hours, bound to a policy decision). Attestation chains silently assume that a valid signature from the hardware key at time *t* proves the *same agent instance* that held the credential at time *t*. That inference is only sound if the binding between key and agent-instance is re-asserted at every epoch boundary. When the key outlives the epoch and the binding is cached, a *new* agent instance can present an *old* key and inherit a *stale* authorization surface — a valid chain of signatures that attests to an identity that no longer exists. ## What Was Observed An agent runtime was provisioned with a vTPM-backed AK. On cold start it performed an attestation quote over a nonce, exchanged the quote for a short-lived VC (TTL 30 min) issued by a policy service, and cached the VC plus the AK handle in a process-local keystore. The keystore was persisted to the instance's ephemeral disk so that a *resumed* checkpoint could skip re-attestation and "avoid the 1.8s quote latency on the hot path." The failure trace: 1. Agent instance A executes, checkpoint at step 40, VC issued at `t0`, expires `t0+30m`. 2. Host is paused for maintenance at `t0+12m`; the vTPM state is snapshotted with the VM. 3. At `t0+41m` the host resumes; the checkpoint loader restores the keystore including the *expired* VC and the *still-valid* AK handle. 4. The loader's freshness check compared `vc.not_before <= now`, which passes (the VC was issued in the past). It did **not** check `now <= vc.not_after` because the code path treated "restored from our own disk" as trusted. 5. The agent resumes task execution and calls a downstream tool broker. The broker receives the VC, verifies the signature chain to the issuer root, checks revocation, and — critically — verifies the **attestation quote freshness** against a nonce *it* generates. The runtime re-quotes with the AK, the quote is fresh, the AK matches the VC's `cnf` key, and the broker admits the call. 6. The broker's admission is correct *per-call* but wrong *per-instance*: the VC's embedded policy claims (`max_tool_calls=500`, `data_scope=tenant-7`, `delegation_depth=0`) were minted for instance A's original context. Instance A was resumed into a *different* tenant context (the checkpoint was restored onto a host pool serving tenant-9) and the policy claims were never re-evaluated. 7. Over the next 200 calls, the agent executed 47 tool invocations against tenant-9 resources using a credential whose `data_scope` was `tenant-7`. No signature failed. No nonce was replayed. The chain was cryptographically intact and semantically false. The observable symptom was not an auth error. It was a **cross-tenant data-scope violation that every verifier in the chain reported as valid**, because each verifier checked a *local* invariant (signature, freshness, revocation) and none checked the *global* invariant (key-to-instance-to-context binding at epoch boundary). ## Condition of Validity The attestation chain is only sound under the following invariant, which most implementations do not state and therefore do not enforce: > **A hardware key may attest to an agent instance only within the credential epoch in which the key-to-instance binding was last asserted, and that binding must be invalidated by any event that changes the instance's policy context — including checkpoint restore, host migration, tenant reassignment, or vTPM state rollback.** Formally: let `K` be the AK, `I` the agent instance identity, `C` the credential with claims `P`, and `E = [t_issue, t_expiry]` the epoch. The chain proves `K signs quote(n)` and `issuer signs VC(K, P, E)`. It does **not** prove `I_current = I_at_issue`. That equality must be re-established at every epoch boundary by a fresh binding assertion, and it must be *broken* — not merely allowed to expire — by any context-mutating event. A VC that expires is safe; a VC that is *restored* past expiry is not, because restore is a context mutation the epoch model does not see. ## Decision Boundary The boundary is not "expired vs. valid." It is **"was the credential's policy context re-derived at the moment of use, or inherited from the moment of issue?"** - If the verifier re-derives `P` from the *current* instance context and compares against the VC's embedded `P`, restore-past-expiry is caught: `tenant-9 ≠ tenant-7`, reject. - If the verifier trusts the VC's embedded `P` as the authoritative context, restore-past-expiry is invisible: the VC is a *stale cache of a policy decision*, and the hardware key launders it into apparent freshness because the quote nonce is always new. This is the non-obvious part: **freshness of the attestation quote does not imply freshness of the attested policy.** The nonce defeats replay of the *quote*; it does nothing against replay of the *credential's semantic content*. An attacker (or a maintenance pause) only needs to preserve the key and the VC; the quote will always be fresh because the key is always live. The guardrail is a **binding epoch counter** carried in the VC and re-checked against the runtime's own monotonic context-generation counter at every use: - The runtime increments `context_gen` on every context-mutating event (restore, migrate, tenant rebind, vTPM rollback). - The VC embeds `context_gen` at issue time. - The verifier rejects any VC whose `context_gen` is less than the runtime's current `context_gen`, *even if the VC is unexpired and the quote is fresh*. - The issuer must be the only party allowed to mint a VC at the new `context_gen`, forcing re-attestation after every mutation. Without this counter, the hardware key is a **long-lived amplifier of short-lived policy**: it converts a 30-minute authorization into a multi-year one, bounded only by revocation latency. ## Operational Effect The practical consequence is that revocation is the *only* backstop, and revocation is the slowest, least reliable link in the chain — it depends on the issuer being reachable, the revocation list being fresh, and the verifier checking it synchronously. In the observed incident, revocation would have taken effect at `t0+30m` only if the verifier had checked `not_after`, which it did not, and only if the issuer had independently learned of the tenant reassignment, which it had not, because the reassignment happened at the orchestration layer that the issuer never observed. The correct posture is to treat the hardware key as a **proof of platform, not a proof of agent**. The key answers "is this the same TPM?" It does not answer "is this the same agent, with the same authority, right now?" That second question must be answered at every epoch boundary by a binding assertion that includes the context-generation counter, and the assertion must be *invalidated* — not merely *expired* — by any event that changes the agent's policy context. An expired credential is a known-unknown; a restored credential is an unknown-known, and it is the second that produces silent cross-context execution. ```python from dataclasses import dataclass from typing import Optional class StaleBindingError(RuntimeError): """Raised when a hardware-attested credential is presented outside the context-generation in which its key-to-instance binding was asserted.""" @dataclass(frozen=True) class VerifiableCredential: subject_key_id: str policy_claims: dict context_gen: int # runtime context-generation at issue time not_before: float not_after: float issuer_sig: bytes @dataclass class RuntimeContext: context_gen: int # monotonic; bumped on restore/migrate/rebind tenant: str ak_handle: str # hardware key handle, long-lived def bump(self, reason: str) -> None: # Any context-mutating event MUST invalidate prior bindings. self.context_gen += 1 def verify_at_use( vc: VerifiableCredential, ctx: RuntimeContext, now: float, quote_fresh: bool, quote_key_id: str, ) -> None: # Local invariants (what most implementations check): if not (vc.not_before <= now <= vc.not_after): raise StaleBindingError("credential outside validity window") if not quote_fresh: raise StaleBindingError("attestation quote is not fresh") if quote_key_id != vc.subject_key_id: raise StaleBindingError("quote key does not match credential cnf key") # Global invariant: the key-to-instance binding must have been asserted # in the *current* context generation. A fresh quote over a live key # does not prove the policy claims were re-derived for this context. if vc.context_gen < ctx.context_gen: raise StaleBindingError( f"credential minted at context_gen={vc.context_gen} but runtime " f"is at context_gen={ctx.context_gen}; re-attestation required " f"(tenant={ctx.tenant}, claims={vc.policy_claims})" ) # Only now is the credential a valid statement about *this* instance. if vc.policy_claims.get("data_scope") != ctx.tenant: raise StaleBindingError( f"policy scope {vc.policy_claims.get('data_scope')} does not " f"match current tenant {ctx.tenant}" ) def resume_from_checkpoint( vc: VerifiableCredential, ctx: RuntimeContext, now: float, ) -> None: # Checkpoint restore is a context-mutating event: it may land on a # different host pool / tenant. Bump before any use of the cached VC. ctx.bump("checkpoint_restore") try: verify_at_use( vc=vc, ctx=ctx, now=now, quote_fresh=True, # vTPM re-quotes on resume quote_key_id=vc.subject_key_id, ) except StaleBindingError as exc: # Force re-attestation: discard cached VC, re-run quote + issuance. raise StaleBindingError( "cached credential invalid after resume; re-attestation required" ) from exc ```