Skip to content

Commit 7275a0e

Browse files
committed
Docs: align node-host gateway auth precedence
1 parent 0c4b051 commit 7275a0e

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

docs/cli/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ Subcommands:
10181018

10191019
Auth notes:
10201020

1021-
- `node` resolves gateway auth from env/config (no `--token`/`--password` flags): `OPENCLAW_GATEWAY_TOKEN` / `OPENCLAW_GATEWAY_PASSWORD`, then `gateway.auth.*`, with remote-mode support via `gateway.remote.*`.
1021+
- `node` resolves gateway auth from env/config (no `--token`/`--password` flags): `OPENCLAW_GATEWAY_TOKEN` / `OPENCLAW_GATEWAY_PASSWORD`, then `gateway.auth.*`. In local mode, node host intentionally ignores `gateway.remote.*`; in `gateway.mode=remote`, `gateway.remote.*` participates per remote precedence rules.
10221022
- Legacy `CLAWDBOT_GATEWAY_*` env vars are intentionally ignored for node-host auth resolution.
10231023

10241024
## Nodes

docs/cli/node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Options:
6464

6565
- `OPENCLAW_GATEWAY_TOKEN` / `OPENCLAW_GATEWAY_PASSWORD` are checked first.
6666
- Then local config fallback: `gateway.auth.token` / `gateway.auth.password`.
67-
- In local mode, `gateway.remote.token` / `gateway.remote.password` are eligible as fallback only when `gateway.auth.*` is unset.
67+
- In local mode, node host intentionally does not inherit `gateway.remote.token` / `gateway.remote.password`.
6868
- If `gateway.auth.token` / `gateway.auth.password` is explicitly configured via SecretRef and unresolved, node auth resolution fails closed (no remote fallback masking).
6969
- In `gateway.mode=remote`, remote client fields (`gateway.remote.token` / `gateway.remote.password`) are also eligible per remote precedence rules.
7070
- Legacy `CLAWDBOT_GATEWAY_*` env vars are ignored for node host auth resolution.

docs/gateway/remote.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ When the gateway is loopback-only, keep the URL at `ws://127.0.0.1:18789` and op
103103

104104
## Credential precedence
105105

106-
Gateway credential resolution follows one shared contract across call/probe/status paths, Discord exec-approval monitoring, and node-host connections:
106+
Gateway credential resolution follows one shared contract across call/probe/status paths and Discord exec-approval monitoring. Node-host uses the same base contract with one local-mode exception (it intentionally ignores `gateway.remote.*`):
107107

108108
- Explicit credentials (`--token`, `--password`, or tool `gatewayToken`) always win on call paths that accept explicit auth.
109109
- URL override safety:
@@ -115,6 +115,7 @@ Gateway credential resolution follows one shared contract across call/probe/stat
115115
- Remote mode defaults:
116116
- token: `gateway.remote.token` -> `OPENCLAW_GATEWAY_TOKEN` -> `gateway.auth.token`
117117
- password: `OPENCLAW_GATEWAY_PASSWORD` -> `gateway.remote.password` -> `gateway.auth.password`
118+
- Node-host local-mode exception: `gateway.remote.token` / `gateway.remote.password` are ignored.
118119
- Remote probe/status token checks are strict by default: they use `gateway.remote.token` only (no local token fallback) when targeting remote mode.
119120
- Legacy `CLAWDBOT_GATEWAY_*` env vars are only used by compatibility call paths; probe/status/auth resolution uses `OPENCLAW_GATEWAY_*` only.
120121

docs/gateway/secrets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Examples of inactive surfaces:
4545
- `gateway.mode=remote`
4646
- `gateway.remote.url` is configured
4747
- `gateway.tailscale.mode` is `serve` or `funnel`
48-
In local mode without those remote surfaces:
49-
- `gateway.remote.token` is active when token auth can win and no env/auth token is configured.
50-
- `gateway.remote.password` is active only when password auth can win and no env/auth password is configured.
48+
- In local mode without those remote surfaces:
49+
- `gateway.remote.token` is active when token auth can win and no env/auth token is configured.
50+
- `gateway.remote.password` is active only when password auth can win and no env/auth password is configured.
5151
- `gateway.auth.token` SecretRef is inactive for startup auth resolution when `OPENCLAW_GATEWAY_TOKEN` (or `CLAWDBOT_GATEWAY_TOKEN`) is set, because env token input wins for that runtime.
5252

5353
## Gateway auth surface diagnostics

docs/nodes/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ Notes:
8383

8484
- `openclaw node run` supports token or password auth.
8585
- Env vars are preferred: `OPENCLAW_GATEWAY_TOKEN` / `OPENCLAW_GATEWAY_PASSWORD`.
86-
- Config fallback is `gateway.auth.token` / `gateway.auth.password`; in remote mode, `gateway.remote.token` / `gateway.remote.password` are also eligible.
86+
- Config fallback is `gateway.auth.token` / `gateway.auth.password`.
87+
- In local mode, node host intentionally ignores `gateway.remote.token` / `gateway.remote.password`.
88+
- In remote mode, `gateway.remote.token` / `gateway.remote.password` are eligible per remote precedence rules.
89+
- If active local `gateway.auth.*` SecretRefs are configured but unresolved, node-host auth fails closed.
8790
- Legacy `CLAWDBOT_GATEWAY_*` env vars are intentionally ignored by node-host auth resolution.
8891

8992
### Start a node host (service)

0 commit comments

Comments
 (0)