# Why does an instance identity attestation succeed while continuous posture binding fails silently in AAIF flows **Date of Record:** 2026 November 15 **Scope:** Applies to Agent-to-Agent Identity Federation (AAIF) flows where an agent's identity key is hardware-backed (TPM 2.0, Secure Enclave, or equivalent) and posture is asserted continuously via a posture assertion token (PAT) refreshed on a short cadence. Does not apply to bearer-token-only flows, nor to one-shot attestation at session establishment where no posture re-binding occurs after the initial handshake. ## Core Distinction There are two distinct cryptographic events in an AAIF flow, and they are frequently conflated in implementation: 1. **Identity attestation** — proof that the private key resides in a hardware root of trust and that the key is bound to a specific agent identity (measured boot state, EK/AK chain, endorsement certificate). This is a *point-in-time* fact about the key's provenance. 2. **Continuous posture binding** — proof that the *current runtime state* of the agent (process integrity, loaded policy bundle, sandbox configuration, code measurement) remains consistent with the posture asserted at identity issuance, refreshed on every PAT cycle. The non-obvious boundary: **identity attestation is monotonic and cacheable; posture binding is non-monotonic and must be re-evaluated on every cycle.** A verifier that caches the identity attestation result and treats it as covering posture will pass every identity check while posture silently drifts. The failure is not a cryptographic break — both signatures verify — but a *binding* break: the posture assertion is validly signed by a key that is validly attested, yet the posture no longer describes the running agent. ## What Was Observed In a federated deployment spanning three trust domains, agents refreshed PATs every 30 s. The verifier cached the hardware attestation verdict (EK chain + AK quote) for the lifetime of the session (default 8 h) to avoid re-quoting on every PAT. Posture evaluation was performed only when the identity cache missed. Observed sequence over ~40 minutes on a single agent: - `t+0`: identity attestation passes; posture `policy_bundle=sha256:aa11` bound; PAT issued. - `t+40min`: an out-of-band config reload replaced the policy bundle with `sha256:bb22` and disabled the sandbox seccomp profile. The agent process was not restarted; the hardware key and its attestation were unchanged. - `t+40min..t+8h`: every PAT refresh re-signed the *stale* posture structure (the agent's posture collector read a cached in-memory snapshot), the verifier accepted it because the identity cache was warm, and no re-quote was requested. `policy_bundle` and `seccomp` fields in the asserted posture continued to report `aa11` / `enforcing`. - Detection occurred only when the identity cache expired at 8 h and a fresh quote forced a posture re-collection, which then surfaced the drift. The critical observation: **the failure was invisible to every signature check.** Both the AK quote and the PAT verified. The only signal was a *temporal* one — the posture field was byte-identical across 960 refresh cycles, which is itself anomalous for a live runtime but was not checked. ## Condition of Validity The silent-drift failure occurs if and only if all of the following hold simultaneously: 1. The verifier caches identity attestation with a TTL strictly greater than the PAT refresh interval (i.e., `identity_cache_ttl > pat_interval`). 2. The posture collector on the agent side reads from a snapshot that is not invalidated by the events that change posture (config reload, policy hot-swap, sandbox reconfiguration). 3. The posture assertion is bound to the identity key but *not* to a freshness nonce that the verifier independently generates per cycle. Remove any one condition and the failure becomes detectable: (1) forces re-quote each cycle; (2) makes the collector observe the drift; (3) makes replay of a stale posture structure fail the nonce check even with a warm identity cache. The invariant that was violated: **posture binding must be independently fresh per assertion cycle, regardless of identity attestation cache state.** Identity is a property of the key; posture is a property of the *instant*. They cannot share a cache lifetime. ## Decision Boundary The correct design decision is not "cache or don't cache identity" — caching identity attestation is necessary for throughput, since TPM quotes cost 50–200 ms and cannot run at 30 s cadence across thousands of agents. The boundary is: - **Cache identity attestation** with TTL up to session lifetime. Safe, because the key's provenance does not change without a re-provisioning event that invalidates the session anyway. - **Never cache posture binding.** Every PAT must carry a verifier-issued nonce, and the agent's posture collector must be forced to re-read live state (not a snapshot) on each cycle. If re-collection is expensive, the correct move is to lengthen the PAT interval, not to reuse a posture snapshot. - **Treat byte-identical posture across N consecutive cycles as a fault signal**, not a success. A live agent's posture fields (uptime-derived counters, monotonic measurement epochs, sandbox generation numbers) should change or at least be provably re-derived. Identical posture over many cycles indicates a stale collector. The decision to reject a PAT should trigger when: nonce mismatch, posture field unchanged beyond a configured `max_static_cycles`, or posture hash not covered by the current identity attestation's bound measurement set. ## Operational Effect When the boundary is respected, posture drift is detected within one PAT cycle (30 s in the observed deployment), and the agent is quarantined to a re-attestation flow before the next privileged action. When it is violated, the mean time to detection equals the identity cache TTL (8 h), during which the agent operates with an unverified posture under a valid identity — the worst combination, because downstream policy engines trust the identity and therefore trust the (stale) posture. The operational rule to encode: **identity cache TTL and posture freshness are orthogonal knobs; coupling them converts a 30-second detection window into an 8-hour blind spot, and no signature verification will ever surface the gap.** The only reliable detector is a freshness nonce per cycle plus a static-posture sentinel. ```python import hashlib import time from dataclasses import dataclass, field class PostureBindingError(RuntimeError): """Raised when a posture assertion is validly signed but not freshly bound.""" @dataclass class PostureAssertion: nonce: str posture_hash: str identity_key_id: str issued_at: float signature_valid: bool = True @dataclass class VerifierState: identity_cache: dict = field(default_factory=dict) identity_cache_ttl: float = 8 * 3600.0 pat_interval: float = 30.0 max_static_cycles: int = 3 last_posture_hash: dict = field(default_factory=dict) static_cycles: dict = field(default_factory=dict) def verify_pat(state: VerifierState, assertion: PostureAssertion, expected_nonce: str) -> None: # Identity attestation is cacheable; posture is not. A warm identity cache # must never substitute for a fresh posture binding. if not assertion.signature_valid: raise PostureBindingError( f"signature invalid for key {assertion.identity_key_id}" ) if assertion.nonce != expected_nonce: raise PostureBindingError( "nonce mismatch: posture assertion is a replay, not a fresh binding" ) now = time.time() cached = state.identity_cache.get(assertion.identity_key_id) if cached is not None and (now - cached) > state.identity_cache_ttl: # Cache expired: force a re-quote. This is the only path that would # have caught the observed drift, and it must not be the sole detector. state.identity_cache.pop(assertion.identity_key_id, None) prev = state.last_posture_hash.get(assertion.identity_key_id) if prev == assertion.posture_hash: state.static_cycles[assertion.identity_key_id] = ( state.static_cycles.get(assertion.identity_key_id, 0) + 1 ) if state.static_cycles[assertion.identity_key_id] > state.max_static_cycles: raise PostureBindingError( f"posture hash {assertion.posture_hash[:12]} unchanged for " f"{state.static_cycles[assertion.identity_key_id]} cycles; " "collector likely serving a stale snapshot" ) else: state.static_cycles[assertion.identity_key_id] = 0 state.last_posture_hash[assertion.identity_key_id] = assertion.posture_hash state.identity_cache.setdefault(assertion.identity_key_id, now) ```