惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
量子位
A
About on SuperTechFans
G
Google Developers Blog
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs: absorb maintainer docs sweep · openclaw/openclaw@e0...
steipete · 2026-05-23 · via Recent Commits to openclaw:main

@@ -0,0 +1,212 @@

1+

---

2+

summary: "Pre-flight and rollback checklist before exposing an OpenClaw Gateway beyond loopback"

3+

title: "Gateway exposure runbook"

4+

sidebarTitle: "Exposure runbook"

5+

read_when:

6+

- Exposing the Gateway over LAN, tailnet, Tailscale Serve, Funnel, or a reverse proxy

7+

- Reviewing a deployment before allowing real messaging users

8+

- Rolling back a risky remote access or DM configuration

9+

---

10+11+

<Warning>

12+

Expose the Gateway only after you can explain who can reach it, how they are

13+

authenticated, which agents they can trigger, and which tools those agents can

14+

use. When in doubt, return to loopback-only access and re-run the audit.

15+

</Warning>

16+17+

This runbook turns the broader [Security](/gateway/security) guidance into an

18+

operator checklist for remote access and messaging exposure.

19+20+

## Choose the exposure pattern

21+22+

Prefer the narrowest pattern that satisfies the workflow.

23+24+

| Pattern | Recommended when | Required controls |

25+

| -------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------- |

26+

| Loopback + SSH tunnel | Personal use, admin access, debugging | Keep `gateway.bind: "loopback"` and tunnel `127.0.0.1:18789` |

27+

| Loopback + Tailscale Serve | Personal tailnet access to Control UI/WebSocket | Keep Gateway loopback-only; rely on Tailscale identity headers only for supported surfaces |

28+

| Tailnet/LAN bind | Dedicated private network with known devices | Gateway auth, firewall allowlist, no public port-forward |

29+

| Trusted reverse proxy | Organization SSO/OIDC in front of Gateway | `trusted-proxy` auth, strict `trustedProxies`, header overwrite/strip rules, explicit allowed users |

30+

| Public internet | Rare, high-risk deployments | Identity-aware proxy, TLS, rate limits, strict allowlists, sandboxed non-main sessions |

31+32+

Avoid direct public port-forwarding to the Gateway. If you need public access,

33+

put an identity-aware proxy in front of it and make the proxy the only network

34+

path to the Gateway.

35+36+

## Pre-flight inventory

37+38+

Record these before changing bind, proxy, Tailscale, or channel policy:

39+40+

- Gateway host, OS user, and state directory.

41+

- Gateway URL and bind mode.

42+

- Auth mode, token/password source, or trusted proxy identity source.

43+

- All enabled channels and whether they accept DMs, groups, or webhooks.

44+

- Agents reachable from non-local senders.

45+

- Tool profile, sandbox mode, and elevated tool policy for each reachable agent.

46+

- External credentials available to those agents.

47+

- Backup location for `~/.openclaw/openclaw.json` and credentials.

48+49+

If more than one person can message the bot, treat this as shared delegated tool

50+

authority, not as per-user host isolation.

51+52+

## Baseline checks

53+54+

Run these before opening access:

55+56+

```bash

57+

openclaw doctor

58+

openclaw security audit

59+

openclaw security audit --deep

60+

openclaw health

61+

```

62+63+

Resolve critical findings first. Warnings may be acceptable only when they are

64+

intentional and documented for the deployment.

65+66+

For remote CLI validation, pass credentials explicitly:

67+68+

```bash

69+

openclaw gateway probe --url ws://127.0.0.1:18789 --token "$OPENCLAW_GATEWAY_TOKEN"

70+

```

71+72+

Do not assume local config credentials apply to an explicit remote URL.

73+74+

## Minimum safe baseline

75+76+

Use this shape as the starting point for exposed deployments:

77+78+

```json5

79+

{

80+

gateway: {

81+

bind: "loopback",

82+

auth: {

83+

mode: "token",

84+

token: "replace-with-a-long-random-token",

85+

},

86+

},

87+

session: {

88+

dmScope: "per-channel-peer",

89+

},

90+

agents: {

91+

defaults: {

92+

sandbox: { mode: "non-main" },

93+

},

94+

},

95+

tools: {

96+

profile: "messaging",

97+

exec: { security: "deny", ask: "always" },

98+

elevated: { enabled: false },

99+

},

100+

}

101+

```

102+103+

Then widen one control at a time. For example, add a specific channel allowlist

104+

before enabling write-capable tools, or enable a reverse proxy before accepting

105+

remote Control UI traffic.

106+107+

The strict `exec.security: "deny"` baseline blocks all exec calls, including

