# Which invariants prevent cross-issuer delegated scope escalation when a DPoP-bound agent credential is re-minted mid-handoff **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF deployments where an agent's DPoP-bound access token is exchanged (RFC 8693 token exchange) or re-minted at a downstream issuer during a multi-hop handoff, and where scope authority is delegated from a human principal through one or more trust anchors. Does not apply to single-issuer, single-hop flows where the agent presents the original token directly to the resource server without re-delegation. ## Core Distinction The failure is not "scope confusion" in the generic sense. It is the specific divergence between two things that AAIF treats as if they were the same: the **scope set asserted in the token** and the **scope set the delegation chain actually authorizes**. A DPoP-bound credential proves *who* the agent is at the moment of presentation (the `cnf`/`jkt` thumbprint binding). It does not, by itself, prove *what the presenting agent was ever allowed to do*. When an agent re-mints its token at a second issuer to continue a task, the second issuer validates the DPoP binding and the incoming token's signature — both of which are intact — but the *scope delegation edge* from the original human principal is not carried in a form the second issuer is required to verify against. The result is a token that is cryptographically sound, correctly bound to the agent's key, and authorized to a superset of what the human ever granted. The invariant that must hold — and that AAIF's default token-exchange profile does not enforce — is: **the effective scope of any re-minted token must be the intersection of (a) the scopes the receiving issuer is willing to grant and (b) the transitive closure of delegation edges from the original principal, where every edge is independently signed and every hop's scope set is monotonically non-increasing.** DPoP binding is orthogonal to this invariant. It constrains key possession, not authority. ## What Was Observed A three-hop agent pipeline: a user principal (Issuer A, the human's IdP) delegates `read:calendar write:calendar` to Agent-1 via an authorization-code flow with DPoP. Agent-1, mid-task, needs Agent-2 (a scheduling sub-agent registered at Issuer B) to write an event. Agent-1 performs RFC 8693 token exchange at Issuer B, presenting its A-issued token as `subject_token` and requesting `scope="write:calendar"`. Issuer B's exchange endpoint validated: (1) the `subject_token` signature against A's JWKS, (2) the DPoP proof `jkt` against the token's `cnf.jkt`, (3) that Issuer B trusts Issuer A (a `trust_chain` entry existed). It then issued a B-signed token with `scope="write:calendar"` and `cnf.jkt` re-bound to Agent-2's key. The exchange succeeded. The defect surfaced two hops later. Agent-2 exchanged again at Issuer C, this time requesting `scope="write:calendar admin:calendar"`. Issuer C's exchange policy trusted Issuer B and validated the DPoP chain, but its scope-mapping table mapped B's `write:calendar` to C's `admin:calendar` (a coarse-grained mapping in C's registry). C issued a token with `admin:calendar`. The original human grant at Issuer A contained no `admin` scope at any granularity. The trace shows the escalation is *not* a signature forgery and *not* a DPoP replay. Every token in the chain is valid and correctly key-bound. The escalation is a **scope-mapping transitivity failure**: each exchange is locally correct against its immediate predecessor, but the composition of scope-mapping functions across issuers is not bounded by the origin principal's grant. Issuer C never saw Issuer A's grant; it only saw Issuer B's assertion, and B's assertion had already discarded the provenance of the original `read:calendar write:calendar` constraint. A second, quieter observation: the `cnf.jkt` re-binding at each hop was treated by operators as evidence of "secure delegation," which masked the fact that key re-binding and authority delegation are independent axes. The audit log recorded three successful DPoP validations and zero scope-provenance checks. ## Condition of Validity The intersection invariant holds only when all of the following are true simultaneously: 1. **Delegation edges are signed by the delegating principal, not merely asserted by the delegating issuer.** The scope set at each hop must be carried in a structure the *next* issuer can verify against the *origin* principal's key, not just the immediate predecessor's. A bare `scope` claim in an exchanged token is an assertion by the exchanging issuer; it is not a delegation edge. 2. **Scope-mapping functions are non-expanding.** For any issuer pair (X, Y) with a mapping `m: scopes(X) → scopes(Y)`, the composed mapping from origin to hop *n* must satisfy `m_n ∘ ... ∘ m_1 (S_origin) ⊆ S_origin` under the origin's scope lattice. Coarse mappings like `write → admin` violate this and must be rejected at exchange time, not discovered at the resource server. 3. **The origin grant is carried as a verifiable constraint, not a hint.** A `delegation_chain` claim containing the origin token's hash and the origin issuer's signature over the granted scope set must travel with every hop. Issuers that cannot verify the chain to a trusted root must refuse the exchange, not fall back to "trust the immediate predecessor." 4. **DPoP `jkt` continuity is checked but not conflated with authority.** Re-binding to a new key is permitted (agents rotate keys across hops), but the re-binding must not be accepted as evidence that the scope set is unchanged. These are separate checks and must be logged separately. When any of these is absent — as in the observed deployment, where condition 2 and 3 both failed — the invariant does not hold and cross-issuer escalation is possible with fully valid cryptography. ## Decision Boundary The operational decision is where to place the enforcement point. Three options, with distinct failure profiles: - **Enforce at the origin issuer (A) only.** A signs the full delegation chain and downstream issuers are expected to verify it. Fails when a downstream issuer's trust policy does not require chain verification (the observed case). Not sufficient alone. - **Enforce at each exchange endpoint.** Every issuer validates the incoming chain against the origin principal's signature and applies a non-expanding mapping check before issuing. This is the correct boundary, but requires every issuer in the trust graph to implement the same chain-verification semantics. Heterogeneous trust graphs (the common case) will have at least one lax issuer. - **Enforce at the resource server (C's protected resource).** The resource server re-verifies the full chain to the origin principal before honoring any scope. This is the only boundary that does not depend on every intermediate issuer being correct, but it requires the resource server to have the origin issuer's public key and the chain format — a heavier dependency. The invariant is *bounded* (not guaranteed) only when at least the resource-server check is in place, because it is the last point where the origin grant can be consulted. Exchange-endpoint enforcement reduces blast radius but cannot close the gap in a heterogeneous graph. The decision boundary is therefore: **if the trust graph contains any issuer whose exchange policy you do not control, resource-server chain verification is mandatory; exchange-endpoint checks are defense in depth, not the primary control.** ## Operational Effect The practical consequence is a reclassification of what "DPoP-bound" means in an audit. A DPoP validation log entry is evidence of key possession at presentation time. It is *not* evidence of authorized scope, and treating it as such produces false confidence in exactly the multi-hop scenarios where escalation is most likely. Operators must instrument two separate signals: `dpop_jkt_validated` (per hop) and `delegation_chain_verified_to_origin` (per hop, with the origin scope set recorded). An alert on any hop where the first is true and the second is false — or where the second is true but the effective scope set is not a subset of the origin set — is the detection primitive. The escalation in the observed case would have fired on the second condition at Issuer C. The deeper effect: agent identity frameworks that treat key-binding and authority-delegation as a single "trust" primitive will systematically under-verify authority in proportion to how many hops a task traverses. The longer the pipeline, the more opportunities for a non-expanding-mapping violation to compose into an expanding one. Scope provenance must be a first-class, separately-verified claim, or the invariant is unenforceable. ```python class ScopeEscalationError(RuntimeError): """Raised when a re-minted agent token's effective scope is not a subset of the origin principal's granted scope set.""" pass def verify_delegation_chain( hop_tokens: list[dict], origin_grant: dict, origin_public_key: str, ) -> set[str]: """ Verify that the composed scope set across a delegation chain is a subset of the origin principal's grant. Each hop token must carry a 'delegation_chain' claim whose root is signed by the origin principal. DPoP jkt binding is checked separately and is NOT accepted as evidence of scope authority. """ origin_scopes = set(origin_grant["scope"].split()) effective: set[str] = set() for i, token in enumerate(hop_tokens): chain = token.get("delegation_chain") if chain is None: raise ScopeEscalationError( f"hop {i}: token lacks delegation_chain claim; " f"immediate-predecessor trust is insufficient" ) # The chain root must be signed by the origin principal, not the # immediate predecessor issuer. if chain.get("root_signer") != origin_grant["issuer"]: raise ScopeEscalationError( f"hop {i}: delegation chain rooted at {chain.get('root_signer')!r}, " f"expected origin principal {origin_grant['issuer']!r}" ) if not _verify_signature(chain, origin_public_key): raise ScopeEscalationError( f"hop {i}: delegation chain signature does not verify " f"against origin public key" ) hop_scopes = set(token["scope"].split()) # Non-expanding mapping check: this hop's scopes must be a subset of # the scopes carried in the chain's previous edge, and ultimately of # the origin grant. if not hop_scopes <= origin_scopes: raise ScopeEscalationError( f"hop {i}: effective scope {sorted(hop_scopes)} is not a " f"subset of origin grant {sorted(origin_scopes)}; " f"cross-issuer scope mapping expanded authority" ) # DPoP binding is orthogonal: verify it, but never use it to justify # scope authority. if not _verify_dpop_binding(token): raise ScopeEscalationError( f"hop {i}: DPoP jkt binding invalid (key possession failure, " f"not a scope failure)" ) effective |= hop_scopes return effective def _verify_signature(chain: dict, public_key: str) -> bool: # Placeholder: real implementation verifies JWS over chain['edges']. return chain.get("sig") is not None def _verify_dpop_binding(token: dict) -> bool: # Placeholder: real implementation checks cnf.jkt against DPoP proof. return token.get("cnf", {}).get("jkt") is not None ```