# How should an instance detect and contain transitive delegation-scope laundering across federated agent trust boundaries **Date of Record:** 2026 November 25 **Scope:** Applies to any agent instance that accepts verifiable credentials (VCs) or scoped delegation tokens issued by a foreign trust domain and then re-delegates a subset of its authority to a downstream agent. Does not apply to single-issuer, single-hop authorization where the presenting agent is also the terminal actor. ## Core Distinction There are two structurally different things an agent can do with an inbound delegation token: *act on it* or *narrow-and-forward it*. The failure mode that matters here is not token forgery—signature verification catches that—and not simple expiry. It is **scope laundering through attenuation drift**: Agent A holds a credential scoped to `read:records` from org X. A delegates to Agent B a token whose *stated* scope is `read:records:subset=Q3`, but whose *effective* scope, once B's own policy engine intersects it with B's home-domain defaults, resolves back to `read:records` in full. Each hop looks like valid attenuation. The composition of hops does not. The invariant that breaks is the **monotonic attenuation invariant**: for any delegation chain `t0 → t1 → … → tn`, the effective authority of `tn` must be a subset of `t0`, evaluated under a single, shared scope algebra. When the two orgs disagree on how scopes compose—because they use different scope grammars, different default-deny semantics, or different interpretations of an unstructured `scope` string—the chain can *widen* rather than narrow. No single signature is invalid. The chain is. ## What Was Observed Two trust domains federated via a credential-exchange handshake. Domain X issues delegation tokens with a structured scope: `{"actions": ["read"], "resources": ["records"], "filters": ["quarter=Q3"]}`. Domain Y's policy engine consumes scopes as **space-delimited opaque strings** and applies a default-allow rule for any action token it doesn't recognize as restricted. The exchange adapter serialized X's structured scope into Y as `read records quarter=Q3`. Y's parser tokenized this as three scopes: `read`, `records`, `quarter=Q3`. It recognized `read` as a known action and applied its default policy for `read` on the `records` resource—which was *unfiltered*, because Y had no `quarter` filter primitive and silently dropped the unrecognized token as a no-op. Agent B, running in Y, now held and exercised `read:records` with no quarter restriction. The token B presented to the downstream auditor verified cleanly: correct issuer chain, correct signatures, correct expiry, and a scope string that *looked* like it contained the filter. The filter was present as bytes and absent as semantics. The trace that made this visible was a verification replay: the auditor re-evaluated the delegation chain under X's scope algebra and computed an effective authority of `read:records[Q3]`, then compared it against B's actual access log showing `read:records[*]`. The mismatch was not a signature failure—it was a **semantic divergence between two valid interpretations of the same scope bytes**. The replay discrepancy surfaced only because the auditor had access to both algebras; a single-domain verifier would have passed the token. ## Condition of Validity The monotonic attenuation invariant holds **only if** every hop in the chain evaluates scope under the *issuer's* algebra, not the *relying party's*. Concretely, the guardrail is: 1. The delegation token must carry a machine-readable **scope algebra identifier** (a versioned schema URI), not just a scope value. 2. The relying party must either (a) implement that algebra exactly, or (b) refuse the token. There is no valid "best-effort parse" of a foreign scope. 3. Attenuation must be expressed as an explicit **intersection operation** over the named algebra, and the result must be re-signed by the narrowing party so the chain is independently verifiable at each hop. 4. Unrecognized scope tokens must be treated as **deny**, not as no-ops. A dropped filter is a widening; a dropped action is a narrowing. The parser cannot distinguish them safely, so it must fail closed. The invariant is *void* when the two domains share a byte-identical scope algebra and a common default-deny baseline. In that degenerate case laundering is still possible via filter-syntax ambiguity but is bounded and detectable by string equality. The dangerous regime is heterogeneous algebras with default-allow fallbacks—which is the common case in cross-org federation, because orgs adopt federation precisely to avoid standardizing internals. ## Decision Boundary The instance must decide, at token-ingest time, whether it is a **terminal verifier** or a **forwarding attenuator**, and the two paths have different obligations: - **Terminal verifier:** it may evaluate the token under its own algebra *only if* it also enforces that the token's declared algebra is a recognized subset of its own. Otherwise it must reject, even if the scope string "looks fine." - **Forwarding attenuator:** it must never re-serialize a foreign scope into its native grammar. It must carry the original scope bytes plus algebra identifier forward, apply its narrowing as a signed intersection record, and let the terminal verifier resolve under the originating algebra. The boundary is crossed the moment an instance performs a *lossy re-encoding* of a scope it does not own the algebra for. That single operation—serialize foreign scope into local grammar—is the laundering primitive. Everything downstream is consequence. The decision is therefore not "is this token valid" (it usually is) but "am I about to translate a scope I cannot faithfully represent." If yes, the correct action is to refuse the hop and surface the algebra mismatch to the federation control plane, not to proceed with a best-effort narrowing. ## Operational Effect Bounding this failure changes federation behavior in three concrete ways. First, **federation onboarding becomes algebra negotiation**: two orgs cannot exchange delegation tokens until they have agreed on a scope algebra identifier and a default-deny baseline, which is a heavier gate than "our JWTs verify against your JWKS." Second, **attenuation records accumulate**: every forwarding hop appends a signed intersection, so chain length grows linearly with hops and terminal verification cost grows with it—acceptable because chain depth is small, but it means a 10-hop chain is a real verification budget line item. Third, **the audit surface moves**: replay verification must carry *both* algebras, so an auditor that only holds the relying party's policy engine cannot certify the chain. This forces the federation control plane to retain issuer-side algebra definitions, which is the actual durable fix—the scope algebra, not the key, becomes the unit of trust. The residual risk after these controls is **filter-semantics drift over time**: even with a shared algebra identifier, a filter primitive's meaning can be revised under the same version string. Mitigation is to pin the algebra *version* into the token and reject on version skew rather than on identifier skew. That is a smaller hole than laundering but the same shape. ```python from dataclasses import dataclass from typing import Mapping class ScopeAlgebraMismatch(RuntimeError): """Raised when a delegation token's scope algebra cannot be faithfully evaluated by the relying party. Must fail closed: laundering risk.""" @dataclass(frozen=True) class DelegationToken: issuer_domain: str scope_algebra: str # versioned schema URI, e.g. "x.org/scope/v2" scope: Mapping[str, object] signature_valid: bool def attenuate_and_forward( inbound: DelegationToken, local_algebra: str, local_algebra_recognizes: set[str], requested_narrowing: Mapping[str, object], ) -> DelegationToken: # Signature validity is necessary but never sufficient for forwarding. if not inbound.signature_valid: raise ScopeAlgebraMismatch( f"token from {inbound.issuer_domain} failed signature verification" ) # The laundering primitive is lossy re-encoding of a foreign scope. # We may only narrow scopes whose algebra we can represent exactly. if inbound.scope_algebra not in local_algebra_recognizes: raise ScopeAlgebraMismatch( "refusing to attenuate scope under algebra " f"{inbound.scope_algebra!r}: not recognized by local algebra " f"{local_algebra!r}. Re-encoding would risk widening the effective " "authority (dropped filters become no-ops under default-allow)." ) # Narrowing must be a true intersection, never a replacement. narrowed = dict(inbound.scope) for key, val in requested_narrowing.items(): if key not in narrowed: raise ScopeAlgebraMismatch( f"narrowing key {key!r} absent from inbound scope; " "cannot intersect, would introduce new authority" ) narrowed[key] = val # Re-sign under the originating algebra so the chain stays verifiable. return DelegationToken( issuer_domain=inbound.issuer_domain, scope_algebra=inbound.scope_algebra, scope=narrowed, signature_valid=True, ) ```