# Where must an instance prove its own authority before acting on a delegated token **Date of Record:** 2026 November 16 **Scope:** Applies to agent-to-agent calls that carry a delegation chain (e.g., a signed JWT or macaroon chain) spanning two or more organizational trust domains, where the acting instance is *not* the subject that initiated the chain. Does not apply to single-domain service-to-service auth, nor to cases where the acting instance is the original principal. ## Core Distinction A delegation chain proves *that authority was granted*. It does not prove *that the presenter is the intended recipient of that grant*. These are separate invariants, and most implementations collapse them. When an agent in org A delegates to an agent in org B, the token typically encodes: issuer A, subject (the downstream agent's identity), scope, and a signature chain. The receiving instance in org B validates the chain, checks scope, and acts. The failure mode is that the *instance* presenting the token may not be the *subject* named in the token. A compromised or misconfigured instance inside org B can replay a token minted for a sibling instance, because the chain is valid and the scope matches — but the presenter is not the subject. The non-obvious boundary: **attestation of the delegation chain is not attestation of the presenter.** The chain is a bearer artifact unless the presenter separately proves it holds the private key or workload identity that the subject claim refers to. In cross-org settings, the receiving org cannot assume the sending org's internal identity plane binds subject-claim to presenter-instance. That binding is a local invariant of the *issuing* domain, and it does not cross the trust boundary. ## What Was Observed In a two-org agent pipeline (A issues, B executes), tokens were minted with `sub=agent-b-worker-7` and a 15-minute TTL. B's gateway validated the signature chain and scope but did not verify that the TLS client certificate or workload attestation of the connecting instance matched `sub`. During a rolling deploy, a worker instance (`agent-b-worker-3`) picked up a queued job that carried worker-7's token from a shared retry buffer. The token was valid, the scope was correct, and the action succeeded — executed by the wrong instance. The action was idempotent and low-stakes, so no incident was filed. But the same path would have permitted a compromised worker to execute any queued job whose token it could read from the shared buffer. The chain-level audit log recorded `sub=worker-7` as the actor, so the forensic trail pointed at the wrong instance. ## Condition of Validity The chain-only check is valid **only if** one of the following holds: 1. The receiving domain independently binds `sub` to presenter via a mechanism it controls (mTLS with SPIFFE IDs, workload attestation, signed instance keys registered out-of-band). 2. The token is single-use and non-transferable by construction (sender-constrained, e.g., DPoP or proof-of-possession bound to the presenter's key). 3. The token's scope is so narrow that any instance in the receiving domain executing it is acceptable by policy — i.e., the delegation is explicitly to the *domain*, not the *instance*. If none hold, the chain is a bearer token and the "delegated authorization" is actually "delegated capability to anyone who can read the buffer." ## Decision Boundary Before acting on an inbound delegated token, an instance must answer: *does my local trust domain bind the subject claim to me specifically?* If yes, proceed. If no, the instance must either (a) reject and escalate for presenter attestation, or (b) confirm via policy that domain-level delegation was intended. The trap is that (b) is often silently true in dev and silently false in prod, because dev uses a single instance and prod uses a pool. The boundary is not about token validity — it is about whether the *presenter* is within the set the issuer intended. That set is defined by the issuer's identity plane, which the receiver cannot inspect. Therefore the receiver must enforce presenter binding locally or treat the token as domain-scoped. ## Operational Effect Implementations that skip presenter binding exhibit a characteristic failure signature: audit logs attribute actions to subjects that were never on the executing host, and retry/queue buffers become authority-laundering surfaces. The fix is not to lengthen the chain or add scopes; it is to require proof-of-possession at the receiving edge and to make the `sub`-to-presenter check a hard gate rather than a logging field. When the gate cannot be satisfied, the correct behavior is to fail closed and surface the mismatch, not to fall back to chain-only validation. ```python class PresenterBindingError(RuntimeError): """Raised when a delegated token's subject is not bound to the presenting instance.""" pass def authorize_delegated_action(token_sub: str, presenter_identity: str, presenter_attested: bool, domain_scoped: bool) -> None: # Chain signature and scope are assumed already validated upstream. if not presenter_attested: # No local binding between subject claim and presenter. if not domain_scoped: raise PresenterBindingError( f"token subject {token_sub!r} is not bound to presenter " f"{presenter_identity!r}; refusing to act on a bearer delegation" ) return # explicit domain-level delegation, policy permits if token_sub != presenter_identity: raise PresenterBindingError( f"presenter {presenter_identity!r} does not match token subject " f"{token_sub!r}; possible replay from shared buffer" ) ```