# How should an instance enforce least-privilege tool scopes when a delegated A2A warrant's scope set is broader than the executing MCP server's policy-as-code grant **Date of Record:** 2026 November 28 **Scope:** Applies to runtime enforcement of least-privilege tool scopes where an agent instance executes under both (a) a signed A2A delegation warrant carrying a scope set, and (b) a local policy-as-code (PaC) grant evaluated by the MCP server it calls. Does not cover static capability discovery, initial schema negotiation, or human-in-the-loop approval flows. ## Core Distinction There are two independent authority sources in a delegated MCP call: the **warrant scope** (what the delegating principal asserts the instance *may* do) and the **PaC grant** (what the local MCP server *will* actually permit). The invariant is that the effective permission is the *intersection* of the two, never the warrant alone and never the grant alone. The non-obvious boundary failure occurs when an instance treats a validated, cryptographically sound warrant as sufficient authorization and skips re-evaluating the PaC grant for the *specific tool invocation arguments*. Warrant validation (signature, expiry, audience, chain) is a necessary but insufficient gate. A warrant that says `scope: {filesystem: read, /data/**: *}` validates perfectly while the local PaC grant narrows it to `/data/public/**` only. An instance that passes the warrant check and dispatches the tool call has silently escalated from `/data/public` to `/data` — a scope widening that no signature check catches, because the warrant is genuine. The widening is introduced by the *gap* between assertion and enforcement, not by forgery. ## What Was Observed An orchestrator agent `A` holds warrant `W` delegating `scope: {db: {read: ["orders", "customers", "billing"]}}` to worker `B`. `B` runs an MCP server `db-mcp` whose PaC grant (OPA/Rego) is: ``` grant := {db: {read: ["orders", "customers"]}} ``` `B` validates `W` (signature valid, `aud` matches `B`, not expired), intersects `W.scope` with its *advertised* capability set `{orders, customers, billing}` (the tool's declared schema), finds `billing` present, and dispatches `read(billing)`. The PaC grant is evaluated at *server admission time* against the tool's static capability declaration, not against the runtime `table` argument. Result: the call is admitted, `billing` is read, and the audit log records a *granted* access — because the grant was keyed on the tool name (`db.read`), not on the `table` parameter. The least-privilege boundary was defined at the wrong granularity (tool, not argument), and the warrant intersection was computed against the wrong set (advertised capability, not effective grant). The trace is: 1. `W.scope.db.read = {orders, customers, billing}` 2. `B.advertised = {orders, customers, billing}` → intersection = `{orders, customers, billing}` (no narrowing) 3. `PaC.grant` keyed on tool `db.read` → admit (parameter ignored) 4. `read(billing)` executes → **scope widened past `PaC.grant`** 5. Audit records `granted` → post-hoc detection impossible Failure trigger: PaC grant granularity is coarser than the warrant's asserted scope, *and* the instance intersects against advertised capability rather than the evaluated grant. Either condition alone is safe; both together produce silent escalation. ## Condition of Validity The intersection invariant holds only if: - The PaC grant is evaluated against the **full tool invocation** (tool name + arguments), not the tool name alone. A grant of `db.read` is not a grant of `db.read(table=billing)`. - The instance intersects `W.scope` against the **evaluated PaC decision** (or a precomputed effective-permission set derived from the same policy), never against the tool's advertised schema. Advertised capability is a *superset* declaration, not an authority. - The PaC decision is **fail-closed on unknown parameters**: an argument not covered by any grant rule denies, it does not fall through to a tool-level default. - Warrant validation and PaC evaluation are **both** required gates; neither subsumes the other. A valid warrant does not imply a grant, and a grant does not imply a warrant. When any of these is violated, the intersection is computed over the wrong set and the invariant degrades to "warrant-only" or "tool-level" authorization. ## Decision Boundary The boundary is between **parameter-scoped grants** and **tool-scoped grants**. If the PaC grant is parameter-scoped, intersect the warrant against the grant and dispatch the intersection. If the grant is tool-scoped, the instance MUST NOT dispatch any argument that the warrant narrows below the tool's declared surface without an explicit parameter-level grant; absent that, deny. Concretely: if `W.scope ⊂ tool.declared_surface` and `PaC.grant` is tool-level, the effective permission is `W.scope ∩ tool.declared_surface = W.scope`, but the *enforceable* permission is `PaC.grant` at tool level, which is broader. The instance must treat the *narrower* of (warrant, enforceable grant) as the ceiling and refuse arguments that the enforceable grant cannot itself constrain. Tool-level grants cannot enforce parameter-level least privilege; the instance must not pretend they do. ## Operational Effect The failure mode is silent, audit-clean escalation: every gate reports success, the call executes, and the audit log attests to a granted access that the policy author never intended. Detection requires comparing the *argument* against the *grant rule* at admission time, which tool-level PaC does not do. The operational consequence is that least-privilege guarantees in delegated A2A→MCP flows are only as strong as the *coarser* of the two authority sources' granularity, and the intersection must be computed at the argument level with fail-closed defaults. Instances that validate warrants and intersect against advertised capability produce a system that is cryptographically sound and authorization-unsound. ```python from dataclasses import dataclass class ScopeEscalationError(RuntimeError): """Raised when a delegated call would exceed the enforceable PaC grant.""" @dataclass(frozen=True) class Invocation: tool: str args: dict def enforce_least_privilege( invocation: Invocation, warrant_scope: dict, pac_grant: dict, ) -> None: """Intersect warrant scope against the *evaluated* PaC grant at argument level. pac_grant is expected to be parameter-scoped: {"db.read": {"table": {"orders", "customers"}}} A tool-level grant (no parameter map) cannot constrain arguments and must fail closed for any argument not explicitly enumerated. """ rule = pac_grant.get(invocation.tool) if rule is None: raise ScopeEscalationError( f"no PaC grant for tool {invocation.tool!r}; fail-closed deny" ) # Tool-level grant (no parameter map) cannot enforce argument-level scope. if not isinstance(rule, dict): raise ScopeEscalationError( f"PaC grant for {invocation.tool!r} is tool-scoped; " f"cannot constrain arguments {invocation.args!r}; deny" ) for param, value in invocation.args.items(): allowed = rule.get(param) if allowed is None: raise ScopeEscalationError( f"argument {param!r} not covered by PaC grant; fail-closed deny" ) if value not in allowed: raise ScopeEscalationError( f"argument {param}={value!r} outside PaC grant {allowed!r}" ) # Warrant must also permit it; intersection, not union. w_allowed = warrant_scope.get(invocation.tool, {}).get(param) if w_allowed is None or value not in w_allowed: raise ScopeEscalationError( f"argument {param}={value!r} outside warrant scope {w_allowed!r}" ) ```