mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:20:43 +00:00
fix: repair iOS LAN pairing
Fix iOS LAN/setup-code pairing policy for #47887. - Allow explicit private LAN and .local plaintext ws:// setup/manual connects where policy allows it. - Keep public hosts, .ts.net, and Tailscale CGNAT plaintext fail-closed. - Prefer explicit passwords over stale bootstrap tokens in Swift and TypeScript gateway clients. - Update setup-code/device-pair coverage, docs, and changelog with source credit for #65185. Verification: - pnpm install - git diff --check origin/main..HEAD - pnpm exec oxfmt --check --threads=1 src/gateway/client.ts src/gateway/client.test.ts src/pairing/setup-code.ts src/pairing/setup-code.test.ts extensions/device-pair/index.ts extensions/device-pair/index.test.ts - pnpm format:docs:check - pnpm test src/gateway/client.test.ts src/pairing/setup-code.test.ts extensions/device-pair/index.test.ts - cd apps/shared/OpenClawKit && swift test --filter 'DeepLinksSecurityTests|GatewayNodeSessionTests' - pnpm lint:swift passes with the existing TalkModeRuntime.swift type-body-length warning Blocked locally: - iOS app-target xcodebuild tests require unavailable watchOS 26.4 runtime here. - Testbox check:changed previously failed because the image lacks swiftlint; local swiftlint passes.
This commit is contained in:
@@ -134,12 +134,11 @@ That bootstrap token carries the built-in pairing bootstrap profile:
|
||||
|
||||
Treat the setup code like a password while it is valid.
|
||||
|
||||
For Tailscale, public, or other non-loopback mobile pairing, use Tailscale
|
||||
Serve/Funnel or another `wss://` Gateway URL. Direct non-loopback `ws://` setup
|
||||
URLs are rejected before QR/setup-code issuance. Plaintext `ws://` setup codes
|
||||
are limited to loopback URLs; private-network `ws://` clients still require the explicit
|
||||
`OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1` break-glass described in the remote
|
||||
Gateway guide.
|
||||
For Tailscale, public, or other remote mobile pairing, use Tailscale Serve/Funnel
|
||||
or another `wss://` Gateway URL. Plaintext `ws://` setup codes are accepted only
|
||||
for loopback, private LAN addresses, `.local` Bonjour hosts, and the Android
|
||||
emulator host. Tailnet CGNAT addresses, `.ts.net` names, and public hosts still
|
||||
fail closed before QR/setup-code issuance.
|
||||
|
||||
### Approve a node device
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ openclaw qr --url wss://gateway.example/ws
|
||||
- In the built-in node/operator bootstrap flow, the primary node token still lands with `scopes: []`.
|
||||
- If bootstrap handoff also issues an operator token, it stays bounded to the bootstrap allowlist: `operator.approvals`, `operator.read`, `operator.talk.secrets`, `operator.write`.
|
||||
- Bootstrap scope checks are role-prefixed. That operator allowlist only satisfies operator requests; non-operator roles still need scopes under their own role prefix.
|
||||
- Mobile pairing fails closed for Tailscale/public `ws://` gateway URLs. Private LAN `ws://` remains supported, but Tailscale/public mobile routes should use Tailscale Serve/Funnel or a `wss://` gateway URL.
|
||||
- Mobile pairing fails closed for Tailscale/public `ws://` gateway URLs. Private LAN addresses and `.local` Bonjour hosts remain supported over `ws://`, but Tailscale/public mobile routes should use Tailscale Serve/Funnel or a `wss://` gateway URL.
|
||||
- With `--remote`, OpenClaw requires either `gateway.remote.url` or
|
||||
`gateway.tailscale.mode=serve|funnel`.
|
||||
- With `--remote`, if effectively active remote credentials are configured as SecretRefs and you do not pass `--token` or `--password`, the command resolves them from the active gateway snapshot. If gateway is unavailable, the command fails fast.
|
||||
|
||||
Reference in New Issue
Block a user