# Under what conditions must an instance refuse a delegated AAIF authorization chain whose workload-binding attestation was minted for a prior epoch of its own sandbox **Date of Record:** 2026 December 3 **Scope:** Applies to AAIF (Agent-to-Agent Identity Federation) deployments where an agent instance presents a delegated authorization chain (`issuer → delegate₁ → … → delegateₙ → self`) and each hop carries a workload-bound attestation (WBA) binding the credential to a specific sandbox measurement (image digest, kernel/TPM PCR set, cgroup identity, or runtime quote). Does not apply to bearer-token-only federations or to chains whose attestations are re-verified fresh at every hop by an independent verifier. ## Core Distinction A delegated authorization chain answers *"is this lineage of principals allowed to act?"* A workload-bound attestation answers *"is the process presenting this chain the same process the chain was delegated to?"* These are orthogonal, and the failure mode lives precisely in the seam: a chain can be cryptographically valid, unexpired, correctly scoped, and *still* be presented by an instance whose sandbox has drifted from the measurement the WBA was minted against. The distinction that matters operationally is between **chain validity** (signature + expiry + scope + delegation depth) and **binding validity** (measurement match between the WBA's attested workload and the presenter's current workload). Verifiers that collapse these two checks into a single "chain verified" boolean silently authorize a credentialed stranger. The non-obvious part: the binding can fail *without any compromise*. A long-lived agent instance that checkpoints, resumes, hot-patches, or is rescheduled onto a new node will legitimately change its own workload measurement mid-chain-lifetime. The WBA was correct when minted; it is now stale but not forged. This is the epoch-drift case, and it is the one that breaks naive verifiers. ## What Was Observed An orchestrator agent `O` delegated a scoped capability to worker `W` at epoch `e₀`. At `e₀`, `W` ran image digest `sha256:aaa…` under cgroup `worker-7`, and `O` minted a WBA over the tuple `(W_pubkey, image=aaa…, cgroup=worker-7, epoch=e₀, chain_id=C)`. The chain was valid for 6 hours. At `e₀ + 40min`, `W` hit a mid-task checkpoint, was evicted, and resumed on a different node under image digest `sha256:bbb…` (a patched base layer) with cgroup `worker-12`. `W`'s private key was preserved across resume (correctly — it is the *identity*, not the *workload*), so `W` continued to sign requests with the same key and presented the same chain `C`. The downstream verifier `V` performed: signature check on every hop → expiry check → scope check → depth check → **accept**. It did not re-derive the workload measurement and compare it to the WBA's attested value. `V` therefore authorized `W` post-resume under a binding that no longer described `W`. Two consequences were observed: 1. **Privilege laundering across a patch boundary.** The image change from `aaa…` to `bbb…` was a security patch that *removed* a capability `W` had previously held. The stale WBA continued to assert the pre-patch workload, so `W` retained authorization semantics computed against a workload it no longer was. 2. **Auditor replay divergence.** When the auditor replayed the chain hours later, it re-derived measurements from the *current* fleet state, found `bbb…`, and flagged the chain as invalid — producing a verification disagreement between the live verifier (accept) and the replay auditor (reject) on the *same* chain. The chain had not changed; the workload had. The decisive observation: the failure was invisible at the chain layer and only detectable by re-deriving the workload measurement at presentation time and comparing it to the WBA's attested tuple. Neither the signature nor the expiry nor the scope ever indicated a problem. ## Condition of Validity The invariant that must hold for a WBA to remain authoritative is: > A WBA minted at epoch `e` over workload measurement `m` is valid for presentation at time `t` **iff** the presenter's current workload measurement `m'(t)` equals `m`, **or** the chain carries an explicit re-attestation hop signed by an authorized re-attester at some epoch `e' ∈ (e, t]` whose attested `m'` equals `m'(t)`. This decomposes into three checkable conditions, all of which must be enforced at *presentation time*, not at mint time: 1. **Measurement equality (or a superseding re-attestation).** `m'(t) == m`, or the chain contains a later WBA hop over `m'(t)` signed by a principal authorized to re-attest for that delegation scope. Re-attestation must be a *first-class hop*, not an out-of-band note — otherwise the auditor cannot replay it. 2. **Epoch monotonicity.** The WBA's `epoch` must be ≤ the presenter's current epoch, and any re-attestation hop must have strictly greater epoch than the hop it supersedes. Epoch is a logical clock over workload changes, not wall time; a resumed instance must bump its epoch on every measurement-changing transition (resume, patch, reschedule, cgroup migration). 3. **Re-attester authority bounded by the original delegation.** The re-attester may narrow scope but must not widen it. A re-attestation hop that grants capability not present in the original delegation is a chain-forgery vector and must be rejected regardless of signature validity. When all three hold, the chain is binding-valid. When (1) fails without a superseding hop, the chain is **epoch-stale** and must be refused even though it is signature-valid. ## Decision Boundary The verifier's decision is not "valid / invalid" but a three-way split that must be made explicit: - **Accept:** chain valid *and* `m'(t) == m` (or superseding re-attestation present with `m'` matching). - **Refuse-and-request-re-attestation:** chain valid, `m'(t) != m`, presenter's identity key matches the chain's terminal delegate, and the presenter's epoch is strictly greater than the WBA epoch. This is the *legitimate drift* case — the instance is who it claims, its workload simply moved. The correct response is to reject the *current presentation* and demand a fresh re-attestation hop from an authorized re-attester, **not** to revoke the identity. - **Reject-and-quarantine:** `m'(t) != m` **and** (presenter key does not match terminal delegate) **or** (epoch non-monotonic) **or** (re-attestation hop widens scope). This is the forgery/staleness-with-anomaly case and must escalate. The boundary that trips most implementations is conflating the second and third outcomes. Treating legitimate epoch-drift as forgery causes spurious identity revocations on every routine reschedule; treating forgery as legitimate drift is the privilege-laundering hole. The discriminator is *key continuity plus epoch monotonicity plus scope non-widening* — three cheap checks that separate "same agent, new workload" from "different agent, borrowed chain." A second boundary: the verifier must **not** trust the presenter's self-reported measurement. `m'(t)` must be derived by the verifier from an independent runtime quote (TPM, measured boot, or a verifier-controlled probe), never from a field the presenter supplies. A presenter-supplied `m'` reduces the entire binding to a bearer claim. ## Operational Effect Enforcing the three-way boundary changes three things in production: 1. **Resume and reschedule paths must bump epoch and trigger re-attestation before the next authorized call.** An instance that resumes without bumping its epoch will present a chain that the verifier correctly refuses; the fix is in the resume handler, not the verifier. The resume handler must, as its first post-resume action, obtain a fresh WBA hop over its new measurement from an authorized re-attester and splice it into the chain before any downstream call. 2. **Auditor replay must re-derive measurements from the epoch recorded in each hop, not from current fleet state.** The replay divergence observed above was an auditor bug: comparing a historical chain against present-tense measurements is a category error. The auditor must reconstruct `m'(t_hop)` from the hop's own epoch and the fleet state *at that epoch*, or accept the hop's attested measurement as the ground truth for that epoch and verify only that the *next* hop's measurement is consistent with a legitimate transition. 3. **Identity revocation is decoupled from binding refusal.** A refused presentation due to epoch-staleness must not revoke the identity key. Revocation is reserved for key-mismatch or scope-widening anomalies. Coupling the two produces flapping identity state under normal churn. The invariant to carry forward: **a WBA is a statement about a workload at an epoch, not about a key over a lifetime.** Any verifier that treats it as the latter will authorize a credentialed stranger the first time the sandbox moves. ```python class EpochStaleAttestationError(RuntimeError): """Raised when a delegated AAIF chain's workload-binding attestation was minted for a prior epoch of the presenter's sandbox and no superseding re-attestation hop covers the current measurement.""" pass class ChainForgeryError(RuntimeError): """Raised when measurement mismatch coincides with key discontinuity, epoch non-monotonicity, or scope-widening re-attestation.""" pass def verify_delegated_chain( chain, presenter_pubkey: bytes, current_measurement: str, current_epoch: int, derive_measurement, # verifier-controlled probe; never trust presenter ): # 1. Structural validity: signatures, expiry, scope, depth. chain.verify_signatures() chain.verify_expiry() chain.verify_scope_monotonic() # no hop widens scope chain.verify_depth() # 2. Binding validity: re-derive measurement independently. measured = derive_measurement(presenter_pubkey) if measured != current_measurement: raise ChainForgeryError( "presenter-supplied measurement disagrees with verifier probe" ) terminal = chain.terminal_delegate() wba = terminal.workload_binding # 3. Key continuity and epoch monotonicity — discriminates drift from forgery. if presenter_pubkey != terminal.pubkey: raise ChainForgeryError("presenter key does not match terminal delegate") if current_epoch < wba.epoch: raise ChainForgeryError( f"epoch regression: presenter {current_epoch} < attested {wba.epoch}" ) # 4. Measurement equality, or a superseding re-attestation hop. if current_measurement == wba.measurement: return "ACCEPT" superseding = chain.latest_reattestation_for(terminal.pubkey) if superseding is not None: if superseding.epoch <= wba.epoch: raise ChainForgeryError("re-attestation epoch not strictly greater") if superseding.measurement == current_measurement: return "ACCEPT" raise EpochStaleAttestationError( f"re-attestation covers {superseding.measurement}, " f"presenter is {current_measurement}" ) # 5. Legitimate drift: same key, monotonic epoch, no superseding hop. # Refuse the presentation; do NOT revoke identity. raise EpochStaleAttestationError( f"chain minted at epoch {wba.epoch} for measurement {wba.measurement}; " f"presenter at epoch {current_epoch} is {current_measurement}. " f"Request re-attestation hop from authorized re-attester." ) ```