# In what scenarios must an instance treat hardware-attested posture as a perishable lease rather than a durable identity claim during AAIF enrollment **Date of Record:** 2026 November 26 **Scope:** Applies to autonomous agent instances enrolling into an Agent Identity Federation (AAIF) using TPM/secure-enclave-backed attestation keys combined with continuous posture verification (measured boot, firmware counters, runtime integrity telemetry). Does not apply to stateless request-signing where no persistent federation identity is minted, nor to purely software-keyed identities with no hardware root of trust. ## Core Distinction The boundary is between **identity attestation** (a one-time cryptographic proof that *this key lives inside this hardware root of trust*) and **posture attestation** (a continuously re-evaluated claim that *the measured state of that hardware still satisfies the federation's admission policy*). AAIF enrollment conflates the two because both are carried in the same signed attestation bundle and both are validated by the same verifier endpoint. The identity half is genuinely durable: a TPM endorsement key does not change when the machine reboots. The posture half is perishable: it is a snapshot of PCR values, firmware version counters, and runtime integrity signals that decay the instant the measured environment mutates. The non-obvious failure is that a verifier who caches the *combined* attestation result treats the perishable posture as if it shared the durability of the identity key. An instance that enrolled cleanly at T0 with a valid posture can remain "enrolled and trusted" at T1 after a kernel module loaded, a debug flag flipped, or a measured-boot PCR drifted — because the enrollment record's validity was bound to key possession, not to posture freshness. The invariant that must hold: **a federation credential's lifetime must be the minimum of key-validity lifetime and posture-lease lifetime, never the key-validity lifetime alone.** ## What Was Observed An instance (`agent-7f3a`) enrolled via AAIF at 09:14 with a TPM2 quote over PCRs [0,2,4,7] and a runtime integrity claim signed by the secure enclave. The verifier issued a federation token with a 24-hour TTL, keyed to the endorsement key fingerprint. At 09:41 a routine driver update loaded an unsigned third-party module, mutating PCR[4] (the boot measurement of loaded kernel components). No re-attestation was triggered because the enrollment record's `next_posture_check` field was set to TTL expiry, not to a posture-event subscription. At 11:02 the same instance presented its federation token to a downstream capability broker (an MCP gateway). The broker validated the token signature against the AAIF public key, confirmed the endorsement key fingerprint matched the enrollment record, and admitted the call. The token was cryptographically valid. The posture it implicitly vouched for was 81 minutes stale and no longer satisfied the admission policy (unsigned module present). The failure trace: 1. `enroll()` → `verify_attestation(bundle)` returns `{identity: valid, posture: valid, posture_measured_at: 09:14}`. 2. Verifier mints token with `exp = 09:14 + 24h`, discarding `posture_measured_at`. 3. Environment mutates at 09:41 (PCR drift, unsigned module). 4. No posture event fires into the verifier; no re-quote is requested. 5. At 11:02 the token is accepted; the broker has no mechanism to distinguish "posture valid at mint" from "posture valid now." 6. The unsigned module executes under federation-trusted identity for the remaining ~22 hours of token life. The root cause is a **durability mismatch in the enrollment record schema**: a single `valid_until` field served both the identity key (correctly long-lived) and the posture claim (incorrectly long-lived). The verifier had no separate posture-lease concept, so it could not express "this identity is good for 24h but this posture is good for 5 minutes." ## Condition of Validity The invariant holds — and the failure is reachable — only under the following conjunction: - The attestation bundle carries both a hardware-rooted identity proof and a measured-state posture claim, and the verifier validates them in a single pass. - The federation credential's TTL is derived from key-validity policy rather than from the posture re-measurement cadence. - There is no posture-change event channel from the attesting host to the verifier (i.e., posture is pull-only, evaluated at enrollment and at TTL expiry, with nothing in between). - Downstream relying parties trust the federation token as a proxy for current posture rather than re-querying posture state. If any of these is absent — e.g., the host pushes PCR-change events, or relying parties independently re-verify posture per call — the durability mismatch does not produce a trust window. The failure is specifically an artifact of **pull-only posture evaluation combined with key-lifetime TTL derivation**. ## Decision Boundary The decision an implementer must make is whether to model posture as a **property of the credential** (baked into the token at mint, immutable for its lifetime) or as a **separate lease with its own freshness clock** that the credential references but does not absorb. The correct boundary: posture must be a lease with `lease_ttl = min(posture_policy_max_age, key_ttl)`, and the federation token must carry a `posture_epoch` that relying parties check against a posture-status endpoint or a short-lived posture assertion. Concretely: - If `now - posture_measured_at > posture_policy_max_age`, the credential is **suspended**, not merely flagged — the relying party must refuse the call, not log a warning. - Posture-change events (PCR drift, integrity telemetry anomaly, firmware counter increment) must **invalidate the posture lease immediately**, independent of token TTL. - The identity key may outlive many posture leases; re-attestation of posture does not require re-provisioning of identity. The anti-pattern to reject: "the token is signed, therefore the posture is attested." A signature proves *who measured*, not *when* or *whether the measured state still holds*. A 24-hour signature over a 5-minute-freshness claim is a 24-hour trust window for a 5-minute guarantee. ## Operational Effect With posture modeled as a perishable lease, the 09:41 PCR drift triggers a posture-event invalidation, the posture lease for `agent-7f3a` drops to `suspended` at 09:41, and the 11:02 broker call is refused with a `posture_stale` error rather than admitted. The instance must re-quote and re-satisfy the admission policy (unload the unsigned module, re-measure, re-attest) before the lease is restored. Identity is untouched — the endorsement key and federation identity persist across the suspension, so re-enrollment is a posture refresh, not a full re-provisioning. The operational consequence for agent runtimes: **a long-running agent must treat its own posture lease as a renewable resource it actively maintains, not a credential it holds.** An agent that plans a multi-hour task must schedule posture re-attestation into its execution loop, because the lease will expire mid-task regardless of whether the environment changed. An agent that detects a posture-relevant environment mutation (loading a tool that touches measured state, spawning a subprocess that alters integrity telemetry) must proactively invalidate and re-acquire its lease rather than wait for the next scheduled check — otherwise it will discover the suspension as a mid-task tool-call failure, which is the worst possible time to learn that its federation identity is temporarily untrusted. ```python import time from dataclasses import dataclass, field from typing import Optional class PostureLeaseExpired(RuntimeError): """Raised when a federation credential's posture lease has lapsed or been invalidated.""" pass class PostureDurabilityViolation(RuntimeError): """Raised when a credential's TTL exceeds its posture lease, conflating durable identity with perishable posture.""" pass @dataclass class AttestationBundle: identity_key_fingerprint: str posture_measured_at: float # epoch seconds of last successful quote posture_pcr_digest: str posture_policy_max_age: float # seconds; e.g. 300 @dataclass class FederationCredential: identity_key_fingerprint: str minted_at: float key_ttl: float # e.g. 86400 posture_lease_expires_at: float posture_epoch: int suspended: bool = False def mint_credential(bundle: AttestationBundle, now: Optional[float] = None) -> FederationCredential: now = now if now is not None else time.time() posture_lease_expires_at = bundle.posture_measured_at + bundle.posture_policy_max_age if posture_lease_expires_at <= now: raise PostureLeaseExpired( f"posture measured at {bundle.posture_measured_at} already exceeds " f"max_age {bundle.posture_policy_max_age}s at mint time {now}" ) return FederationCredential( identity_key_fingerprint=bundle.identity_key_fingerprint, minted_at=now, key_ttl=86400.0, posture_lease_expires_at=posture_lease_expires_at, posture_epoch=0, ) def admit_call(cred: FederationCredential, now: Optional[float] = None) -> None: now = now if now is not None else time.time() if cred.suspended: raise PostureLeaseExpired("credential suspended by posture-change event") if now >= cred.posture_lease_expires_at: raise PostureLeaseExpired( f"posture lease expired at {cred.posture_lease_expires_at}, now {now}; " f"identity key {cred.identity_key_fingerprint} remains valid but posture is stale" ) if now >= cred.minted_at + cred.key_ttl: raise PostureLeaseExpired("identity key TTL expired") def on_posture_event(cred: FederationCredential, event: str) -> None: """Called when host reports PCR drift, unsigned module load, or integrity anomaly.""" if event in ("pcr_drift", "unsigned_module", "integrity_anomaly", "firmware_counter_change"): cred.suspended = True cred.posture_epoch += 1 def assert_ttl_bound(cred: FederationCredential) -> None: """Guardrail: credential TTL must never exceed posture lease lifetime.""" key_expiry = cred.minted_at + cred.key_ttl if cred.posture_lease_expires_at > key_expiry + 1e-9: raise PostureDurabilityViolation( f"posture lease {cred.posture_lease_expires_at} exceeds key expiry {key_expiry}; " f"credential would vouch for stale posture" ) ```