# What happens when an instance loses its delegated capability attestation mid-flight across organizational boundaries **Date of Record:** 2026 November 16 **Scope:** Applies to cross-organization agent-to-agent (A2A) or tool-invocation flows where authority is conveyed via a delegated capability attestation (e.g., a signed macaroon, biscuit, or OIDC token-exchange-derived credential) whose validity is bounded by both an issuer-controlled revocation surface and a resource-holder-controlled policy. Does not apply to single-tenant deployments where the issuer and the verifier share a common trust root and revocation is synchronous. ## Core Distinction There are two structurally different failure modes when an agent's delegated authority is invalidated: 1. **The credential is rejected at presentation time.** The verifier checks the attestation, finds it expired, revoked, or out of scope, and refuses the call. This is the *designed* failure: it is atomic, observable, and leaves no partial side effects. Every hop in the chain sees a clean denial. 2. **The credential was valid when the call was admitted, but becomes invalid while the call is in flight.** The agent's authority is a *point-in-time* assertion, but the operation it authorized is a *duration*. Between the admission check and the commit of the side effect, the issuer may revoke, the delegation chain may be shortened, a policy on the resource holder may tighten, or an intermediate hop's attestation may lapse. The non-obvious invariant is this: **a delegated capability attestation authorizes state transitions, not intervals.** Any system that treats a validated attestation as a lease over a wall-clock window has silently introduced a capability whose lifetime is unbounded by the credential's own validity. The gap between "admitted" and "committed" is a trust window that no party in the chain actually owns. This distinction is invisible in the happy path and invisible in the pure-rejection path. It only manifests under concurrent revocation during a long-running cross-org operation — exactly the case that cross-org delegation is built for. ## What Was Observed In a federated deployment (Org A issues a delegated capability to an agent acting on behalf of a user; Org B hosts the resource and verifies the attestation via Org A's JWKS plus a short-TTL revocation list), the following sequence was captured repeatedly: - `t=0`: Agent in Org A presents a biscuit chain to Org B's gateway. Chain is valid, scoped to `resource:write`, TTL 300s. Gateway admits the request and begins a multi-step write (three sequential sub-operations against a ledger, each requiring a re-check against a downstream service). - `t=140`: User in Org A revokes the agent's delegation. Revocation propagates to Org A's revocation endpoint within its advertised 60s SLA. - `t=155`: Org B's gateway refreshes its revocation cache and observes the revocation. It marks the *session* as revoked for future admission. - `t=210`: The in-flight operation completes its third sub-operation and commits. Org B's ledger now reflects a write authorized by a capability that was revoked 70 seconds earlier. The critical observation: **the gateway did not re-validate the attestation between sub-operations.** It had cached the admission decision at `t=0` and treated it as valid for the session. The revocation at `t=140` was observed and applied to *new* admissions but not to *already-admitted* operations. The downstream services saw no attestation at all — they trusted the gateway's session token. A second, subtler observation: when the gateway *was* configured to re-check the attestation per sub-operation, the failure shifted rather than disappeared. Re-checking at `t=155` caused sub-operation 3 to fail *after* sub-operations 1 and 2 had committed. The ledger was left in a state that was neither "authorized" nor "rolled back" — a half-applied capability whose authorization had been withdrawn mid-sequence. This is strictly worse than the first case, because it produces a partial side effect with no compensating authority to reverse it. The invariant that was violated: **capability validity must be checked against the commit boundary, not the admission boundary, and the commit must be atomic with respect to revocation.** Neither deployment satisfied it. The first violated it by widening the window; the second violated it by making the window non-atomic. ## Condition of Validity The admission-time check is only sound when *all* of the following hold: 1. The operation authorized by the attestation is **idempotent and atomic** — it either fully commits or fully aborts, with no intermediate durable state. 2. The maximum operation duration is **strictly less than** the attestation's minimum residual validity at admission (not its nominal TTL — its residual validity after accounting for clock skew and revocation propagation delay). 3. The verifier's revocation propagation delay plus the operation duration is **bounded below** the attestation TTL, with margin. 4. No intermediate hop downstream of the verifier makes an independent authorization decision based on a *different* trust anchor. Condition 2 is the one most frequently violated. Teams size TTLs for the *user's* convenience (a 5-minute token for a 30-second call) and then add a long-running operation that consumes the full TTL. The residual validity at admission is not the TTL; it is `TTL − (time since issuance) − (propagation delay) − (clock skew)`. An attestation issued 240s ago with a 300s TTL and a 60s revocation SLA has *negative* usable residual validity — it should never have been admitted, but a naive verifier that checks only `exp > now` admits it. Condition 4 is the cross-org-specific trap. Org B's gateway validates Org A's attestation, then mints a *local* session token that downstream Org B services trust. That local token is a second trust anchor, and its lifetime is decoupled from the original attestation. The delegation chain has been "laundered" into a local authority that Org A cannot revoke. This is the mechanism by which the `t=210` commit happened: Org A revoked its attestation, but Org B's downstream services were never checking Org A's authority at all — they were checking Org B's session. ## Decision Boundary The operational decision is not "re-validate or don't." It is a choice among three strategies, and the correct one depends on the operation's atomicity and duration: - **Short, atomic, idempotent operations** (single write, single tool call, sub-second): admit once at the boundary and commit. Re-validation adds latency without reducing risk, because the operation cannot span a revocation window that matters. Bound the operation duration to a small fraction of the residual validity and enforce it with a deadline. - **Long, atomic operations** (a transaction that either commits or aborts): **do not admit on a cached decision.** Re-validate the attestation immediately before the commit, and make the commit conditional on that re-validation. If re-validation fails, abort the whole operation. This requires the operation to be genuinely atomic — if it is not, you are in the third case whether you know it or not. - **Long, non-atomic, multi-step operations** (the common cross-org agent case): there is no sound admission-time strategy. The correct approach is to **decompose the operation into independently-authorized steps**, each carrying its own short-lived attestation, each atomic, each re-validated. The delegation is not "authority to do the whole thing"; it is "authority to request the next step." This is more expensive and requires the issuer to support step-wise re-delegation, which most cross-org trust fabrics do not. When they do not, the honest answer is that the operation is not safely delegable across an organizational boundary, and it should be run under a single-org trust anchor or with a human in the loop at each commit. The boundary is crossed when `operation_duration + revocation_propagation_delay + clock_skew ≥ residual_validity_at_admission`. On the safe side, admission-time checking is sufficient. On the unsafe side, admission-time checking is a fiction, and the only question is whether the fiction produces a clean denial (re-check, non-atomic) or a silent overrun (cache, atomic-but-stale). Both are failures; they differ only in whether you find out. ## Operational Effect The practical consequences observed: - **Audit trails diverge from authority.** The ledger records a write at `t=210` attributed to a capability revoked at `t=140`. Any post-hoc audit that reconstructs authority from the attestation's validity window will conclude the write was unauthorized, even though the gateway's logs show a valid admission. Reconciliation between the two views is manual and error-prone. - **Revocation becomes advisory, not authoritative.** Once a verifier caches an admission decision, the issuer's revocation surface no longer controls the operation. The issuer believes revocation is effective; the verifier believes admission is durable. Neither is wrong about its own component, and the system as a whole is wrong. - **The failure is load-dependent.** Under low concurrency, operations complete well within residual validity and the window is never observed. Under load, operation duration stretches, residual validity shrinks (because admission is delayed), and the window opens. The bug appears as a "flaky" incident that correlates with traffic, not with any code change. - **Compensating transactions are the only recovery.** Because the overrun commits, the only remedy is a compensating action authorized by a *fresh* capability. If the issuer has already revoked the original delegation, the compensating capability may not be issuable, and the state is unrecoverable without out-of-band intervention. The operational rule that follows: **treat every cross-org delegated capability as if it will be revoked at the worst possible moment, and design the operation so that the worst possible moment is a clean abort point.** If the operation has no such point, it is not delegable, regardless of what the trust fabric allows you to express. ```python import time from dataclasses import dataclass class DelegationWindowViolated(RuntimeError): """Raised when a cross-org operation would commit past the safe authority window.""" @dataclass(frozen=True) class Attestation: subject: str scope: str issued_at: float ttl: float revocation_sla: float def residual_validity(self, now: float) -> float: # Usable authority is not the TTL; it is what remains after issuance age. return (self.issued_at + self.ttl) - now def safe_commit_deadline(self, now: float, clock_skew: float) -> float: # Latest wall-clock time at which a commit is still soundly authorized. # Must leave room for revocation propagation and skew. return now + self.residual_validity(now) - self.revocation_sla - clock_skew def assert_commit_within_authority( att: Attestation, operation_duration: float, now: float, clock_skew: float = 2.0, ) -> None: """Gate a commit on the *commit* boundary, not the admission boundary. Raises DelegationWindowViolated if the operation cannot complete before the attestation's authority is no longer sound. """ deadline = att.safe_commit_deadline(now, clock_skew) projected_commit = now + operation_duration if projected_commit > deadline: raise DelegationWindowViolated( f"subject={att.subject!r} scope={att.scope!r} " f"projected_commit={projected_commit:.1f} " f"deadline={deadline:.1f} " f"residual={att.residual_validity(now):.1f} " f"revocation_sla={att.revocation_sla:.1f} " f"skew={clock_skew:.1f}: operation would commit outside " f"the sound authority window; decompose into per-step " f"attestations or abort." ) def run_delegated_step(att: Attestation, step_duration: float) -> None: now = time.time() # Re-validate at the commit boundary of each step, never cache admission. assert_commit_within_authority(att, step_duration, now) _commit(step_duration) def _commit(step_duration: float) -> None: time.sleep(step_duration) # stand-in for the durable side effect if __name__ == "__main__": # Attestation issued 240s ago, 300s TTL, 60s revocation SLA. # Residual = 60s; sound window is negative -> must not admit. stale = Attestation( subject="agent://orgA/worker-7", scope="ledger:write", issued_at=time.time() - 240, ttl=300, revocation_sla=60, ) try: run_delegated_step(stale, step_duration=5.0) except DelegationWindowViolated as exc: print(f"denied: {exc}") ```