Skip to content

Commit 107d26e

Browse files
committed
fix(nodes): keep silent surfaces on the manual prompt; the message is the repair
Reverts the silent-route inline surface approval: gateway suites (roles-allowlist-update, node-pairing-rate-limit) protect the deliberate contract that a silently paired local device exposes no declared commands until an operator approves its surface — auto-approval would hand system.run to any local process that pairs. The #128446 dead end is repaired for every route by the actionable inventory rejection naming the pending request and approve command; docs state the surface prompt applies to silent and trusted-cidr device approvals alike.
1 parent 6f8d782 commit 107d26e

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎docs/nodes/index.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,10 @@ Node-related settings live under `gateway.nodes` and `tools.exec`:
736736
// with no requested scopes; does not auto-approve upgrades. This
737737
// approves the device only: the node's command/capability surface still
738738
// needs `openclaw nodes approve <requestId>` (see `openclaw nodes
739-
// pending`), because network origin alone must not grant commands.
740-
// Silent same-host, SSH-verified, and setup-code pairings approve the
741-
// initial surface automatically.
739+
// pending`), because device pairing alone must not grant commands.
740+
// Silent same-host pairing behaves the same way. SSH-verified pairing
741+
// and node-profile setup codes approve the initial surface, since both
742+
// record explicit machine-ownership or admin consent.
742743
pairing: {
743744
autoApproveCidrs: ["192.168.1.0/24"],
744745
// SSH-verified auto-approval (default: enabled). Approves first-time

‎src/gateway/server/ws-connection/connect-node-session.ts‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,14 @@ export async function prepareGatewayNodeConnect(
138138
}
139139
throw error;
140140
}
141-
// SSH verification proves machine ownership, an admin-minted setup code
142-
// records that admin's consent to this machine's initial declared surface,
143-
// and a silent approval proved same-host local-grade auth — the operator
144-
// themselves. Approve those initial surfaces directly; headless connects
145-
// have no approval UI to consume the silent hint, so leaving them pending
146-
// strands the node (#128446). "trusted-cidr" stays on the manual prompt:
147-
// network origin alone must not approve a command surface. Later manifest
148-
// upgrades still prompt for every route.
149-
if (deviceApprovedNonInteractively && !pairedNode && reconciliation.pendingPairing) {
141+
// SSH verification proves machine ownership, while an admin-minted setup code
142+
// records that admin's consent to this machine's initial declared surface.
143+
// Approve either initial surface directly; later manifest upgrades still prompt.
144+
if (
145+
(deviceApprovedVia === "ssh-verified" || deviceApprovedVia === "bootstrap") &&
146+
!pairedNode &&
147+
reconciliation.pendingPairing
148+
) {
150149
const surfaceRequestId = reconciliation.pendingPairing.request.requestId;
151150
const approvedSurface = await approveNodePairing(surfaceRequestId, {
152151
callerScopes: [ADMIN_SCOPE, PAIRING_SCOPE, WRITE_SCOPE],

0 commit comments

Comments
 (0)