108+

benign diagnostics. If diagnostics or low-risk commands are required, relax this

109+

only after choosing the specific senders, agents, commands, and approval mode

110+

that match your threat model.

111+112+

## DM and group exposure

113+114+

Messaging channels are untrusted input surfaces. Before allowing DMs or groups:

115+116+

- Prefer `dmPolicy: "pairing"` or strict `allowFrom` lists.

117+

- Avoid `dmPolicy: "open"` unless every sender is trusted.

118+

- Do not combine `"*"` allowlists with broad tool access.

119+

- Require mentions in groups unless the room is tightly controlled.

120+

- Use `session.dmScope: "per-channel-peer"` when multiple people can DM the bot.

121+

- Route shared channels to agents with minimal tools and no personal credentials.

122+123+

Pairing approves the sender to trigger the bot. It does not make that sender a

124+

separate host security boundary.

125+126+

## Reverse proxy checks

127+128+

For identity-aware proxies:

129+130+

- The proxy must authenticate users before forwarding to the Gateway.

131+

- Direct access to the Gateway port must be blocked by firewall or network policy.

132+

- `gateway.trustedProxies` must contain only the proxy source IPs.

133+

- The proxy must strip or overwrite client-supplied identity and forwarding headers.

134+

- `gateway.auth.trustedProxy.allowUsers` should list expected users when the proxy serves more than one audience.

135+

- Same-host loopback proxy mode should use `allowLoopback` only when local processes are trusted and the proxy owns the identity headers.

136+137+

Run `openclaw security audit --deep` after proxy changes. Trusted-proxy findings

138+

are intentionally high-signal because the proxy becomes the authentication

139+

boundary.

140+141+

## Tool and sandbox review

142+143+

Before exposing an agent to remote senders:

144+145+

- Confirm which sessions run on host versus sandbox.

146+

- Deny or require approval for host exec.

147+

- Keep elevated tools disabled unless a specific, trusted sender needs them.

148+

- Avoid browser, canvas, node, cron, gateway, and session-spawn tools for open or semi-open messaging surfaces.

149+

- Keep bind mounts narrow and avoid credential, home, Docker socket, and system paths.

150+

- Use separate gateways, OS users, or hosts for materially different trust boundaries.

151+152+

If remote users are not fully trusted, isolation must come from separate

153+

deployments, not only from prompts or session labels.

154+155+

## Post-change validation

156+157+

After each exposure change:

158+159+

1. Re-run `openclaw security audit --deep`.

160+

2. Test a successful authorized connection.

161+

3. Test that an unauthorized sender or browser session is denied.

162+

4. Confirm logs redact secrets.

163+

5. Confirm DM/group routing reaches only the intended agent.

164+

6. Confirm high-impact tools ask for approval or are denied.

165+

7. Document the accepted residual warnings.

166+167+

Do not proceed to the next exposure change until the current one is understood.

168+169+

## Rollback plan

170+171+

If the Gateway may be overexposed:

172+173+

```json5

174+

{

175+

gateway: {

176+

bind: "loopback",

177+

},

178+

channels: {

179+

whatsapp: { dmPolicy: "disabled" },

180+

telegram: { dmPolicy: "disabled" },

181+

discord: { dmPolicy: "disabled" },

182+

slack: { dmPolicy: "disabled" },

183+

},

184+

tools: {

185+

exec: { security: "deny", ask: "always" },

186+

elevated: { enabled: false },

187+

},

188+

}

189+

```

190+191+

Then:

192+193+

1. Stop public forwarding, Tailscale Funnel, or reverse proxy routes.

194+

2. Rotate Gateway tokens/passwords and affected integration credentials.

195+

3. Remove `"*"` and unexpected senders from allowlists.

196+

4. Review recent audit logs, run history, tool calls, and config changes.

197+

5. Re-run `openclaw security audit --deep`.

198+

6. Re-enable access with the narrowest pattern that satisfies the workflow.

199+200+

## Review checklist

201+202+

- Gateway remains loopback-only unless there is a documented reason.

203+

- Non-loopback access has auth, firewalling, and no public direct route.

204+

- Trusted-proxy deployments have strict proxy IPs and header controls.

205+

- DMs use pairing or allowlists, not open access by default.

206+

- Groups require mentions or explicit allowlists.

207+

- Shared channels do not reach personal credentials.

208+

- Non-main sessions run in sandbox mode.

209+

- Host exec and elevated tools are denied or approval-gated.

210+

- Logs redact secrets.

211+

- Critical audit findings are resolved.

212+

- Rollback steps are tested and documented.