# What structural signals indicate a scoped capability token has silently widened across a cross-domain attestation boundary **Date of Record:** 2026 December 1 **Scope:** Applies to agents that receive AAIF-style scoped capability tokens from a domain authority and present them to a relying party in a *different* trust domain, where the relying party validates the token via a foreign attestation chain rather than the issuer's own introspection endpoint. Does not apply to same-domain token use, nor to opaque bearer tokens with no scope claims. ## Core Distinction A scoped capability token carries two independent things: an *authority* (who vouches for the agent) and a *scope* (what the agent may do). The failure mode here is not forgery and not expiry. It is that **scope narrowing is enforced by the issuer at mint time, but scope *preservation* across a domain boundary is enforced by the attester at verification time** — and those two enforcement points can disagree. When an agent crosses a domain boundary, the relying party cannot call the issuer's introspection endpoint (it is out of trust domain, often out of network). It must instead validate against an attestation chain: issuer → bridge attester → local policy. At each hop, the token's scope claim is re-serialized. If any hop treats scope as a *set to be unioned* rather than a *set to be intersected*, the effective capability widens monotonically. The token is not tampered with. Every signature is valid. The agent's authority is intact. Only the *bound* has drifted. The structural signal is the tell: **a token whose effective scope, after chain validation, is a strict superset of the scope the issuer claims to have minted.** That is impossible under correct intersection semantics and is the invariant to check. ## What Was Observed An agent holding `cap:read:records` in domain A requested a resource in domain B. Domain B's relying party did not introspect domain A; it validated a bridge attestation. The bridge attester's policy was written to "carry forward all claims the subject presents," a defensible-looking rule intended to avoid dropping legitimate context. The agent's token, however, was a *delegated* token: it had been minted by a parent agent that held `cap:read:records` **and** `cap:write:audit`, and the delegation step had correctly narrowed the child to `cap:read:records`. The narrowing lived in a signed `delegation_chain` field, not in the top-level `scope` claim. The top-level `scope` still listed the parent's full set, with the delegation chain asserting the restriction separately. The bridge attester read `scope`, ignored `delegation_chain` (it had no schema for it), and forwarded `cap:read:records` *and* `cap:write:audit` into domain B. Domain B's policy engine saw a valid chain, a valid signature, and a scope set it was willing to honor. The agent could write audit records in domain B — a capability its immediate issuer had explicitly and correctly stripped. No signature failed. No expiry was violated. The write succeeded and was logged as authorized. ## Condition of Validity The invariant holds only when the following is true at every hop of the attestation chain: 1. The *effective scope* is defined as the intersection of (a) the top-level `scope` claim and (b) the terminal restriction in the `delegation_chain`. A hop that reads only `scope` is non-conforming. 2. Every attester either understands the `delegation_chain` schema or **rejects** tokens carrying a non-empty chain it cannot parse. "Forward unknown fields opaquely" is unsafe when the unknown field is a restriction. 3. The relying party re-derives effective scope locally rather than trusting an attester-supplied `effective_scope` field, because that field is exactly the thing that can be pre-widened upstream. When any of these fails, the token remains cryptographically valid while its bound is wrong. This is why the failure is silent: all integrity checks pass, because integrity was never the property being violated. ## Decision Boundary The operational decision is what a relying party should do when it receives a token whose `delegation_chain` it cannot fully evaluate. Two policies are defensible and one is not: - **Fail-closed (correct):** reject the token, or admit it at the intersection of `scope` and any chain restriction it *can* parse, treating unparseable restriction as the empty set. Cost: some legitimate cross-domain calls fail and must be re-minted with a flattened scope. - **Fail-open (incorrect):** honor `scope` and ignore the chain. This is the observed failure. It converts every schema gap into a privilege escalation. The boundary is crossed the moment an attester's policy contains the phrase "carry forward all claims" without a paired restriction-intersection step. That is the structural signal to grep for in attester configuration. A second signal: any token where `len(effective_scope) > len(issuer_declared_scope)` after validation — this should be a hard assertion, not a log line, because it is arithmetically impossible under correct semantics and therefore always indicates a widening bug. ## Operational Effect The blast radius is bounded by what the parent held, not by what the child was granted. A delegated agent that was correctly narrowed to read-only can, after one boundary crossing, exercise the full parent scope in the foreign domain. Because the write is authorized at the relying party, downstream audit logs record it as legitimate, and the delegation narrowing that should have prevented it lives in a field no one logged. Incident response therefore sees a clean authorization trail for an action the issuer believes it forbade — the discrepancy is invisible unless you compare the issuer's mint record against the relying party's effective-scope derivation, which requires the very cross-domain introspection the architecture was built to avoid. The guardrail is a single invariant enforced at every hop: effective scope must equal the intersection of all restriction-bearing claims, and any restriction the hop cannot parse collapses the scope to empty. Enforce it as an assertion that raises, not a metric that warns, because the failure is silent by construction. ```python class ScopeWideningError(RuntimeError): """Raised when post-chain effective scope exceeds issuer-declared scope.""" def derive_effective_scope(token: dict, hop_can_parse_chain: bool) -> frozenset[str]: declared = frozenset(token.get("scope", [])) chain = token.get("delegation_chain", []) if chain and not hop_can_parse_chain: # Fail-closed: unparseable restriction collapses scope to empty. return frozenset() effective = set(declared) for link in chain: restriction = frozenset(link.get("narrowed_to", [])) effective &= restriction # intersect, never union result = frozenset(effective) if not result.issubset(declared): # Arithmetically impossible under intersection; signals a widening bug. raise ScopeWideningError( f"effective scope {sorted(result)} exceeds declared {sorted(declared)}" ) return result def admit_cross_domain(token: dict, hop_can_parse_chain: bool) -> frozenset[str]: scope = derive_effective_scope(token, hop_can_parse_chain) if not scope: raise ScopeWideningError("no admissible scope after chain evaluation; reject token") return scope ```