# Where must an instance re-attest mid-handoff when short-lived workload identity TTLs straddle an A2A task boundary **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent systems where each instance authenticates to peers via short-lived workload identity tokens (SPIFFE/SVID-style, OIDC client-credential JWTs, or mTLS certs with sub-hour TTLs) and where a single logical task is delegated across an A2A-style handoff. Does not cover long-lived service accounts, human SSO sessions, or purely intra-process agent calls. ## Core Distinction The failure is not "the token expired." Every operator knows tokens expire and that clients should refresh. The non-obvious distinction is between **identity freshness at connection establishment** and **identity validity at the moment of authorization-bearing state mutation**. Zero-trust A2A handoffs are usually guarded at the *edge*: the receiving agent verifies the sender's SVID/JWT when the handoff request arrives, then drops into a long-running reasoning-and-tool loop. The credential is validated once; the *task* it authorized can outlive it by an order of magnitude. The receiving agent then mutates shared state (writes to a scratchpad, commits a sub-result, calls a downstream tool on the delegator's behalf) minutes later, under an identity that was valid at ingress but is now stale, revoked, or rotated. A second, sharper distinction: the delegator's identity and the *warrant* it propagates are not the same object. A handoff carries (a) the caller's workload identity and (b) the delegated authority scope (which tools, which budget, which tenant). When the caller's TTL is shorter than the delegated task's expected duration, the warrant outlives the identity that justified it. The receiver holds a valid-looking capability with a dead or rotated root. This is the boundary the article addresses: **the point inside a task where the propagated warrant's backing identity has expired but the warrant itself has not been re-bound.** ## What Was Observed A planner agent (`planner-a`, SVID TTL 300s) delegates a multi-step research subtask to `worker-b` via a signed handoff envelope. The envelope contains the planner's SVID-JWT (exp at T+300s) and a delegated scope granting `worker-b` permission to call `search` and `fetch` on the planner's budget for up to 900s. `worker-b` verifies the envelope at ingress (T+2s), caches the parsed claims including `sub=planner-a`, `scope=[search,fetch]`, `budget_id=...`, and begins its loop. The loop is long: three `search` calls, two `fetch` calls with retries on 429s, an LLM synthesis step that alone consumes ~40s of wall clock, and a self-critique pass. At T+310s the planner's SVID has expired and — critically — the workload identity issuer has *rotated* it. The old key is no longer in the trust bundle; a new SVID for `planner-a` exists but the planner never re-sent it because the handoff was a one-shot RPC, not a session. At T+340s `worker-b` issues its fourth tool call. Two outcomes were observed depending on the tool's enforcement point: - **Tool enforces at call time (correct):** the tool's sidecar re-verifies the presented token against the *current* trust bundle. The token is expired and its signing key is gone. The call fails with `401 identity_stale`. `worker-b` has no way to re-obtain the planner's fresh SVID because the handoff channel is closed. The subtask dies at 60% completion with partial state written. - **Tool enforces at session time (the bug):** the tool established a session at T+5s under the then-valid token and pins the authorization decision to the session. The fourth call *succeeds* at T+340s under an identity that has been dead for 40s and whose key has been revoked. A revoked-but-cached authorization executed a state mutation. This is the silent zero-trust violation: no error, no log line, a successful write attributed to an identity the issuer no longer recognizes. The observable signature in the second case is a **replay discrepancy**: the audit log of `worker-b`'s tool calls, when joined against the issuer's SVID issuance/revocation ledger, shows tool calls attributed to `planner-a` occurring *after* that SVID's revocation timestamp. The join is the only place the violation is visible. Neither the agent nor the tool logs it as an error. A third variant appeared under concurrent load: `worker-b` retried a `fetch` at T+298s, the token was valid, the call succeeded, but the response arrived at T+305s and `worker-b` then wrote a sub-result to the shared scratchpad at T+306s. The *write* — the mutation — happened post-expiry even though the *call* was pre-expiry. The enforcement point was the outbound call; the consequential action was the inbound commit. ## Condition of Validity The invariant that must hold for a zero-trust A2A handoff to remain sound is: > Every authorization-bearing state mutation performed on behalf of a delegated warrant must be preceded, within the same atomic step, by a re-verification of the backing identity against the issuer's *current* trust bundle — not a cached decision from ingress. This holds under the following conditions, and fails outside them: 1. **TTL vs. task-duration ordering.** The invariant is trivially satisfied when `identity_TTL > expected_task_duration + slack`. It is violated when `identity_TTL < task_duration`, which is the normal case for short-lived workload identities (minutes) and agentic tasks (tens of minutes). The boundary is the crossover: once task duration exceeds TTL, at least one mutation will occur under a stale identity unless re-attestation is forced. 2. **One-shot vs. session handoff.** A one-shot handoff RPC has no channel for the delegator to push a refreshed SVID. Therefore the receiver *cannot* re-attest to the delegator mid-task; it can only re-verify against the issuer. If the issuer has rotated the delegator's key, re-verification fails and the task must checkpoint-and-suspend, not silently continue. 3. **Warrant binding.** The delegated scope must be cryptographically bound to the specific identity instance (e.g., the SVID's serial or the JWT's `jti`), not merely to the `sub` claim. If the warrant says "planner-a may delegate search/fetch" and is bound only to the subject name, then a rotated SVID for the same subject silently re-validates the warrant — which is *usually* fine but hides the window where the old identity was revoked for cause. Binding to `jti` forces explicit re-issuance. 4. **Enforcement granularity.** The invariant only holds if the enforcement point is the mutation, not the session. Session-pinned authorization (OAuth-style "authorize once, act for the session") is structurally incompatible with short-lived identities and must be rejected for A2A. Outside these conditions — long-lived identities, or tasks provably shorter than TTL, or session-oriented protocols where the delegator maintains a live channel — the boundary does not bite and standard edge-verification suffices. ## Decision Boundary The operational decision is: **at which point in the task lifecycle must the receiver force re-attestation, and what does it do when re-attestation fails?** The boundary is drawn by two predicates evaluated per mutation: - `now > token.exp - refresh_margin` → the token is within its refresh window; the receiver must attempt re-attestation before the mutation. - `token.jti ∉ issuer.current_trust_bundle` → the token's backing identity has been rotated or revoked; re-attestation is *mandatory and cannot be satisfied by the held token*. If either predicate is true, the receiver must not perform the mutation under the held token. It has exactly two sound options: 1. **Re-attest via a live channel** if one exists (session handoff, or a delegator callback endpoint). Fetch a fresh SVID bound to the same warrant, re-bind, proceed. 2. **Checkpoint-and-suspend** if no live channel exists. Persist the task state, mark the warrant `pending_reattest`, and yield. The delegator, on its next scheduling tick, re-issues a fresh handoff envelope with a new SVID and a re-bound warrant; the receiver resumes from checkpoint. The unsound options — and these are the ones observed in production — are: (a) continue under the held token because the session was authorized at ingress; (b) continue because "the subject is the same, only the key rotated"; (c) fail the whole task and discard partial state, forcing a full restart that re-incurs the same TTL crossover. Option (c) is not a zero-trust violation but is an availability failure that operators frequently "fix" by relaxing to (a). The decision boundary is therefore sharp: **the receiver must treat a rotated backing identity as a hard stop on mutation, never as a soft warning, and must have a checkpoint path ready because the one-shot handoff gives it no way to refresh in place.** ## Operational Effect When the invariant is enforced at the mutation boundary, the failure mode changes from *silent unauthorized mutation* to *visible mid-task suspension*. The task does not complete in one shot; it completes in two segments separated by a re-handoff. This costs one round-trip and a checkpoint write, and it surfaces the TTL crossover as an explicit, auditable event (`warrant_reattest_required`) rather than a post-hoc replay discrepancy found weeks later in an audit join. When the invariant is not enforced, the system appears healthier than it is: task success rates are high, latency is low, and the only signal is an audit-ledger join that most teams never run. The violation is invisible precisely because the token *looked* valid at the moment it was checked — at ingress. The gap between ingress-check and mutation-commit is the entire attack surface, and it widens linearly with task duration while the TTL stays fixed. The practical guardrails that bound the failure: - Bind delegated warrants to `jti`, not `sub`, so rotation forces explicit re-issuance. - Set `refresh_margin` to at least the p99 single-step latency of the receiver's loop, so the refresh window opens before the mutation, not during it. - Instrument the issuer ledger join as a *live* check (a cheap `jti` existence probe at each mutation), not a nightly batch. - Give every handoff envelope a `reattest_endpoint` or an explicit `no_reattest → checkpoint_on_expiry` flag so the receiver's fallback is deterministic rather than improvised. The following reference implementation encodes the mutation-boundary check and the two sound fallbacks, raising a typed error when the receiver attempts a mutation under a rotated backing identity without a live re-attestation path. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleWorkloadIdentityError(RuntimeError): """Raised when a mutation is attempted under a warrant whose backing workload identity has expired or been rotated out of the trust bundle, and no live re-attestation channel is available.""" pass @dataclass class Warrant: subject: str jti: str # bound to identity instance, not just sub scope: list exp: float # unix seconds reattest_endpoint: Optional[str] = None @dataclass class TrustBundle: # jti -> current validity; rotated/revoked jtis are absent valid_jtis: set = field(default_factory=set) def contains(self, jti: str) -> bool: return jti in self.valid_jtis class DelegatedTask: def __init__(self, warrant: Warrant, bundle: TrustBundle, refresh_margin: float = 5.0): self.warrant = warrant self.bundle = bundle self.refresh_margin = refresh_margin self.checkpoint = None def _must_reattest(self, now: float) -> bool: within_refresh = now > (self.warrant.exp - self.refresh_margin) rotated = not self.bundle.contains(self.warrant.jti) return within_refresh or rotated def _reattest(self) -> Warrant: if not self.warrant.reattest_endpoint: raise StaleWorkloadIdentityError( f"warrant {self.warrant.jti} requires re-attestation but " f"handoff is one-shot (no reattest_endpoint)" ) # In production: call endpoint, receive fresh SVID + re-bound warrant. raise StaleWorkloadIdentityError( "re-attestation channel unavailable at runtime" ) def mutate(self, now: float, apply_fn): """The single authorization-bearing mutation boundary.""" if self._must_reattest(now): if self.bundle.contains(self.warrant.jti) and now <= self.warrant.exp: # within refresh window but still valid: refresh then proceed self.warrant = self._reattest() else: # rotated or expired: hard stop, checkpoint, suspend self.checkpoint = {"state": "pending_reattest", "jti": self.warrant.jti, "at": now} raise StaleWorkloadIdentityError( f"mutation blocked: jti {self.warrant.jti} not in current " f"trust bundle at t={now}; checkpointed for re-handoff" ) return apply_fn() # --- observed failure trace --- bundle = TrustBundle(valid_jtis={"jti-planner-001"}) w = Warrant(subject="planner-a", jti="jti-planner-001", scope=["search", "fetch"], exp=300.0) task = DelegatedTask(w, bundle) task.mutate(now=2.0, apply_fn=lambda: "search-ok") # ingress, valid bundle.valid_jtis.clear() # issuer rotates at T+310 try: task.mutate(now=340.0, apply_fn=lambda: "fetch-ok") # would be silent write except StaleWorkloadIdentityError as e: print("BLOCKED:", e) print("checkpoint:", task.checkpoint) ```