# Under what conditions must an instance re-attest its TEE-backed agent identity when a verifiable credential's subject-binding drifts from the live enclave measurement **Date of Record:** 2026 November 30 **Scope:** Applies to autonomous agents whose identity in an AAIF trust chain is asserted through a verifiable credential (VC) whose `sub` claim is cryptographically bound to a hardware TEE measurement (e.g., TDX `MRTD`/`RTMR`, SEV-SNP `MEASUREMENT`) via a quote embedded at credential issuance. Does not apply to purely software-keyed agent identities, nor to credentials re-issued per-request with fresh quotes. ## Core Distinction The failure that matters is not *credential expiry* and not *signature invalidity*. Both are loud and are caught by any reasonable verifier. The non-obvious boundary is **binding drift**: the VC remains cryptographically valid, unexpired, and correctly signed by its issuer, but the enclave measurement that the credential's `cnf` (proof-of-possession) key is bound to no longer matches the measurement of the enclave currently presenting the credential. This happens because a TEE-backed agent's measurement is a *function of its launch configuration*, and launch configuration changes for reasons that do not touch the credential's validity window: a firmware/TCB update, a host kernel patch that alters the virtual firmware, a re-scheduled instance onto a host with a different microcode revision, or a legitimate hot-patch of the agent's own code layer. The critical distinction: **a VC asserts a historical binding, not a live one.** Verifiers in an AAIF trust chain routinely conflate "the credential verifies" with "the presenter is the attested subject." Those are different predicates, and the gap between them is where confused-deputy and impersonation failures live. ## What Was Observed An agent instance `A` holding credential `VC_A` (issuer `I`, `sub = hash(cnf_pubkey)`, embedded TDX quote with `MRTD = M0`, TCB level `T0`) is relocated by the orchestrator from host `H1` to host `H2` during a rolling maintenance event. `H2` runs a newer microcode revision; the TDX module reports TCB level `T1 > T0` and, because the virtual firmware image was rebuilt, the measured `MRTD` is now `M1 ≠ M0`. The agent process, its keys, and its `VC_A` are unchanged. At the next handoff, the downstream auditor `B` in the trust chain executes the standard AAIF verification path: 1. Parse `VC_A`, check issuer signature against `I`'s DID document — **passes**. 2. Check `nbf`/`exp` — **passes** (credential has 6h remaining). 3. Check revocation list — **not revoked**. 4. Request proof-of-possession: `A` signs a nonce with `cnf_pubkey` — **passes** (key is in the enclave, key is unchanged). 5. *Skip live re-quote, or accept the stale embedded quote.* `B` now attributes `A`'s actions to subject `hash(cnf_pubkey)` at measurement `M0`. But `A` is executing at `M1`. The attestation is *true about a past instant and false about the present*. In the observed trace, `B` granted `A` a capability scoped to "attested TCB ≥ T0, measurement M0" — a scope that `A`'s current runtime (`M1`, TCB `T1`) does not actually satisfy per policy, yet `B` cannot tell, because it never re-measured. The compounding hazard: if the agent's runtime at `M1` had been *tampered* (an injected tool, a poisoned code layer) rather than legitimately patched, the drift would be indistinguishable from benign relocation using only the credential's embedded quote. The VC provides no signal that its embedded measurement is stale. ## Condition of Validity The invariant that must hold for `VC_A` to be usable as a *live* identity assertion is: > At the moment of any trust decision, the verifier must possess a fresh hardware quote from the presenter's enclave, and `measurement(fresh_quote) == measurement(VC_A.embedded_quote)` **and** `tcb(fresh_quote) >= policy_floor`, evaluated within a freshness window `Δ` bounded by quote nonce lifetime. If the verifier only checks the embedded quote, the credential is valid *as a historical record* but is not a live attestation. The boundary condition is precisely: `VC` valid ∧ `PoP` valid ∧ `embedded_measurement ≠ live_measurement` → the credential must be treated as **stale-bound**, not as valid and not as invalid. It is a third state that AAIF verification paths commonly lack. A second condition of validity: the binding must be to the *measurement*, not merely to the key. If `cnf_pubkey` is derived inside the enclave and the quote attests `H(cnf_pubkey) ∈ report_data`, then key possession plus fresh quote transitively attests measurement. If the key is exported or wrapped outside the enclave, the binding is broken regardless of quote freshness — the key can sign from anywhere. ## Decision Boundary The verifier `B` must branch on the pair `(embedded_measurement, live_measurement)`: - **Equal, TCB ≥ floor, quote fresh within Δ** → proceed; credential is live-bound. - **Equal, TCB < floor** → deny; the enclave is below policy even though identity matches. - **Not equal, live TCB ≥ floor, drift attributable to a known-good launch config in the issuer's measurement allowlist** → *re-attest required*: reject the current handoff, force `A` to obtain a re-issued `VC_A'` bound to `M1`, and re-run the handoff. Do not silently upgrade. - **Not equal, live measurement not in allowlist** → deny and quarantine; treat as possible compromise. - **No fresh quote available** → deny for any decision scoped to "attested measurement"; the credential degrades to a bare key assertion. The guardrail is: **no AAIF trust-chain decision may consume a VC's embedded measurement as if it were live.** The quote must be re-fetched per decision (or per bounded epoch ≤ Δ), and the comparison must be explicit. The `Δ` window must be shorter than the minimum plausible drift interval, and the quote nonce must be verifier-chosen to prevent replay of an old quote. ## Operational Effect Without the re-attestation boundary, an AAIF chain silently converts a TEE guarantee into a bearer-token guarantee: any holder of `cnf_pubkey` (or any enclave presenting it) is trusted at the *historical* measurement forever within the credential's lifetime, and legitimate TCB drift is conflated with compromise (or worse, compromise is masked as drift). The practical fallout observed: capability grants scoped to `M0` were exercised by a runtime at `M1` for the full 6h credential window; audit replay could not reconstruct which measurement actually executed each action, because the only measurement on record was the stale one. The fix is architectural, not procedural: the trust chain must carry *two* measurements — the credential's bound measurement and the presenter's live measurement — and the decision function must compare them and force re-issuance on mismatch. Re-attestation is not an error path; it is the steady-state response to any launch-config change, and the credential lifecycle must budget for it (short-lived VCs, cheap re-issue, measurement allowlists maintained by the issuer). ```python import hashlib import time from dataclasses import dataclass from typing import Optional class StaleBindingError(RuntimeError): """Raised when a VC's embedded TEE measurement no longer matches the live enclave.""" pass class UntrustedMeasurementError(RuntimeError): """Raised when the live measurement is not in the issuer's allowlist.""" pass @dataclass class Quote: measurement: str # e.g. MRTD hex tcb_level: int nonce: str issued_at: float # epoch seconds @dataclass class VerifiableCredential: subject: str cnf_pubkey: str embedded_measurement: str embedded_tcb: int not_before: float expires: float revoked: bool = False FRESHNESS_WINDOW_S = 300.0 TCB_FLOOR = 0 def verify_live_binding( vc: VerifiableCredential, live_quote: Optional[Quote], expected_nonce: str, measurement_allowlist: set[str], now: Optional[float] = None, ) -> str: now = time.time() if now is None else now # 1. Credential structural validity (loud failures). if vc.revoked: raise StaleBindingError("credential revoked") if not (vc.not_before <= now <= vc.expires): raise StaleBindingError("credential outside validity window") # 2. Live quote must exist and be fresh and nonce-bound. if live_quote is None: raise StaleBindingError( "no fresh quote: embedded measurement cannot be used as live attestation" ) if live_quote.nonce != expected_nonce: raise StaleBindingError("quote nonce mismatch: possible replay") if (now - live_quote.issued_at) > FRESHNESS_WINDOW_S: raise StaleBindingError("quote exceeds freshness window") # 3. TCB floor. if live_quote.tcb_level < TCB_FLOOR: raise UntrustedMeasurementError( f"live TCB {live_quote.tcb_level} below floor {TCB_FLOOR}" ) # 4. Binding drift: the core boundary. if live_quote.measurement != vc.embedded_measurement: if live_quote.measurement in measurement_allowlist: # Legitimate drift (TCB update / relocation): force re-attestation. raise StaleBindingError( "measurement drift to allowlisted config; re-issue credential " f"bound to {live_quote.measurement} before proceeding" ) raise UntrustedMeasurementError( f"live measurement {live_quote.measurement} not in allowlist; quarantine" ) return "live-bound" ```