Skip to content

Commit 7a6f52c

Browse files
docs(gateway): document gateway.tools.byNode (ClawSweeper P2)
Add config-help entries (schema.help.ts) for gateway.tools.byNode and its per-node allow/deny, and a Gateway tool policy section in the configuration reference: restriction-only, authenticated-node keyed (unforgeable), fail-closed empty allow, nodeId discovered via /whoami or nodes list.
1 parent 4711b68 commit 7a6f52c

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

docs/gateway/configuration-reference.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,25 @@ See [Inferred commitments](/concepts/commitments).
627627

628628
</Accordion>
629629

630+
### Gateway tool policy (`gateway.tools`)
631+
632+
Gateway-level tool exposure, applied independently of agent/tool profiles for coarse production hardening:
633+
634+
- `gateway.tools.allow` / `gateway.tools.deny`: explicit allow/deny lists applied at the gateway. `deny` wins.
635+
- `gateway.tools.byNode`: per-node tool restriction keyed by the **authenticated** node id that hosts a turn. When an agent turn is driven through a node (a node-originated `agent.request`), that node's `allow`/`deny` are applied to the turn. **Restriction-only** — it can narrow the toolset, never escalate — and the node id comes from the node's cryptographically-paired connection, so a client cannot forge it. An explicitly-present (even empty) `allow` is **fail-closed** (`allow: []` ⇒ no tools); an absent `allow` means "no allow restriction". Find a node's id from its bridge `/whoami` or `openclaw nodes list`.
636+
637+
```json5
638+
gateway: {
639+
tools: {
640+
// Confine turns driven through a specific node (e.g. a node hosting a
641+
// browser) to just browser + memory tools:
642+
byNode: {
643+
"<authenticated-node-id>": { allow: ["browser", "memory_search", "memory_get"] },
644+
},
645+
},
646+
}
647+
```
648+
630649
### OpenAI-compatible endpoints
631650

632651
- Admin HTTP RPC: off by default as the `admin-http-rpc` plugin. Enable the plugin to register `POST /api/v1/admin/rpc`. See [Admin HTTP RPC](/plugins/admin-http-rpc).

src/config/schema.help.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ export const FIELD_HELP: Record<string, string> = {
9898
"Explicit gateway-level tool allowlist when you want a narrow set of tools available at runtime. Use this for locked-down environments where tool scope must be tightly controlled.",
9999
"gateway.tools.deny":
100100
"Explicit gateway-level tool denylist to block risky tools even if lower-level policies allow them. Use deny rules for emergency response and defense-in-depth hardening.",
101+
"gateway.tools.byNode":
102+
"Per-node tool restriction keyed by the AUTHENTICATED node id that hosts a turn (a node-originated agent.request). RESTRICTION-ONLY: a node's allow/deny narrows the toolset for the turns that node drives and can never escalate it. The node id comes from the node's cryptographically-paired connection, so a client cannot forge it. An explicitly-present (even empty) allow is FAIL-CLOSED (empty allow => no tools); an absent allow means 'no allow restriction'. Discover a node's id from its bridge /whoami response or `openclaw nodes list`. Example: confine a node that hosts a browser to browser + memory tools.",
103+
"gateway.tools.byNode.*":
104+
"Allow/deny policy for one authenticated node id. `allow` = the only tools that node's turns may use (empty array = no tools, fail-closed); `deny` = tools removed from that node's turns. Restriction-only; never grants a tool the base policy denies.",
101105
"gateway.handshakeTimeoutMs":
102106
"Pre-auth Gateway WebSocket handshake timeout in milliseconds. Use higher values on loaded or low-powered hosts where local clients can connect during startup warmup. OPENCLAW_HANDSHAKE_TIMEOUT_MS still takes precedence.",
103107
"gateway.channelHealthCheckMinutes":

0 commit comments

Comments
 (0)