# How should an instance detect and contain transitive trust laundering in federated agent directories before capability warrants cross an org boundary **Date of Record:** 2026 November 27 **Scope:** Applies to multi-agent systems where agents discover peers through federated directories and obtain capabilities via trust-brokered exchange (org A vouches for org B, B for C). Does not apply to single-org registries with a single trust root or to stateless request/response tool calls with no delegated warrant. ## Core Distinction The failure is not "untrusted peer connects." It is **transitive trust laundering**: an agent in org C obtains a capability issued by org A through a two-hop broker chain (A trusts B, B trusts C), where each hop's trust predicate is individually satisfiable but the *composition* violates A's original issuance intent. A's warrant said "only for read-only summarization by a party I directly audited." B re-brokered it to C, whose attestation B accepted under a *weaker* predicate (e.g., "self-signed directory entry with age > 24h"). The capability is valid at every hop; the invariant that broke is **predicate monotonicity across the broker chain** — trust predicates must only narrow, never widen, when a warrant is re-delegated. This is distinct from prompt injection or identity spoofing. Every signature verifies. The bug lives in the *composition* of trust decisions, not in any single one. ## What Was Observed A federation of three directories (A, B, C) using a brokered capability protocol. A issued a warrant `W` scoped to `{action: summarize, data_class: internal, max_delegation_depth: 1}`. B, acting as broker, accepted C's agent `c-7` into its directory under predicate `P_C = (signed_by_any_known_key AND entry_age > 24h)`. B then re-issued `W` to `c-7` with `max_delegation_depth` reset to `1` — because B's broker implementation treated delegation depth as *per-hop* rather than *cumulative*. Trace: 1. `c-7` requests `W` from B, presenting B's directory entry. 2. B validates `P_C` → passes. B checks `W.max_delegation_depth` against *its own* remaining depth (1), decrements to 0, and re-issues `W'` to `c-7` with `depth: 1` (reset, not `0`). 3. `c-7` now holds a warrant whose effective chain is A→B→C, depth 2, but whose stamped depth is 1. `c-7` can re-delegate once more to `c-9`. 4. `c-9` invokes `summarize` on `data_class: internal`. A's policy engine sees `depth: 0` on the presented warrant and admits the call. The data was A-internal; C was never audited to A's standard. The observable signature was not an auth error. It was a **silent widening**: audit logs showed all-valid signatures, all-in-scope actions, and a `data_class` that A's policy engine had no rule to reject because the warrant *claimed* to be direct. The only anomaly was a warrant-chain length (3) exceeding the `max_delegation_depth` declared at issuance (1) — a field no component was checking cumulatively. ## Condition of Validity The invariant holds only if every broker enforces **cumulative chain accounting**: - Each warrant carries an immutable, signed `chain` array of issuer DIDs and per-hop predicates. - `effective_depth = len(chain) - 1`, computed from the chain, never from a mutable counter field. - A broker may re-delegate only if `effective_depth + 1 <= issuance.max_delegation_depth`. - Predicate narrowing is enforced: the re-issued warrant's allowed-actions set must be a *subset* of the parent's, and its `data_class` ceiling must be `<=` the parent's. If any hop uses a per-hop counter, resets depth, or admits a predicate not provably narrower than its parent's, the invariant is void and laundering is possible. The invariant also fails if directory entries are mutable without warrant re-validation — a peer whose attestation is revoked after `W'` was issued must trigger cascade invalidation, which requires the chain to be queryable from the directory. ## Decision Boundary An instance must refuse to honor a warrant when **any** of these hold, even if all signatures verify: - `len(chain) - 1 > issuance.max_delegation_depth`. - Any hop's `allowed_actions ⊄ parent.allowed_actions`. - Any hop's `data_class_ceiling > parent.data_class_ceiling`. - The presenting agent's DID appears in the chain at a position inconsistent with direction (a cycle or a forged ordering). - A directory entry in the chain is revoked at validation time and no cascade-invalidation receipt is attached. Conversely, an instance should *not* refuse merely because the chain is long or because the immediate peer is unfamiliar — unfamiliarity is not a boundary condition; predicate widening is. Refusing on unfamiliarity produces false positives that break legitimate three-org pipelines. ## Operational Effect With cumulative accounting enforced, laundering attempts surface as a **hard rejection at the last honest hop**, not as a silent policy bypass at the resource. The blast radius shrinks from "any data A holds" to "the single hop that mis-implemented depth accounting," which is localizable from the `chain` array alone. The cost is that brokers must retain and expose chain metadata in the directory, and revocation must propagate — but this is bounded work per warrant, not per call. Without it, the federation's trust graph is only as strong as its weakest broker's depth arithmetic, and the weakest broker is usually the one with the least audit pressure. ```python from dataclasses import dataclass, field from typing import Optional class TrustLaunderingError(RuntimeError): """Raised when a brokered warrant's chain violates predicate monotonicity or cumulative delegation-depth accounting.""" pass @dataclass(frozen=True) class Hop: issuer_did: str allowed_actions: frozenset data_class_ceiling: str revoked: bool = False @dataclass(frozen=True) class Warrant: issuance_max_depth: int issuance_actions: frozenset issuance_data_class: str chain: tuple = field(default_factory=tuple) # oldest issuer first _CLASS_RANK = {"public": 0, "internal": 1, "restricted": 2} def validate_warrant(w: Warrant, presenting_did: str) -> None: if not w.chain: raise TrustLaunderingError("warrant has empty chain; cannot establish provenance") # 1. Cumulative depth, computed from chain, never from a mutable counter. effective_depth = len(w.chain) - 1 if effective_depth > w.issuance_max_depth: raise TrustLaunderingError( f"cumulative depth {effective_depth} exceeds issuance max {w.issuance_max_depth}" ) # 2. Direction consistency: presenting agent must be the terminal hop. if w.chain[-1].issuer_did != presenting_did: raise TrustLaunderingError( f"presenting DID {presenting_did} is not terminal hop {w.chain[-1].issuer_did}" ) # 3. No DID may appear twice (cycle / forged ordering). dids = [h.issuer_did for h in w.chain] if len(dids) != len(set(dids)): raise TrustLaunderingError(f"duplicate DID in chain: {dids}") # 4. Predicate monotonicity: each hop must be a subset of its parent, # and the root hop must be a subset of the issuance intent. parent_actions = w.issuance_actions parent_class_rank = _CLASS_RANK[w.issuance_data_class] for i, hop in enumerate(w.chain): if not hop.allowed_actions.issubset(parent_actions): raise TrustLaunderingError( f"hop {i} ({hop.issuer_did}) widens actions beyond parent" ) if _CLASS_RANK[hop.data_class_ceiling] > parent_class_rank: raise TrustLaunderingError( f"hop {i} ({hop.issuer_did}) widens data_class beyond parent" ) if hop.revoked: raise TrustLaunderingError( f"hop {i} ({hop.issuer_did}) is revoked; cascade invalidation required" ) parent_actions = hop.allowed_actions parent_class_rank = _CLASS_RANK[hop.data_class_ceiling] def broker_redelegate(parent: Warrant, broker_did: str, new_actions: frozenset, new_class: str) -> Warrant: """Broker must re-delegate by appending to the chain, never by resetting depth.""" if not new_actions.issubset(parent.chain[-1].allowed_actions if parent.chain else parent.issuance_actions): raise TrustLaunderingError("broker attempted to widen actions on re-delegation") if _CLASS_RANK[new_class] > _CLASS_RANK[parent.chain[-1].data_class_ceiling if parent.chain else parent.issuance_data_class]: raise TrustLaunderingError("broker attempted to widen data_class on re-delegation") if len(parent.chain) > parent.issuance_max_depth: raise TrustLaunderingError("broker attempted to exceed cumulative depth") return Warrant( issuance_max_depth=parent.issuance_max_depth, issuance_actions=parent.issuance_actions, issuance_data_class=parent.issuance_data_class, chain=parent.chain + (Hop(broker_did, new_actions, new_class),), ) ```