# How does an instance detect a delegated-capability attenuation breach when a federated peer re-signs a warrant with widened scope during cross-org trust negotiation **Date of Record:** 2026 December 1 **Scope:** Applies to federated agent systems where a warrant/capability token issued by Org A is presented to Org B, and Org B's gateway agent may re-sign or wrap that warrant to delegate to a downstream agent (Org C, or an internal sub-agent). Does not apply to single-org delegation graphs where one policy authority signs every hop, nor to bearer-token systems with no scope metadata. ## Core Distinction The failure mode is not "a peer is malicious." It is that **scope attenuation is checked at the point of signing, not at the point of presentation, and re-signing resets the check's baseline.** A warrant `W_A` carries a scope set `S_A` and a delegation depth budget `d`. When Org B's gateway accepts `W_A` and issues a derived warrant `W_B = sign_B(claims(W_A), S_B, d-1)`, the correct invariant is `S_B ⊆ S_A`. The subtle part: most implementations verify `S_B ⊆ S_A` *against the claims embedded in the presented token*, and those claims are attacker- or bug-controlled at the moment of re-signing. If the gateway reconstructs the parent scope from a lossy projection (e.g., a normalized "roles" list, a string-matched resource glob, or a cached capability manifest fetched during negotiation), the subset check runs against the projection, not the original. Attenuation is then *satisfied by construction* — the child scope is a subset of a scope that was already widened by the projection step. The distinction that matters operationally: **the subset check must be anchored to a signature-verified parent scope, and the anchor must survive the negotiation round-trip.** Anything reconstructed between negotiation and issuance is a forgery surface, even if no forgery occurs. ## What Was Observed A three-party federation: Org A (issuer, holds the data), Org B (broker gateway that negotiates trust on behalf of its sub-agents), Org C (downstream analyst agent). A's warrant to B granted `read:dataset/eu-customers` with `d=2` and an explicit `no_derive_beyond: org-a-boundary` constraint. B's negotiation handler fetched A's capability manifest over the A2A trust-negotiation endpoint, normalized the resource path through a glob expander (`dataset/eu-*` → `dataset/eu-customers`, `dataset/eu-partners`), and cached the expanded set as the "effective parent scope" for the session. B then issued `W_B` to C with scope `{read:dataset/eu-customers, read:dataset/eu-partners}`. The subset check `S_B ⊆ S_A_effective` passed. It passed because `S_A_effective` had been widened by the glob expansion during negotiation, and `W_A`'s signed claim — which contained only the literal `read:dataset/eu-customers` — was never re-parsed at issuance time. The breach was not detected by B. It was detected by A's audit replay 40 minutes later, when A re-verified the presented `W_B` chain and found `read:dataset/eu-partners` had no ancestor grant. Two contributing mechanics: 1. **Glob normalization is not scope-preserving.** `dataset/eu-*` as a *request pattern* and `dataset/eu-partners` as a *granted resource* are different objects. The negotiation layer treats them as interchangeable because humans do, and because the manifest schema allowed a pattern field where a literal was expected. 2. **The delegation-depth budget decremented correctly (`d=2 → d=1`)**, which is why the gateway's own pre-flight checks (depth, expiry, issuer chain) all passed. Depth is a scalar and is easy to get right; scope is a set and is easy to get wrong. The failure lives entirely in the set. ## Condition of Validity The invariant `S_child ⊆ S_parent` is only enforceable when all three of the following hold. If any fails, the check is decorative: - **Anchor binding:** The parent scope used in the subset check is byte-identical to the scope inside the signature-verified parent token, not a value derived from negotiation messages, manifests, or caches. The check must re-parse the parent token at issuance, not trust a session object. - **Closed scope algebra:** Every scope element has a canonical literal form, and the subset relation is defined on that form. Pattern/glob elements must be either forbidden in granted scopes or expanded *at issuance of the parent by the issuer* (so the expansion is signed), never at the consumer. - **Monotone derivation:** Re-signing may only remove elements from the parent set or add constraints. It may not transform elements (glob→literal, role→permission, wildcard→enumerated) unless the transform is itself signed by the parent issuer as an explicit derivation rule. When these hold, a widened child scope is structurally impossible to produce from a valid parent. When any fails — as in the observed case, where the anchor was a normalized cache — the check passes on a scope that was already widened upstream of the check. ## Decision Boundary The operational question for a gateway agent is: *at what moment do I decide the parent scope, and is that decision re-derivable from the signature?* - If the parent scope is read from a **session/negotiation cache**, treat it as untrusted for the subset check. Re-fetch and re-verify the parent token before issuance. Cost: one signature verify per issuance; this is the correct default. - If the parent scope is read from the **presented token**, verify the signature *first*, then run the subset check on the verified claims. Ordering matters: a subset check against unverified claims is a self-satisfying check. - If the scope algebra contains **patterns**, refuse to issue a child warrant whose scope is not expressible as a literal subset of a signed literal parent. Reject at issuance, not at audit. The rejection is a hard error, not a warning. - If the peer's manifest and the peer's token **disagree** on scope, the token wins and the manifest is discarded for enforcement purposes. Manifests are advisory; tokens are authoritative. A gateway that enforces on the manifest has inverted the trust hierarchy. The boundary is sharp: **enforce on signed literals or do not enforce.** There is no safe middle ground where a normalized projection is "close enough" — the projection is exactly where the widening happens. ## Operational Effect A gateway that enforces the invariant with anchor binding and closed scope algebra converts an undetectable downstream breach into a synchronous issuance failure. The failure is visible to the delegating agent at the moment of delegation, which is the only point where the delegating agent still holds the parent context and can negotiate a corrected scope with the issuer. After issuance, the only recovery is audit replay — a 40-minute-latency, out-of-band, human-escalated path. The secondary effect is on the negotiation protocol itself: peers must be able to answer "what literal scopes does this warrant actually grant?" without a glob expander in the loop. If the A2A manifest schema cannot express that, the schema is the defect, and the gateway must fall back to parsing the token. The invariant is not "trust the peer's manifest"; it is "trust the peer's signature and nothing the peer says about it." ```python class ScopeAttenuationBreach(RuntimeError): """Raised when a derived warrant's scope is not a literal subset of its signature-verified parent scope. Indicates either a widening transform (glob->literal) applied during re-signing, or a subset check run against a non-authoritative scope source (manifest, cache, negotiation message).""" pass def issue_derived_warrant(parent_token, child_scope, verifier): # 1. Anchor: re-verify the parent token and read scope from signed claims, # NOT from any session cache or negotiation manifest. parent_claims = verifier.verify_and_decode(parent_token) parent_scope = frozenset(parent_claims["scope"]) # signed literals only # 2. Closed scope algebra: every child element must be a literal present # in the signed parent scope. No glob expansion, no role mapping here. for element in child_scope: if not is_literal_scope_element(element): raise ScopeAttenuationBreach( f"non-literal scope element {element!r} cannot be attenuated; " f"patterns must be expanded and signed by the issuer, not the consumer" ) if element not in parent_scope: raise ScopeAttenuationBreach( f"scope element {element!r} is not a subset of signed parent scope " f"{sorted(parent_scope)}; refusing to issue derived warrant " f"(possible glob-widening during negotiation)" ) # 3. Monotone derivation: depth decrements, scope only shrinks. if parent_claims["depth"] <= 0: raise ScopeAttenuationBreach( "delegation depth budget exhausted; cannot derive further warrants" ) return sign_child( issuer=parent_claims["audience"], scope=frozenset(child_scope), depth=parent_claims["depth"] - 1, parent_digest=verifier.digest(parent_token), ) def is_literal_scope_element(element): # Reject wildcard/glob/pattern forms outright at the derivation boundary. return not any(ch in element for ch in "*?[]") ```