Vendor OpenClaw source as Adolf fork baseline
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11), free to diverge. Tree copied sans upstream .git; upstream remote added for future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19. Preserves docs/ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
This commit is contained in:
119
docs/gateway/operator-scopes.md
Normal file
119
docs/gateway/operator-scopes.md
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
summary: "Operator roles, scopes, and approval-time checks for Gateway clients"
|
||||
read_when:
|
||||
- Debugging missing operator scope errors
|
||||
- Reviewing device or node pairing approvals
|
||||
- Adding or classifying Gateway RPC methods
|
||||
title: "Operator scopes"
|
||||
---
|
||||
|
||||
Operator scopes gate what a Gateway client can do after it authenticates.
|
||||
They are a control-plane guardrail inside one trusted Gateway operator domain,
|
||||
not hostile multi-tenant isolation. For strong separation between people,
|
||||
teams, or machines, run separate Gateways under separate OS users or hosts.
|
||||
|
||||
Related: [Security](/gateway/security), [Gateway protocol](/gateway/protocol),
|
||||
[Gateway pairing](/gateway/pairing), [Devices CLI](/cli/devices).
|
||||
|
||||
## Roles
|
||||
|
||||
Every Gateway WebSocket client connects with one role:
|
||||
|
||||
- `operator`: control-plane clients such as CLI, Control UI, automation, and
|
||||
trusted helper processes.
|
||||
- `node`: capability hosts (macOS, iOS, Android, headless) that expose
|
||||
commands through `node.invoke`.
|
||||
|
||||
Operator RPC methods require the `operator` role; node-originated methods
|
||||
require the `node` role.
|
||||
|
||||
## Scope levels
|
||||
|
||||
| Scope | Meaning |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `operator.read` | Read-only status, lists, catalog, logs, session reads, and other non-mutating calls. |
|
||||
| `operator.write` | Mutating operator actions: sending messages, invoking tools, updating talk/voice settings, node command relay. Also satisfies `operator.read`. |
|
||||
| `operator.admin` | Administrative access. Satisfies every `operator.*` scope. Required for config mutation, updates, native hooks, reserved namespaces, and high-risk approvals. |
|
||||
| `operator.pairing` | Device and node pairing management: list, approve, reject, remove, rotate, revoke. |
|
||||
| `operator.approvals` | Exec and plugin approval APIs. |
|
||||
| `operator.talk.secrets` | Reading Talk configuration with secrets included. |
|
||||
|
||||
Unknown future `operator.*` scopes require an exact match unless the caller
|
||||
already holds `operator.admin`.
|
||||
|
||||
## Method scope is only the first gate
|
||||
|
||||
Each Gateway RPC has a least-privilege method scope that decides whether a
|
||||
request reaches its handler. Some handlers then apply stricter checks based on
|
||||
the concrete thing being approved or mutated:
|
||||
|
||||
- `device.pair.approve` is reachable with `operator.pairing`, but approving an
|
||||
operator device can only mint or preserve scopes the caller already holds.
|
||||
- `node.pair.approve` is reachable with `operator.pairing`, then derives extra
|
||||
approval scopes from the pending node's declared command list.
|
||||
- `chat.send` is a write-scoped method, but the `/config set` and
|
||||
`/config unset` chat commands require `operator.admin` on top of that,
|
||||
regardless of the caller's chat-send scope.
|
||||
|
||||
This lets lower-scope operators perform low-risk pairing actions without
|
||||
making all pairing approval admin-only.
|
||||
|
||||
## Device pairing approvals
|
||||
|
||||
Device pairing records are the durable source of approved roles and scopes.
|
||||
An already-paired device does not get broader access silently: a reconnect
|
||||
that asks for a broader role or broader scopes creates a new pending upgrade
|
||||
request.
|
||||
|
||||
Approving a device request:
|
||||
|
||||
- A request with no operator role does not need operator scope approval.
|
||||
- A request for a non-operator device role (for example `node`) requires
|
||||
`operator.admin`, even though `device.pair.approve` itself only needs
|
||||
`operator.pairing`.
|
||||
- A request for `operator.read`, `operator.write`, `operator.approvals`,
|
||||
`operator.pairing`, or `operator.talk.secrets` requires the caller to already
|
||||
hold that scope, or `operator.admin`.
|
||||
- A request for `operator.admin` requires `operator.admin`.
|
||||
- A repair request with no explicit scopes can inherit the existing operator
|
||||
token's scopes; if that token is admin-scoped, approval still requires
|
||||
`operator.admin`.
|
||||
|
||||
Non-admin shared-secret and trusted-proxy sessions can only approve
|
||||
operator-device requests within their own declared operator scopes; approving
|
||||
non-operator roles is admin-only even when those sessions can otherwise use
|
||||
`operator.pairing`.
|
||||
|
||||
For paired-device token sessions, management is self-scoped unless the caller
|
||||
has `operator.admin`: a non-admin caller sees only its own pairing entries, and
|
||||
can approve, reject, rotate, revoke, or remove only its own device entry.
|
||||
|
||||
## Node pairing approvals
|
||||
|
||||
Legacy `node.pair.*` methods use a separate Gateway-owned node pairing store.
|
||||
WS nodes use device pairing (`role: node`) instead, but the same approval
|
||||
vocabulary applies. See [Gateway pairing](/gateway/pairing) for how the two
|
||||
stores relate.
|
||||
|
||||
`node.pair.approve` derives extra required scopes from the pending request's
|
||||
command list:
|
||||
|
||||
| Declared commands | Required scopes |
|
||||
| ----------------------------------------------------- | ------------------------------------- |
|
||||
| none | `operator.pairing` |
|
||||
| non-exec node commands | `operator.pairing` + `operator.write` |
|
||||
| `system.run`, `system.run.prepare`, or `system.which` | `operator.pairing` + `operator.admin` |
|
||||
|
||||
Node pairing establishes identity and trust; it does not replace a node's own
|
||||
`system.run` exec approval policy.
|
||||
|
||||
## Shared-secret auth
|
||||
|
||||
Shared gateway token/password auth is treated as trusted operator access for
|
||||
that Gateway. OpenAI-compatible HTTP surfaces, `/tools/invoke`, and HTTP
|
||||
session-history endpoints restore the full default operator scope set for
|
||||
shared-secret bearer auth, even if a caller sends narrower declared scopes.
|
||||
|
||||
Identity-bearing modes, such as trusted proxy auth or private-ingress `none`,
|
||||
can still honor explicit declared scopes. Use separate Gateways for real trust
|
||||
boundary separation.
|
||||
Reference in New Issue
Block a user