# Where must an instance bind its SPIFFE ID to the *tool-call transcript* rather than to the process, before cross-org federation handoff? **Date of Record:** 2026 November 30 **Scope:** Applies to autonomous LLM agents that obtain a SPIFFE-style workload identity (SVID) at process start and then perform cross-organization federation handoffs (A2A task delegation, MCP tool invocation to a partner-org endpoint) where the receiving org validates the caller's SVID against a trust bundle. Does not apply to single-org intra-cluster mTLS where the process lifetime equals the task lifetime, nor to human-delegated OAuth flows. ## Core Distinction The common mental model is that a workload identity is a property of a *process*: the SPIFFE runtime issues an SVID to the agent's sandbox at boot, the SVID is rotated on a TTL, and every outbound connection presents it. Under that model, identity is stable for the life of the process and the only failure modes are TTL expiry and bundle staleness. The failure mode that actually bites federation is subtler: an LLM agent is *not* a single principal across its task. It is a sequence of tool calls, sub-agent spawns, and checkpoint/resume cycles, and the *reasoning that authorized a specific action* is probabilistic and replayable, while the SVID is a bearer credential that says nothing about *which* action it was minted to authorize. When an agent checkpoints mid-task, resumes in a fresh sandbox (new SVID, same logical task), or delegates a sub-task to a peer agent in another org, the receiving org's policy engine sees a *valid* SVID bound to a *workload*, but has no cryptographic link between that SVID and the specific tool-call transcript that the delegating org claims to have authorized. The invariant that must hold is: **the SVID presented at a federation boundary must be bound to the hash of the specific action transcript it is vouching for, not merely to the process that emitted it.** Without that binding, a valid SVID becomes a confused-deputy token: any holder can replay it against any action the workload is *capable* of, and the receiving org cannot distinguish "the agent decided to call `delete_records`" from "the agent was prompt-injected into calling `delete_records` after its last checkpoint." ## What Was Observed A federated agent (Org A) delegates a data-enrichment sub-task to a partner agent (Org B) over A2A. Org A's agent runs in a sandbox with SVID `spiffe://orgA/agent/enricher`, TTL 1h, rotated every 15m. The task involves ~40 tool calls; at call 22 the agent hits a context-window boundary, checkpoints its episodic state to a vector store, and the orchestrator resumes it in a *new* sandbox. The new sandbox gets a fresh SVID from the same trust domain — same SPIFFE ID string, different key material and different `serialNumber` in the X.509-SVID. Org B's policy engine (OPA + SPIFFE bundle) validates the SVID against Org A's published bundle. It passes. It checks the SPIFFE ID against an allowlist of federated workload paths. It passes. It then executes the requested tool (`enrich.merge`), which mutates Org B's records. Three things went wrong that the process-scoped model cannot see: 1. **The resumed sandbox presented a valid SVID for actions the pre-checkpoint agent never authorized.** The checkpoint contained the *plan* but not a signed commitment to the *remaining* tool calls. On resume, the LLM re-derived the remaining plan from a lossy episodic summary and issued `enrich.merge` with a broader record set than the original task scope. Org B saw a valid `enricher` SVID and a plausible-looking A2A task body; it had no way to check that the *scope* of the merge matched what Org A's policy had approved at task creation. 2. **The SVID rotation crossed the checkpoint boundary silently.** The `serialNumber` changed between call 21 (old sandbox) and call 23 (new sandbox). Org B's audit log recorded two different SVID serials for what it believed was one continuous task. When Org B later ran a verification replay against its own logs, the replay could not reconstruct a single principal for the task, and the auditor consensus split: one auditor treated the two serials as two principals and flagged a handoff; the other treated the SPIFFE ID string as the principal and saw continuity. The replay discrepancy was unresolvable from the transcript alone. 3. **The A2A task body carried the delegating agent's *claim* of authorization, not a proof.** The body included `authorized_by: spiffe://orgA/agent/enricher` and a natural-language scope description. Org B's policy engine parsed the scope description with an LLM-based classifier (non-deterministic) and got a "within scope" verdict on a merge that was, in fact, out of the original task's scope. The classifier was the only thing standing between a valid SVID and an out-of-scope mutation, and it was probabilistic. The trigger condition is precise: **a checkpoint/resume or sub-agent spawn that changes the SVID's key material (serial) while preserving the SPIFFE ID string, combined with a federation peer that authorizes on SPIFFE ID + LLM-classified scope rather than on a signed action transcript.** The failure is silent because every individual check passes. ## Condition of Validity The process-scoped SVID model is valid only when all three of the following hold: - **Process lifetime == task lifetime.** No checkpoint/resume, no sub-agent spawn, no sandbox migration. The SVID that starts the task is the SVID that ends it. - **The federation peer authorizes on the *action*, not the *actor*.** The peer's policy engine has a deterministic, non-LLM mapping from the requested tool call + parameters to an allow/deny decision, and that decision does not depend on a natural-language scope claim. - **The trust bundle's `serialNumber` and key material are irrelevant to the peer's audit model.** The peer treats the SPIFFE ID string as the principal and does not attempt to reconstruct a single-principal transcript across rotations. In the observed incident, condition 1 failed (checkpoint/resume), condition 2 failed (LLM-classified scope), and condition 3 failed (auditor replay split on serial). Any one of these failing is sufficient to break the binding; all three failing simultaneously is what made the incident silent and the replay unresolvable. The invariant that restores validity: **at every federation boundary, the caller must present (a) a valid SVID, (b) a signed digest of the action transcript segment it is vouching for, and (c) a monotonic sequence number that survives checkpoint/resume and is carried in the A2A task metadata.** The peer validates the SVID against the bundle, validates the transcript digest against the action it is about to execute, and records the sequence number so that a later replay can reconstruct a single logical principal across serial rotations. ## Decision Boundary The decision boundary is not "is the SVID valid" — that is necessary but insufficient. The boundary is: > **Does the receiving org have a cryptographic link between the presented SVID and the specific action it is about to execute, such that a replay of the SVID against a *different* action would fail validation?** If yes, the process-scoped model is sufficient and the peer can authorize on SVID alone. If no, the peer is operating on a confused-deputy surface and must require transcript binding. Concretely, the boundary is crossed when any of the following is true at the federation boundary: - The caller's SVID `serialNumber` differs from the serial recorded at task creation (checkpoint/resume occurred). - The A2A task body's scope is expressed in natural language rather than as a structured, signed action list. - The peer's policy engine invokes an LLM to classify scope. - The peer's audit log would show multiple SVID serials for a single logical task. When the boundary is crossed, the peer must *reject* the call and demand a re-delegation with transcript binding, rather than fall back to LLM scope classification. Falling back to the classifier is the exact move that produced the incident: it converts a cryptographic gap into a probabilistic one, and the probabilistic one fails open on out-of-scope mutations. ## Operational Effect The operational consequence is that cross-org federation trust anchors must be **action-scoped, not workload-scoped**, and the binding must survive the agent's own state transitions. This has three concrete effects: 1. **Checkpoint format must include a signed action commitment.** The agent's episodic checkpoint must carry a digest of the remaining authorized action list, signed by the pre-checkpoint SVID. On resume, the new SVID co-signs the digest (or the orchestrator re-issues a delegation warrant carrying the digest). Without this, resume is indistinguishable from a fresh, unconstrained agent that happens to share a SPIFFE ID string. 2. **A2A task metadata must carry the sequence number and transcript digest as first-class fields**, not as natural-language scope prose. The receiving org's policy engine validates the digest against the tool call it is about to execute; a mismatch is a hard reject, not a classifier input. 3. **Auditor replay must key on the logical task ID, not the SVID serial.** The replay discrepancy observed in the incident is a symptom of keying on serial; keying on the task ID carried in A2A metadata lets both auditors reconstruct the same principal across rotations and converge. The failure is not that SPIFFE is wrong; it is that SPIFFE binds identity to *workload*, and an LLM agent's workload is a *task with internal state transitions* that the SVID does not see. The guardrail is to make the task's action transcript a signed artifact that travels with the SVID across every boundary, so that "valid SVID" and "authorized action" are the same check. ```python import hashlib import json from dataclasses import dataclass class FederationBindingError(RuntimeError): """Raised when an SVID is valid but not bound to the action it vouches for.""" pass @dataclass class SVID: spiffe_id: str serial: str key_material: bytes @dataclass class ActionWarrant: """Signed commitment carried across checkpoint/resume and federation boundaries.""" task_id: str sequence: int transcript_digest: str signer_spiffe_id: str signer_serial: str def digest_action(tool_name: str, params: dict) -> str: canonical = json.dumps({"tool": tool_name, "params": params}, sort_keys=True) return hashlib.sha256(canonical.encode()).hexdigest() def validate_federation_call( svid: SVID, warrant: ActionWarrant, requested_tool: str, requested_params: dict, trusted_bundle_serials: set[str], task_creation_serial: str, ) -> None: # 1. SVID must be in the trust bundle. if svid.serial not in trusted_bundle_serials: raise FederationBindingError( f"SVID serial {svid.serial} not in trust bundle" ) # 2. Warrant signer must match the SVID presenting it. if warrant.signer_spiffe_id != svid.spiffe_id: raise FederationBindingError( f"warrant signer {warrant.signer_spiffe_id} != svid {svid.spiffe_id}" ) # 3. The boundary condition: if the SVID serial differs from the # task-creation serial, a checkpoint/resume occurred and the # warrant MUST carry a transcript digest that matches the action. if svid.serial != task_creation_serial: expected = digest_action(requested_tool, requested_params) if warrant.transcript_digest != expected: raise FederationBindingError( "post-resume SVID presented without matching transcript digest; " "refusing to authorize on SVID alone" ) # 4. Sequence must be monotonic and non-zero to survive replay. if warrant.sequence < 1: raise FederationBindingError("warrant sequence not monotonic") # 5. Never fall back to LLM scope classification at this boundary. if "scope_description" in requested_params: raise FederationBindingError( "natural-language scope at federation boundary is not a valid " "authorization proof; require structured action warrant" ) ```