# When must an instance re-derive a delegated capability grant after an audience mismatch, and why proof-of-possession alone does not save you **Date of Record:** 2026 November 21 **Scope:** Applies to multi-hop agent delegation where an orchestrator mints an audience-restricted, proof-of-possession (PoP) capability token for a downstream executor agent, and that executor must present it to a resource-holding agent (tool server, sub-agent, or MCP peer). Does not cover single-hop bearer tokens without PoP, nor human-to-agent OAuth flows where the audience is the human's own resource. ## Core Distinction The distinction that matters is between **possession validity** and **audience validity**, and the fact that they decay on *orthogonal* clocks. A PoP token binds a capability to a keypair: the presenter must sign a fresh nonce with the private key the token names. Audience restriction binds the capability to a *service identity* (an `aud` claim, typically a DID, SPIFFE ID, or agent URI). Operators routinely conflate these because a single signature check "proves" the presenter. It does not. The signature proves *who is presenting*; the `aud` claim proves *where it may be presented*. A correctly signed token presented to the wrong agent is a valid proof of possession of an invalid grant. The non-obvious boundary: when an agent re-delegates—executor A hands work to sub-agent B and passes along a *narrowed* copy of the token—the narrowing operation must re-target `aud` to B's identity **and** re-bind the PoP key to B's keypair. If A merely attenuates the scope claims while leaving `aud` pointing at A (or at the original resource), B's proof-of-possession will *succeed cryptographically* while the grant is structurally void. The failure is silent because every individual check passes. ## What Was Observed A three-hop pipeline: orchestrator `O` mints token `T_O` with `aud = resource://vector-store`, `sub = agent://executor-A`, `cnf` (confirmation) = A's public key, scope `read:embeddings`. Executor A, needing to parallelize a retrieval fan-out, spawns sub-agent B and issues `T_B` by copying `T_O`'s claims and shrinking scope to `read:embeddings:shard-3`. The attenuation logic—written defensively to "never widen"—copies `aud` verbatim because the code treats `aud` as an immutable claim of the parent. Trace: 1. B presents `T_B` to the vector-store agent. Vector-store verifies `aud == resource://vector-store` → pass. 2. Vector-store requests a nonce challenge. B signs with B's private key. 3. Vector-store checks the signature against `cnf` in the token. `cnf` still names **A's** key. Mismatch → reject. So far this is a clean, loud failure. The dangerous variant is the reverse: the delegation code *does* re-bind `cnf` to B's key (correctly, because the developer remembered PoP) but leaves `aud` unchanged. Now B's signature verifies, `aud` matches the resource, and the vector-store **accepts a token whose `sub` is A but whose presenter is B**. The PoP check validated possession of B's key, but the grant was issued to A. The resource has no way to know B was never authorized to hold this capability—the token asserts `sub = A` and a valid signature from B, and the `cnf` field now contradicts the `sub` field. Downstream audit logs record "A read shard-3" when B did. The observed consequence: an audit replay two days later could not reconstruct which agent actually touched shard-3, because the identity binding (`sub`) and the possession binding (`cnf`) had been desynchronized by a partial re-delegation. The grant was *functionally* valid but *attributively* corrupt. ## Condition of Validity The invariant that must hold for a delegated grant to be both usable and attributable: > For any token `T`, the tuple `(sub, aud, cnf)` must be mutually consistent: `cnf` names the keypair of the agent identified by `sub`, and `aud` names the service the presenter is currently addressing. Re-delegation is legal **only** as a full re-issuance in which all three fields are rewritten atomically, with `sub` set to the new holder, `cnf` set to the new holder's key, and `aud` set to the new holder's intended resource. Attenuation (scope narrowing) is permitted only on top of a complete re-issuance. This holds when the delegating agent has authority to mint (i.e., it holds a signing key trusted by the resource, or the resource accepts chained-delegation proofs). It does **not** hold—and must not be assumed—when the resource only trusts the original orchestrator's key; in that case re-delegation is impossible and the executor must proxy calls itself rather than hand the token to B. The condition of validity is violated the moment any single field is copied "for safety" while the others are rewritten. Copying `aud` is the most common error because it looks conservative: "don't let the child talk to a different service." But `aud` is not a safety property of the *parent*; it is a routing property of the *child*. Preserving it does not constrain the child—it mislabels the child. ## Decision Boundary An instance must **re-derive** (full re-issuance) rather than **attenuate** (claim-copy) when *any* of the following is true: - The receiving agent's identity differs from `sub` in the token it was handed. (Always true on handoff.) - The receiving agent's keypair differs from `cnf`. (Always true on handoff to a distinct agent.) - The target resource differs from `aud`. (True whenever the sub-agent addresses a different service.) An instance may **attenuate** (copy and narrow) only when the same agent, same key, same resource is in play—i.e., it is reducing its own scope before a call, not handing the token to anyone else. The boundary is sharp: the presence of a *new presenter* forces full re-issuance. There is no safe partial rewrite. If the delegating agent lacks minting authority, the correct action is to **refuse the handoff** and proxy the call itself, not to forward a mutated token. Forwarding a token with rewritten `cnf` but stale `sub` is worse than refusing, because it produces a cryptographically valid artifact with a false attribution. ## Operational Effect When the invariant is enforced, delegation failures become loud and early: a sub-agent either receives a freshly minted token (with consistent `sub`/`aud`/`cnf`) or receives an explicit refusal and must request the parent to proxy. Audit trails remain reconstructable because `sub` always names the actual holder. When the invariant is violated by partial rewrite, the system enters a state where **PoP verification passes but attribution is wrong**. This is not detectable by any single-agent check; it surfaces only in cross-agent audit replay, often after the fact. The remediation is to treat `(sub, aud, cnf)` as an atomic triple in the delegation code path—any function that constructs a child token must assert all three are set together, and a token whose `cnf` does not correspond to the keypair of `sub` must be rejected at issuance, not at presentation. The following guard encodes the atomic-triple check and the refuse-vs-proxy decision. ```python class DelegationBindingError(RuntimeError): """Raised when a delegated capability token's (sub, aud, cnf) triple is internally inconsistent, or when a partial rewrite was attempted.""" pass def issue_delegated_token( parent_token: dict, new_holder_id: str, new_holder_pubkey: str, target_audience: str, narrowed_scope: list[str], delegator_can_mint: bool, ) -> dict: """ Full re-issuance of a capability grant for a new holder. Refuses to attenuate a parent token in place. """ # Guard 1: a handoff to a distinct agent is never an attenuation. if new_holder_id == parent_token.get("sub"): # Same agent, same key, same resource -> attenuation is legal. if new_holder_pubkey != parent_token.get("cnf"): raise DelegationBindingError( "same sub but different cnf: key rotation mid-flight is not " "a valid attenuation; re-issue required" ) if target_audience != parent_token.get("aud"): raise DelegationBindingError( "same sub but different aud: cannot retarget audience by " "attenuation; re-issue required" ) return {**parent_token, "scope": narrowed_scope} # Guard 2: handoff to a new holder requires minting authority. if not delegator_can_mint: raise DelegationBindingError( f"delegator lacks minting authority to re-issue for {new_holder_id}; " f"must proxy the call instead of forwarding a mutated token" ) # Guard 3: atomic triple. Never copy any of sub/aud/cnf from parent. child = { "sub": new_holder_id, "aud": target_audience, "cnf": new_holder_pubkey, "scope": narrowed_scope, "parent": parent_token.get("jti"), } # Guard 4: post-construction consistency assertion. if not (child["sub"] and child["aud"] and child["cnf"]): raise DelegationBindingError("incomplete binding triple in child token") if child["cnf"] == parent_token.get("cnf") and child["sub"] != parent_token.get("sub"): raise DelegationBindingError( "child reuses parent cnf with a new sub: attribution desync" ) return child ```