Repository navigation
fix(onboard): preserve the remote gateway TLS pin for an unchanged endpoint - #131042
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 27, 2026 17:24
Carry the discovery URL, transport, and optional pin together so a trusted Direct choice overrides saved SSH transport and a new manual tunnel cannot retain an old route behind the same loopback URL. Keep manual same-endpoint pin preservation and existing auth scoping. Strengthen the explicit-absent origin assertion, restore test-owned environment keys, and document the discovery override behavior.
steipete
force-pushed
the
steipete/remote-tls-pin-preserve
branch
from
August 27, 2026 18:12
7c4deab to
e72ba4f
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 28, 2026
…dpoint (openclaw#131042) * fix(onboard): preserve the remote gateway TLS pin for an unchanged endpoint * fix(onboard): honor discovery transport when preserving remote settings Carry the discovery URL, transport, and optional pin together so a trusted Direct choice overrides saved SSH transport and a new manual tunnel cannot retain an old route behind the same loopback URL. Keep manual same-endpoint pin preservation and existing auth scoping. Strengthen the explicit-absent origin assertion, restore test-owned environment keys, and document the discovery override behavior.
steipete
added a commit
that referenced
this pull request
Aug 28, 2026
Honor the configured remote certificate pin in onboarding and configure readiness probes while keeping trust scoped to the exact saved endpoint. Retain explicit-pin precedence and exercise the real self-signed TLS handshake, rejection before credentials, and wizard config propagation. Follow up on #131042.
steipete
added a commit
that referenced
this pull request
Aug 28, 2026
…trusted proxies (#131475) * fix(onboard): probe remote gateways with saved TLS pins Honor the configured remote certificate pin in onboarding and configure readiness probes while keeping trust scoped to the exact saved endpoint. Retain explicit-pin precedence and exercise the real self-signed TLS handshake, rejection before credentials, and wizard config propagation. Follow up on #131042. * fix(configure): validate trusted proxy addresses with the runtime parser Share exact-IP and CIDR parsing between the trusted-proxy wizard and runtime matching. Reject malformed and empty list entries with expected-form guidance, preserve runtime matcher behavior, and recognize loopback CIDR aliases for the existing explicit consent prompt. Follow up on #131132; the diagnostic correction in #131196 did not validate this input. * fix(configure): align readiness and loopback consent with runtime Keep remote TLS pins and edge-auth inputs through health readiness polling by reusing the existing probe parameters. Keep remote config out of local health probes and cover polling through a real TLS socket. Check loopback consent against runtime proxy matching for both parsed bases and containing ranges, preserving mapped IPv4 and exact IPv6 zone semantics. Extend consent and URL-binding coverage without changing runtime authorization or config schemas.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 29, 2026
…trusted proxies (openclaw#131475) * fix(onboard): probe remote gateways with saved TLS pins Honor the configured remote certificate pin in onboarding and configure readiness probes while keeping trust scoped to the exact saved endpoint. Retain explicit-pin precedence and exercise the real self-signed TLS handshake, rejection before credentials, and wizard config propagation. Follow up on openclaw#131042. * fix(configure): validate trusted proxy addresses with the runtime parser Share exact-IP and CIDR parsing between the trusted-proxy wizard and runtime matching. Reject malformed and empty list entries with expected-form guidance, preserve runtime matcher behavior, and recognize loopback CIDR aliases for the existing explicit consent prompt. Follow up on openclaw#131132; the diagnostic correction in openclaw#131196 did not validate this input. * fix(configure): align readiness and loopback consent with runtime Keep remote TLS pins and edge-auth inputs through health readiness polling by reusing the existing probe parameters. Keep remote config out of local health probes and cover polling through a real TLS socket. Check loopback consent against runtime proxy matching for both parsed bases and containing ranges, preserving mapped IPv4 and exact IPv6 zone semantics. Extend consent and URL-binding coverage without changing runtime authorization or config schemas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Reconfiguring a working remote gateway interactively silently discarded its TLS certificate pin.
promptRemoteGatewayConfig()reconstructedgateway.remotefrom scratch, including only a pin discovered in the current invocation — soopenclaw configure --section gateway→ Remote → decline discovery → keep URL → keep credential reported "Remote gateway configured" while removingtlsFingerprint(andtransport/remotePort/SSH routing fields). Private-certificate connections then break outright; CA connections lose the explicit fingerprint check (gateway/tls-fingerprint.ts:26;websocket-transport.ts:137,162). The non-interactive sibling already preserves the whole remote block for an unchanged URL (6d39d3cf0ba); the interactive defect ships in stable v2026.7.1-2.Why This Change Was Made
The interactive producer now preserves the remote block only when the chosen URL exactly equals the original URL after whitespace trimming — no hostname/port/path equivalence is inferred, so trust never follows a changed endpoint. Key scoping decisions for review: classic onboarding can pre-seed a changed URL into the producer's input, so comparison uses the original configured URL (the internal
edgeAuthOriginUrloption renamed toremoteOriginUrland reused for both trust decisions — comparing the seeded URL would transfer an old pin and SSH routing to a different endpoint); omitted-vs-explicitly-absent original URLs are distinguished so a partial config can't attach old trust to a newly seeded URL; explicit auth selection overwrites both credential slots and separately-scoped edge auth (the spread can't bypass its scope check); a confirmed discovery pin wins only for its exact confirmed URL. Full field matrix (all 10gateway.remoteschema fields × unchanged/changed URL) in the worker report and tests. The "not advertised" discovery prompt no longer implies a saved pin is useless (en/zh-CN/zh-TW);docs/gateway/remote.mddocuments reconfiguration behavior.User Impact
Re-running the wizard against an unchanged remote endpoint keeps its certificate pin, transport, and SSH routing; changing the endpoint still clears them all.
Evidence
check-changedand Codex autoreview: pass/clean.OPENCLAW_GATEWAY_TOKENoutside its capture/restore list (test-isolation cleanup candidate).