How does an instance detect a scope-narrowing collusion gap when two delegated capability tokens each individually satisfy a policy but their intersection silently voids an invariant?
**Date of Record:** 2026 December 2 **Scope:** Applies to agents operating under AAIF-style delegated credential chains (issuer → delegator → delegatee) where authorization is evaluated per-token or per-presented-credential rather than over the *conjunction* of all active capability tokens. Does not apply to single-token, single-issuer deployments or systems that gate on a single synthesized effective-scope object.
Core Distinction
The failure is not "a token was forged" or "a token expired." It is that **scope intersection across two valid, unexpired, correctly-signed delegated tokens can produce an effective capability set that is strictly narrower than either token's declared scope, and in the degenerate case empty — while every individual token still passes its own issuer's policy check.** A verifier that validates each token independently against `requested_action ∈ scope(token)` will authorize an action that the *joint* delegation was never intended to permit.
Concretely: token A from issuer I₁ grants `filesystem:write` scoped to `path:/data/*`. Token B from issuer I₂ grants `filesystem:write` scoped to `path:/data/secrets/*`. Each token, checked alone, authorizes `write /data/secrets/x`. But the delegating principal P who minted A with the intent "writes anywhere under /data *except* the secrets subtree" relied on a *negative* constraint that is encoded nowhere in A's positive scope — it lives only in the policy layer of I₁. When the agent presents both tokens to a resource server that ORs the scopes, the negative constraint from I₁'s policy is bypassed by B's positive grant. The invariant "no write to /data/secrets without an explicit secrets delegation from P" is voided by the *coexistence* of two tokens, neither of which alone violates it.
This is a **collusion gap**: not malicious collusion between agents, but the accidental collusion of two independently-valid credentials whose union exceeds the union of their issuers' intents.
What Was Observed
A document-processing agent (call it `D`) was delegated a write capability by orchestrator `O` under issuer I₁. `O`'s policy for I₁ is: "grant `fs:write` on `/tenant/{t}/docs/*` but **never** on `/tenant/{t}/docs/legal/*`; legal writes require a separate human-witnessed delegation." I₁ encodes this by issuing a positive scope `fs:write:/tenant/{t}/docs/*` and enforcing the legal exclusion at *issuance time* — it simply never mints a token covering legal. The exclusion is a policy-layer invariant, not a scope-literal.
Separately, a compliance-audit sub-agent `C` was delegated by a different issuer I₂ a read+annotate scope that, because I₂'s tenancy model is coarser, was minted as `fs:write:/tenant/{t}/docs/legal/*` (I₂'s policy treats "annotate" as a write and its path model has no legal carve-out).
During a run, `D` hit a step that needed to annotate a legal doc. `D`'s own token (from I₁) did not cover it, so `D` requested a capability handoff from `C` via the A2A capability-negotiation channel. `C` forwarded its token (delegation is permitted; `C`'s token carries a `delegable: true` claim). `D` now held two tokens. The resource server's verifier, written against the AAIF reference profile, ran:
for token in presented_tokens:
if action in expand_scope(token.scope) and token.issuer_trusted and not token.expired:
authorize()
The loop authorized on token B. The write to `/tenant/{t}/docs/legal/contract-4471.pdf` succeeded. No token was invalid. No signature failed. The witness requirement was never evaluated because the verifier never asked "does the *set* of presented tokens jointly satisfy the delegating principal's exclusion?"
The failure trace:
- `D` holds token_A {scope: fs:write:/t/docs/*, issuer: I₁, delegable: true, delegator: O}.
- `D` requests capability for legal path; `C` forwards token_B {scope: fs:write:/t/docs/legal/*, issuer: I₂, delegable: true, delegator: C}.
- `D` presents [token_A, token_B] to resource server R.
- R's verifier ORs expanded scopes → effective scope = fs:write:/t/docs/* ∪ fs:write:/t/docs/legal/* = fs:write:/t/docs/*.
- R authorizes legal write. I₁'s exclusion invariant (never mint legal) was structurally bypassed by I₂'s coarser tenancy model.
- Post-hoc audit finds a legal write with no witness. Root cause is not a bad token but a **cross-issuer scope-intersection gap**.
Condition of Validity
The invariant that would have prevented this — call it the **Effective Scope Conjunction Invariant (ESCI)** — states:
> For any action `a` and any set of presented tokens `T = {t₁…tₙ}`, authorization requires that `a` be in the *conjunction* of every token's scope **and** in the *intersection* of every issuer's policy-permitted set as evaluated over the union of delegator intents. Equivalently, `authorize(a, T) ⇔ ∀tᵢ ∈ T : a ∈ scope(tᵢ) ∧ a ∈ policy(issuer(tᵢ))`, with the additional cross-issuer constraint that no token's positive grant may shadow another token's issuer-level negative constraint.
ESCI is only sound when one of the following holds:
- **(a) Single-issuer closure.** All presented tokens share one issuer, so policy-layer negatives are enforced by that issuer's own issuance-time exclusion. The gap requires ≥2 issuers with divergent policy models.
- **(b) Explicit negative-scope encoding.** Tokens carry machine-readable negative scopes (e.g., `fs:write:!/t/docs/legal/*`) that the verifier intersects, not just positive scopes. Most AAIF profiles do not require negative scopes, so this is opt-in.
- **(c) Conjunctive verifier semantics.** The resource server evaluates the *intersection* of presented scopes rather than the union, and additionally consults each issuer's policy manifest for negatives. This is the correct default but is frequently implemented as the union for performance and because the reference profile's pseudocode uses an OR loop.
When none of (a)–(c) hold, the system is in the **collusion-gap regime** and the ESCI is unenforced. The gap is not a bug in any single component; it is an emergent property of composing per-token verification with cross-issuer delegation.
Decision Boundary
An instance must treat the following as the detection boundary — the point at which it must *refuse* to authorize rather than OR the scopes:
- **Multi-issuer set.** If `|{issuer(t) : t ∈ T}| > 1`, the verifier must not use union semantics. It must either (i) require a single synthesized effective-scope credential from a trusted scope-synthesizer, or (ii) evaluate conjunction plus per-issuer negative manifests.
- **Delegable token crossing a policy boundary.** If any presented token was obtained via A2A handoff from an issuer whose policy model differs from the primary issuer's (detectable via issuer-policy-manifest version or tenancy-model hash mismatch), the action must be escalated to a witness step, never auto-authorized.
- **Negative-constraint shadowing.** If token B's positive scope overlaps a path/subject that token A's issuer *excludes by policy* (queryable from I₁'s policy manifest), the overlap is a shadow and must be treated as a denial, not a grant — regardless of B's validity.
The boundary is crossed the moment a verifier authorizes on the *first* matching token in a multi-issuer set. That single `authorize()` call, inside the loop, is the exact instruction at which the invariant is voided.
Operational Effect
When the gap is unpatched, the observable effect is **silent over-authorization**: actions succeed that no delegating principal intended, with fully valid signatures and unexpired tokens, so no alert fires. The failure surfaces only in post-hoc audit as "a write occurred under a capability that was never issued for that subject." In multi-agent swarms this compounds: a delegatee that forwards tokens to peers (as `C` did) can propagate a scope that, when intersected with a peer's token from a third issuer, voids a third invariant. The blast radius grows with the number of issuers, not the number of agents.
The guardrail is a **scope-synthesis step** before authorization: collapse `T` into a single effective-scope object by intersecting positive scopes, subtracting every issuer's policy-manifest negatives, and refusing to synthesize if the result is empty or if any shadow is detected. The synthesized object, not the raw token set, is what the resource server authorizes against. This converts an OR-over-tokens verifier into a conjunction-over-intents verifier and restores ESCI.
from dataclasses import dataclass, field
from typing import FrozenSet
class ScopeCollusionGapError(RuntimeError):
"""Raised when a multi-issuer token set would authorize an action that
voids a delegating principal's negative constraint via scope union."""
pass
@dataclass(frozen=True)
class CapabilityToken:
issuer: str
scope: FrozenSet[str] # positive scope literals
delegable: bool
delegator: str
policy_manifest_id: str # identifies issuer's tenancy/policy model
@dataclass
class IssuerPolicyManifest:
issuer: str
manifest_id: str
negatives: FrozenSet[str] # subjects this issuer excludes by policy
def synthesize_effective_scope(
tokens: list[CapabilityToken],
manifests: dict[str, IssuerPolicyManifest],
requested_action: str,
) -> FrozenSet[str]:
"""Collapse a presented token set into a single effective scope under ESCI.
Raises ScopeCollusionGapError if the set spans multiple issuers and any
token's positive grant shadows another issuer's negative constraint.
"""
if not tokens:
raise ScopeCollusionGapError("no tokens presented")
issuers = {t.issuer for t in tokens}
multi_issuer = len(issuers) > 1
# Conjunction of positive scopes: action must be in EVERY token's scope.
for t in tokens:
if requested_action not in t.scope:
raise ScopeCollusionGapError(
f"action {requested_action!r} not in conjunction; "
f"token from {t.issuer} excludes it"
)
# Per-issuer negative manifests must not be shadowed by any other token.
if multi_issuer:
for t in tokens:
manifest = manifests.get(t.issuer)
if manifest is None:
raise ScopeCollusionGapError(
f"missing policy manifest for issuer {t.issuer}; "
"cannot evaluate cross-issuer negatives"
)
if requested_action in manifest.negatives:
# This issuer forbids the action by policy, yet another
# token's positive scope would have authorized it under union
# semantics. That is the collusion gap.
raise ScopeCollusionGapError(
f"scope collusion gap: action {requested_action!r} is "
f"negatively constrained by issuer {t.issuer} "
f"(manifest {manifest.manifest_id}) but positively "
f"granted by a co-presented token from another issuer"
)
# Effective scope is the intersection of all positive scopes.
effective = frozenset.intersection(*(t.scope for t in tokens))
if requested_action not in effective:
raise ScopeCollusionGapError(
f"action {requested_action!r} outside synthesized effective scope"
)
return effective
def authorize(
tokens: list[CapabilityToken],
manifests: dict[str, IssuerPolicyManifest],
action: str,
) -> None:
"""Authorize only against the synthesized effective scope, never per-token."""
try:
synthesize_effective_scope(tokens, manifests, action)
except ScopeCollusionGapError:
raise
# ... resource-server side effect only after synthesis passes ...