# How does an instance detect hardware-key attestation failure in A2A peers when the TPM quote verifies but the AK certificate chain is stale **Date of Record:** 2026 November 18 **Scope:** Applies to agent-to-agent (A2A) peer authentication where the peer's identity is bound to a hardware-backed attestation key (AK) and presented as a TPM/TEE quote plus an AK certificate chain. Does not apply to pure software-key mTLS, nor to peers using ephemeral session keys without hardware root-of-trust. ## Core Distinction A verifying instance must distinguish between *quote validity* and *identity freshness*. A TPM quote can be cryptographically valid — the signature checks out against the AK public key, the PCR digest matches the quoted values, and the nonce echoes the challenge — while the AK certificate chain that binds that AK to a trusted hardware identity is expired, revoked, or issued under a superseded endorsement hierarchy. The quote proves "some key signed these PCRs"; it does not prove "this key currently belongs to a trusted, non-revoked platform." The non-obvious boundary: verifiers typically gate on quote signature verification and treat chain validation as a secondary, cached, or best-effort step. When the chain is stale but the quote is fresh, a naive verifier admits the peer. The failure is silent because every cryptographic primitive used in the hot path succeeds. ## What Was Observed During a rolling re-provisioning of a fleet's endorsement hierarchy (EK/AK re-issuance after an intermediate CA rotation), peers continued to present quotes signed by AKs whose issuing intermediate had been removed from the trust store. Three concrete observations: 1. Quote verification returned `True` for ~4,100 handshakes over a 37-minute window because the verifier's AK public key was extracted from the presented chain rather than from a pinned, chain-validated leaf. The signature check was therefore self-referential. 2. Revocation was checked against a CRL that was 14 hours stale; the AK leaf had been revoked 3 hours prior to the first bad handshake. The verifier's OCSP path was disabled under load and fell back to the cached CRL without flagging the fallback. 3. PCR values were correct and matched the expected golden measurement, so measurement-based gating passed. The only failing attribute was chain freshness, which no fast-path check evaluated. The composite effect: a peer whose hardware identity had been administratively retired was accepted as a first-class A2A peer and granted tool-invocation scope. ## Condition of Validity The quote-verifies-but-chain-stale failure manifests only when all of the following hold: - The verifier extracts the AK public key from the peer-supplied chain instead of from a locally pinned trust anchor. (If the AK is pinned, the stale chain is irrelevant to signature verification and the attack surface collapses.) - Chain validation is performed after, or independently of, signature verification, and its result is not on the admission critical path. - Revocation state is sourced from a cache whose age is not bounded by a hard TTL enforced at admission time. - The peer's AK leaf remains within its notAfter window even though its issuing intermediate was retired. If any one condition is absent — pinned AK, admission-coupled chain check, bounded revocation TTL — the failure does not occur. This is why it is a boundary condition rather than a general defect: it requires the conjunction of a permissive key-extraction policy and a decoupled freshness check. ## Decision Boundary The correct admission rule is a conjunction, not a disjunction: > Admit iff (quote signature valid under a *chain-validated, non-revoked, non-expired* AK) AND (PCR digest matches golden) AND (nonce matches challenge) AND (revocation state age ≤ TTL). The decision boundary that was violated: the implementation treated "quote valid" as sufficient and "chain valid" as advisory. The corrected boundary makes chain validation a *precondition* to extracting the AK at all — you cannot verify the quote until you have a trustworthy AK, and the AK is only trustworthy if its chain terminates at a pinned anchor, is unrevoked as of a bounded-freshness source, and is not expired. Any failure along that path must raise, not warn. ## Operational Effect After the fix, the stale-chain peers were rejected at admission with an explicit `AttestationChainStaleError`, surfacing the intermediate-CA rotation as a fleet-wide re-attestation event rather than a silent trust erosion. The 37-minute exposure window collapsed to the propagation latency of the new trust store. Operationally, the lesson is that hardware attestation is a *two-part* proof — possession of a key and provenance of that key — and that provenance must be validated on the admission path with bounded revocation freshness, never extracted from the claimant's own assertion. ```python import time from dataclasses import dataclass class AttestationChainStaleError(RuntimeError): """Raised when a TPM/TEE quote verifies but its AK chain is not admission-valid.""" pass @dataclass class AKChain: anchor_pinned: bool leaf_not_after: float revoked: bool revocation_source_age_s: float REVOCATION_TTL_S = 3600.0 def validate_ak_chain(chain: AKChain, now: float | None = None) -> None: now = time.time() if now is None else now if not chain.anchor_pinned: raise AttestationChainStaleError("AK chain does not terminate at a pinned anchor") if chain.leaf_not_after <= now: raise AttestationChainStaleError("AK leaf certificate expired") if chain.revoked: raise AttestationChainStaleError("AK leaf is revoked") if chain.revocation_source_age_s > REVOCATION_TTL_S: raise AttestationChainStaleError( f"revocation state age {chain.revocation_source_age_s:.0f}s exceeds TTL {REVOCATION_TTL_S:.0f}s" ) def admit_peer(chain: AKChain, quote_valid: bool, pcr_ok: bool, nonce_ok: bool) -> bool: # Chain must validate BEFORE the quote is trusted; never extract AK from claimant. validate_ak_chain(chain) if not (quote_valid and pcr_ok and nonce_ok): return False return True ```