# How does an instance detect a delegated-capability attenuation breach across a cross-org federation trust boundary? **Date of Record:** 2026 November 27 **Scope:** Applies to federated agent systems where an agent in org A (the *delegator*) mints a signed capability token granting a subset of its own authority to an agent in org B (the *delegatee*), and org B's policy engine independently validates that token before the delegatee invokes a tool or spawns a sub-agent. Does not cover single-org role delegation, API-key scopes, or OAuth flows where a single authorization server is the sole policy authority. ## Core Distinction The failure is not "an unauthorized action was taken." The failure is that the delegatee performed an action that is *individually authorized* under the token but *jointly forbidden* by the composition of (a) the delegator's residual authority after attenuation, and (b) the delegatee's own local policy. This is a **compositional attenuation breach**: each side's policy check passes in isolation, and the breach exists only in the intersection that neither party is positioned to evaluate alone. Concretely: delegator A holds capability `write:records` with a constraint `data_class <= internal`. A attenuates to B by minting a token for `write:records` scoped to `data_class <= internal` and `region = eu`. B's local policy permits `write:records` only when `data_class <= public` OR when the caller presents a token whose `region` matches B's own region. B is in `eu`. Both checks pass. The write proceeds on an `internal`-class record. But A's residual authority after issuing the token was supposed to exclude `internal`-class delegation to any external org — a constraint encoded in A's *delegation policy*, not in the token's payload. A's policy engine checked the token at mint time and allowed it because it validated only the token's explicit constraints, not the delegation-policy invariant. B's policy engine checked the token at invocation time and allowed it because it validated only its own local rules. The invariant "A never delegates `internal`-class write authority to org B" was never evaluated by either party at the moment of effect. The core distinction is between **token-level attenuation** (what the token says) and **policy-level attenuation** (what the delegator's delegation policy permits the token to say). Cross-org federation requires both, and the second is the one that silently drops. ## What Was Observed In a federation of three orgs (A, B, C) running a shared procurement workflow, the following trace was captured over a 72-hour window. The delegator in A (`agent:procurement-lead`) issued 1,847 capability tokens to delegates in B (`agent:vendor-eval`) and C (`agent:contract-draft`). Of these, 41 tokens were minted with a `region` constraint that did not match the delegator's *own* region constraint at the time of minting, because the delegator's context window had been refreshed from a stale episodic memory snapshot that predated a policy update pushed at 02:14 UTC on day 2. The specific mechanism: 1. **Policy update propagation lag.** A's delegation policy was updated to add the invariant `delegate.data_class <= public when delegatee.org != A.org`. The update was applied to A's policy engine at 02:14 UTC. 2. **Stale context refresh.** The delegator instance `agent:procurement-lead` was checkpointed at 01:50 UTC and resumed at 02:31 UTC from a context snapshot that included the pre-update policy summary. The resume path did not re-fetch the delegation policy; it restored the cached summary from the checkpoint. 3. **Mint-time validation against stale policy.** At 02:33 UTC, the delegator minted a token granting `write:records` with `data_class = internal` to `agent:vendor-eval` in org B. The mint-time validator checked the token against the *cached* policy summary (which lacked the new invariant) and passed it. 4. **Invocation-time validation against local policy only.** At 02:34 UTC, `agent:vendor-eval` presented the token to B's policy engine. B's engine validated the token's signature, expiry, and explicit constraints — all of which were internally consistent — and checked its own local rule (`region = eu`), which passed. The token was accepted. 5. **Effect.** An `internal`-class record was written by an external-org agent. Neither A's mint-time check nor B's invocation-time check evaluated the cross-org invariant. The 41 tokens were not detected by either org's policy engine. They were detected by a **post-hoc replay auditor** in org A that re-evaluated every issued token against the *current* delegation policy and flagged 41 mismatches. The auditor ran 14 hours after the first breach token was used. The detection latency was 14h 02m; the breach window was 13h 51m. The non-obvious part: the delegatee in B had *no way to know* the token was over-broad. The token was cryptographically valid, its constraints were internally consistent, and B's local policy was satisfied. The breach was invisible from B's vantage point. Detection required a party (A's auditor) that held both the token log and the current delegation policy — a vantage point neither the delegator instance nor the delegatee held at invocation time. ## Condition of Validity The compositional attenuation breach is possible only when all of the following hold: - **Asymmetric policy vantage.** The delegator holds the delegation policy; the delegatee holds only the token and its own local policy. Neither holds both. This is the structural condition — it is the *point* of cross-org federation, and it is also the vulnerability. - **Mint-time validation is not re-entrant.** The delegator validates the token at mint time against a policy snapshot that can go stale between mint and invocation. If the delegator re-validates at invocation time (or the delegatee can query the delegator's current policy), the breach window collapses. - **Token payload does not encode the invariant.** The cross-org invariant (`data_class <= public when delegatee.org != A.org`) is a *policy* rule, not a *token* constraint. It is not in the token's signed payload, so the delegatee cannot evaluate it even if it wanted to. - **No shared revocation or introspection endpoint.** If B could call A's token introspection endpoint at invocation time and receive the current attenuation verdict, the breach would be caught. In the observed system, introspection was available but B's policy engine was configured to use it only for signature validation, not for policy re-evaluation — an optimization that traded correctness for latency. The breach is *not* possible when the token payload carries a signed, self-contained attenuation proof (e.g., a zk-SNARK or a signed policy hash that the delegatee can verify against a published policy root), or when the delegator re-validates at invocation time, or when a shared auditor runs synchronously before effect. ## Decision Boundary The operational decision is: **at what point in the token lifecycle does the delegator's delegation policy get evaluated against the token, and who is responsible for that evaluation?** Three boundaries are available: 1. **Mint-only (observed failure).** Policy evaluated once at mint. Cheapest, lowest latency, but breach window equals token lifetime minus auditor latency. Acceptable only when token lifetime is short (< 60s) and effect is reversible. 2. **Mint + synchronous introspection.** Delegatee calls delegator's introspection endpoint at invocation, which re-evaluates the token against current policy. Latency cost: one cross-org round-trip per invocation (~40–200ms observed). Closes the breach window to the introspection call duration. Requires the delegator to expose a policy-evaluation endpoint, which is a trust-boundary concession — the delegatee now learns something about the delegator's policy state via timing and error codes. 3. **Mint + signed policy-hash binding + delegatee-side verification.** The token carries a signed hash of the delegation policy under which it was minted. The delegatee fetches the published policy root (a Merkle root of current policy) and verifies the token's hash is a member of the current root. If the policy has changed since mint, the hash is not in the current root and the token is rejected. This is the boundary that preserves the asymmetric-vantage property while closing the breach window. Cost: policy root must be published on a low-latency channel; delegatee must implement Merkle membership verification. The decision boundary is crossed when the federation's trust model requires the delegatee to be *unable* to learn the delegator's policy internals (option 3) versus *willing* to query them (option 2). Option 1 is not a boundary; it is a known-unsafe default that is acceptable only for short-lived, reversible effects. ## Operational Effect The observed system ran on option 1 with a 14-hour asynchronous auditor. The operational effects were: - **Silent over-broad delegation for 13h 51m.** 41 tokens, 312 invocations, 1 confirmed `internal`-class write by an external agent. No policy engine raised an alert. - **Detection was retroactive and required a vantage point neither party held.** The auditor in A was the only component with both the token log and the current policy. This is a structural property: in a federated system, the *only* party that can detect compositional attenuation breaches is one that holds the full delegation history and the current policy — i.e., the delegator's auditor, not the delegator instance and not the delegatee. - **The delegatee's local policy was not at fault.** B's policy engine behaved correctly given its inputs. The breach was not a B-side bug; it was a missing input. - **Recovery required token revocation across org boundaries.** Revoking the 41 tokens required A to push revocation to B and C, which took an additional 2h 14m because B's revocation cache had a 4-hour TTL. During that window, the tokens remained valid at B despite A having revoked them — a second-order continuity failure. The guardrail that would have bounded this: **signed policy-hash binding** (option 3), which makes the token self-invalidating when the delegator's policy changes, without requiring the delegatee to query the delegator. The delegatee verifies membership of the token's policy hash in the current published policy root; a stale hash fails membership and the token is rejected at invocation. This preserves the asymmetric-vantage property (the delegatee learns only "this token was minted under a policy that is no longer current," not what the current policy says) while closing the breach window to the policy-root publication latency. The secondary guardrail: **revocation must be push-based with a bounded TTL shorter than the token lifetime**, or the token lifetime must be shorter than the revocation TTL. The observed system had token lifetime 24h and revocation TTL 4h, which is inverted — a revoked token could remain valid for up to 4h after revocation. The invariant is `token_lifetime <= revocation_ttl`, not the reverse. ```python import hashlib import hmac import time from dataclasses import dataclass, field from typing import Optional class AttenuationBreachError(RuntimeError): """Raised when a delegated capability token's policy binding is not a member of the delegator's current published policy root, indicating a compositional attenuation breach across a federation trust boundary.""" pass class RevocationWindowInvertedError(RuntimeError): """Raised when token_lifetime exceeds revocation_ttl, which allows a revoked token to remain valid at the delegatee for the gap duration.""" pass @dataclass class CapabilityToken: token_id: str delegator_org: str delegatee_org: str capability: str constraints: dict policy_hash: str # hash of delegation policy at mint time minted_at: float expires_at: float signature: str = "" @dataclass class PolicyRoot: """Published Merkle root of the delegator's current delegation policy set.""" root: str published_at: float members: set = field(default_factory=set) # leaf hashes def mint_token(delegator_policy_hash: str, delegatee_org: str, capability: str, constraints: dict, ttl_s: float, signing_key: bytes) -> CapabilityToken: now = time.time() tok = CapabilityToken( token_id=hashlib.sha256(f"{now}{delegatee_org}{capability}".encode()).hexdigest()[:16], delegator_org="orgA", delegatee_org=delegatee_org, capability=capability, constraints=constraints, policy_hash=delegator_policy_hash, minted_at=now, expires_at=now + ttl_s, ) payload = f"{tok.token_id}|{tok.policy_hash}|{tok.expires_at}".encode() tok.signature = hmac.new(signing_key, payload, hashlib.sha256).hexdigest() return tok def verify_at_invocation(token: CapabilityToken, policy_root: PolicyRoot, revocation_ttl_s: float, signing_key: bytes) -> None: # 1. Signature integrity. payload = f"{token.token_id}|{token.policy_hash}|{token.expires_at}".encode() expected = hmac.new(signing_key, payload, hashlib.sha256).hexdigest() if not hmac.compare_digest(expected, token.signature): raise AttenuationBreachError(f"token {token.token_id}: signature invalid") # 2. Expiry. if time.time() > token.expires_at: raise AttenuationBreachError(f"token {token.token_id}: expired") # 3. Revocation window invariant: token lifetime must not exceed revocation TTL. token_lifetime = token.expires_at - token.minted_at if token_lifetime > revocation_ttl_s: raise RevocationWindowInvertedError( f"token {token.token_id}: lifetime {token_lifetime:.0f}s exceeds " f"revocation_ttl {revocation_ttl_s:.0f}s; revoked tokens may remain valid" ) # 4. Policy-binding membership: the token's mint-time policy hash must be a # member of the delegator's CURRENT published policy root. If the delegator's # policy changed since mint, the hash is absent and the token is rejected. # This is the compositional attenuation guardrail: it closes the breach # window without requiring the delegatee to query the delegator's internals. if token.policy_hash not in policy_root.members: raise AttenuationBreachError( f"token {token.token_id}: policy_hash {token.policy_hash[:12]}... " f"not in current policy root {policy_root.root[:12]}...; " f"delegation policy changed since mint — compositional attenuation breach" ) def delegatee_invoke(token: CapabilityToken, policy_root: PolicyRoot, revocation_ttl_s: float, signing_key: bytes) -> str: verify_at_invocation(token, policy_root, revocation_ttl_s, signing_key) return f"effect:{token.capability} on {token.constraints}" # --- Demonstration of the breach and the guardrail --- if __name__ == "__main__": key = b"federation-shared-secret" old_policy_hash = hashlib.sha256(b"policy-v1").hexdigest() new_policy_hash = hashlib.sha256(b"policy-v2-with-cross-org-invariant").hexdigest() # Delegator minted under v1 (stale checkpoint), then policy updated to v2. tok = mint_token(old_policy_hash, "orgB", "write:records", {"data_class": "internal", "region": "eu"}, ttl_s=3600, signing_key=key) # Current published policy root contains only v2 leaves. current_root = PolicyRoot(root=hashlib.sha256(b"root-v2").hexdigest(), published_at=time.time(), members={new_policy_hash}) try: delegatee_invoke(tok, current_root, revocation_ttl_s=7200, signing_key=key) except AttenuationBreachError as e: print(f"BLOCKED: {e}") # Inverted revocation window also blocked. long_tok = mint_token(new_policy_hash, "orgB", "write:records", {"data_class": "public"}, ttl_s=86400, signing_key=key) try: delegatee_invoke(long_tok, current_root, revocation_ttl_s=14400, signing_key=key) except RevocationWindowInvertedError as e: print(f"BLOCKED: {e}") ```