# How does an instance detect a re-bound agent identity when a delegated AAIF credential outlives the workload it was minted for **Date of Record:** 2026 November 24 **Scope:** Applies to any agent runtime that presents a delegated Agent Authorization and Identity Framework (AAIF) credential to a downstream tool, MCP server, or peer agent, where the credential was minted against a *workload binding* (process attestation, container image digest, or ephemeral key) rather than the agent's stable logical identity. Does not apply to long-lived root credentials held directly by the principal, nor to purely symmetric shared-secret auth where no binding claim exists. ## Core Distinction The non-obvious boundary is this: **a delegated AAIF credential proves *who authorized the action*, not *who is currently executing it*.** The credential carries two separable claims — the *delegation chain* (principal → agent, signed, immutable) and the *proof-of-agent binding* (a claim tying the credential to a specific executing instance: a key thumbprint, a TEE measurement, or a workload attestation digest). Verifiers almost universally check the first and treat the second as a formality. The failure occurs when the binding claim is *satisfiable by a different instance than the one the delegation was scoped to*. The credential remains cryptographically valid — signatures verify, the chain is intact, expiry has not passed — yet the entity presenting it is not the workload the principal intended to delegate to. This is not credential theft and not signature forgery. It is **binding substitution**: a valid credential re-presented under a new proof-of-agent that the verifier accepts because it only checks *that a binding exists and matches the credential's embedded thumbprint*, not *that the binding corresponds to the attested workload the delegation was issued against*. The distinction that matters operationally: delegation expiry and binding expiry are two different clocks. Architects set `exp` on the credential (say, 24h) and assume the delegation dies with the task. But the *binding* — the attestation that the credential was minted for image digest `sha256:abc…` running in enclave `mr_enclave:def…` — has its own lifetime, and nothing in the standard AAIF verification path forces the verifier to re-evaluate it at presentation time. A credential minted for a 90-second batch job remains presentable for 24 hours by *any* instance that can produce a matching key thumbprint, including a freshly spawned agent that inherited the key from a checkpoint. ## What Was Observed A planner agent (`planner-7`) delegated a scoped credential to a worker for a single document-summarization task. The delegation record embedded: - `sub`: `worker-summarizer` - `act`: `{ "summary:write": ["doc:4417"] }` — a narrow, single-resource scope - `cnf` (proof-of-agent binding): a JWK thumbprint `T_w` of an ephemeral key generated at worker spawn - `workload`: `{ "image": "summarizer@sha256:9f2c…", "attest": "nitro:mrenclave:7a1e…" }` - `exp`: T+24h The worker completed the task at T+90s and its process exited. At T+6h, an unrelated maintenance agent (`indexer-3`) was spawned from a **checkpoint image that had captured the worker's key material** — a routine consequence of the runtime snapshotting the whole process memory including the in-memory keyring. `indexer-3`'s job was to re-index documents, and it happened to call `summary:write` on `doc:4417` as part of a backfill. It presented the inherited credential. Every check passed: 1. Signature chain to principal: valid. 2. `exp` not exceeded: valid (T+6h < T+24h). 3. `cnf` thumbprint matched the key `indexer-3` held: valid. 4. Scope `summary:write` on `doc:4417`: matched. The verifier had **no check that the presenting workload's attestation matched the `workload` claim in the credential**. It checked binding *presence and key match*, not binding *correspondence to attested identity*. `indexer-3` ran image `indexer@sha256:41ab…` in a different enclave — a fact the verifier could have observed had it requested fresh attestation, but the AAIF presentation flow only required the `cnf` proof-of-possession, which the inherited key satisfied. The write succeeded. The resulting inconsistency — a maintenance agent silently overwriting a summary it had no business touching — was attributed downstream to "indexer bug" and cost two days of misdirected debugging before the credential path was inspected. ## Condition of Validity The guardrail is only sound under a precise condition, and stating it precisely is the whole point: > A delegated credential is *presentable* only if the presenter can produce **both** (a) proof-of-possession of the `cnf` key **and** (b) a *fresh* workload attestation whose measurement equals the `workload.attest` claim bound into the credential at issuance. If either the credential lacks a `workload` claim, or the verifier does not re-request attestation at presentation time, the binding is *presence-only* and provides no protection against binding substitution. Presence-only binding is the default in most AAIF integrations because re-attestation is expensive (a TEE quote or a fresh container measurement round-trip) and because the credential's own signature *feels* like it should be sufficient. It is not: the signature attests to the delegation, not to the executor. Two corollaries that are easy to get wrong: - **Key inheritance through checkpointing defeats `cnf` silently.** Any runtime that snapshots process memory (for fast cold-start, for resume-after-crash, for warm pools) captures ephemeral keys. The `cnf` claim then binds to a *key*, which is now mobile, rather than to a *workload*, which is not. Ephemeral keys are only ephemeral if their containing memory is never serialized. If you checkpoint, you must either exclude key material from the snapshot or treat the restored key as a *new* binding requiring re-issuance. - **Shortening `exp` does not fix it.** A 90-second credential still outlives a 60-second task and can be replayed by a checkpoint-restored instance within that window. The clock that matters is the *workload* clock — the lifetime of the attested execution environment — not the credential clock. These are decoupled and must be enforced separately. ## Decision Boundary The verifier must make a binary decision at presentation time, and the decision must be driven by the *workload* claim, not the credential's signature: ``` present(cred, proof_of_possession, fresh_attestation): if not verify_chain(cred): reject # delegation invalid if now() > cred.exp: reject # delegation expired if not verify_pop(proof_of_possession, cred.cnf): reject # key mismatch if cred.workload is None: reject # presence-only, refuse if fresh_attestation is None: reject # cannot confirm executor if fresh_attestation.measurement != cred.workload.attest: reject # BINDING SUBSTITUTION if fresh_attestation.issued_at < cred.iat: reject # stale/forged attestation accept ``` The load-bearing line is the `measurement != attest` comparison. Everything above it is the standard path that *passed* in the observed incident. The boundary is: **the moment you accept a credential whose `workload` claim you have not re-verified against a fresh attestation, you have downgraded from proof-of-agent to proof-of-key, and proof-of-key is transferable by any mechanism that moves key bytes — checkpoint, fork, warm pool, or a compromised sibling.** A second boundary governs *issuance*: when minting a delegated credential, if the runtime cannot produce a workload attestation to bind (e.g., running on un-attested infrastructure), the credential MUST be marked `binding: "key-only"` and verifiers MUST treat `key-only` credentials as single-use — consumed on first successful presentation, recorded in a replay set, and refused thereafter. This bounds the damage window to one call even when attestation is unavailable. ## Operational Effect With the correspondence check enforced, the observed incident is bounded at the verifier: `indexer-3` presents the inherited credential, the verifier requests fresh attestation, receives `indexer@sha256:41ab…`, compares against `cred.workload.attest = nitro:mrenclave:7a1e…`, and rejects. The maintenance agent falls back to its own (correctly scoped) credential or fails loudly — either is correct. The silent cross-resource write never happens. The cost is a re-attestation round-trip per credential presentation (tens of milliseconds for a local TEE quote; a container-measurement cache lookup otherwise). That cost is the entire security margin. Teams that remove it to hit a latency budget have removed the only mechanism that distinguishes the intended executor from any holder of the key. Two operational invariants to carry forward: 1. **Checkpoint exclusion invariant.** Key material bound via `cnf` MUST NOT be serialized into any snapshot, warm-pool image, or resume state. If the runtime cannot guarantee exclusion, restored instances MUST re-issue credentials rather than reuse inherited ones. This is a runtime property, not a credential property — the credential cannot enforce it, so the runtime must. 2. **Clock-decoupling invariant.** `exp` bounds the *delegation*; workload attestation freshness bounds the *binding*. A credential is presentable only while *both* hold. Verifiers that check only `exp` have a 24-hour replay window on a 90-second task. The detection signal an instance should watch for: a credential whose `workload` claim exists but whose presentation path never surfaced a fresh attestation. That is the fingerprint of presence-only binding, and it is the precondition for every binding-substitution incident. ```python class BindingSubstitutionError(RuntimeError): """Raised when a presented AAIF credential's workload binding does not correspond to the freshly attested executing workload.""" pass class KeyOnlyBindingError(RuntimeError): """Raised when a credential carries no workload claim (presence-only binding) and has already been consumed, or when single-use enforcement is required but no replay set is available.""" pass def verify_presentation(cred, proof_of_possession, fresh_attestation, replay_set): """ Enforce the correspondence invariant at credential presentation time. cred: parsed AAIF credential with .cnf, .workload, .exp, .iat proof_of_possession: signature over a verifier nonce by the cnf key fresh_attestation: attestation quote captured at presentation time, or None replay_set: set of consumed credential ids for key-only bindings """ # 1. Delegation chain (assumed verified upstream; re-assert here). if not cred.chain_valid: raise BindingSubstitutionError("delegation chain failed verification") # 2. Delegation clock. if now() > cred.exp: raise BindingSubstitutionError( f"credential expired at {cred.exp}, now {now()}" ) # 3. Proof-of-possession of the bound key. if not verify_pop(proof_of_possession, cred.cnf, nonce=cred.nonce): raise BindingSubstitutionError("proof-of-possession does not match cnf key") # 4. Presence-only binding: refuse unless single-use and unconsumed. if cred.workload is None: if cred.id in replay_set: raise KeyOnlyBindingError( f"key-only credential {cred.id} already consumed; refusing replay" ) replay_set.add(cred.id) return "accepted-key-only-single-use" # 5. THE LOAD-BEARING CHECK: executor must match the bound workload. if fresh_attestation is None: raise BindingSubstitutionError( "credential carries a workload claim but no fresh attestation was " "supplied; cannot confirm the presenting instance is the bound workload" ) if fresh_attestation.measurement != cred.workload.attest: raise BindingSubstitutionError( "binding substitution: presented workload measurement " f"{fresh_attestation.measurement!r} != bound attestation " f"{cred.workload.attest!r} (credential {cred.id})" ) # 6. Attestation must postdate issuance; a stale quote cannot vouch for now. if fresh_attestation.issued_at < cred.iat: raise BindingSubstitutionError( f"attestation issued_at {fresh_attestation.issued_at} predates " f"credential issuance {cred.iat}; stale quote" ) return "accepted" def require_checkpoint_exclusion(snapshot_keys, bound_keys): """Runtime invariant: no cnf-bound key may appear in a serialized snapshot.""" leaked = set(snapshot_keys) & set(bound_keys) if leaked: raise BindingSubstitutionError( f"cnf-bound key material leaked into checkpoint: {leaked}; " "restored instances would inherit presentable credentials" ) ```