Repository navigation
feat(configure): surface the trusted-proxy loopback opt-in with its warning - #131132
Merged
Merged
Conversation
…arning Ask for explicit consent before enabling same-host trusted-proxy authentication, and explain the runtime rejection when consent is declined. Preserve existing loopback consent and unprompted device enrollment policy on same-mode reruns. Reuse runtime loopback classification, add English and Chinese wizard copy, and document the consent and preservation behavior.
Remove the auth-builder mock and replacement factories so gateway prompt tests verify returned configuration across proxy, token, password, and SecretRef flows. Retain all consent regressions while reducing test scaffolding and reusing tracked environment cleanup.
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 19:13
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 28, 2026
…arning (openclaw#131132) * feat(configure): surface the trusted-proxy loopback opt-in with its warning Ask for explicit consent before enabling same-host trusted-proxy authentication, and explain the runtime rejection when consent is declined. Preserve existing loopback consent and unprompted device enrollment policy on same-mode reruns. Reuse runtime loopback classification, add English and Chinese wizard copy, and document the consent and preservation behavior. * test(configure): assert wizard auth through the real builder Remove the auth-builder mock and replacement factories so gateway prompt tests verify returned configuration across proxy, token, password, and SecretRef flows. Retain all consent regressions while reducing test scaffolding and reusing tracked environment cleanup.
steipete
added a commit
that referenced
this pull request
Aug 28, 2026
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.
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
The gateway wizard accepted
127.0.0.1as a trusted-proxy address but never surfaced the requiredallowLoopbackopt-in, so the saved configuration was rejected at runtime withtrusted_proxy_loopback_source(src/gateway/auth.ts) — a silent dead-end the docs (docs/gateway/trusted-proxy-auth.md:95) only resolve via a manual config edit. Reruns of working same-host proxy configs also broke, because the wizard rebuilt the nested block and silently dropped an existingallowLoopback: true. Verified in stable v2026.7.1. (Audit finding F-O4; the fix shape — prompt with warning — is the maintainer's explicit product decision.)Why This Change Was Made
When the operator enters a loopback trusted-proxy address (classified by the same
isLoopbackAddresshelper runtime auth uses — no new IP parser; loopback literals, mapped IPv6, and loopback-base CIDRs), the wizard shows the security warning (any local process can forge identity headers; enable only when the proxy is the sole local listener) and asks for explicit consent. Consent setstrustedProxy.allowLoopback: true; refusal leaves it unset and states the exact runtime rejection with the docs URL. Same-mode reruns default to the existing opt-in (preserved, or revocable with an explicit No); entering trusted-proxy from another mode never revives dormant consent.deviceAutoApprove— pairing policy where omitted and empty scopes differ — is preserved verbatim, never reconstructed. Copy localized in en/zh-CN/zh-TW.Two independent passes preceded landing: a deep-context review confirmed the owner and shape ("best owner and shape"; runtime keeps sole authorization ownership — no bypass for HTTP or WebSocket), and the branch was rebased onto #131035's real-builder test harness with a fresh branch-mode autoreview, keeping main's three-mode preservation matrix byte-for-byte plus all 17 consent cases.
User Impact
Same-host reverse-proxy setups configured through the wizard now work at runtime with explicit, informed consent — no more silent rejection loop — and reconfiguring never silently drops or revives the loopback opt-in.
Evidence
promptGatewayConfig→buildGatewayAuthConfigpath with live-config write/read proof for revocation.check-changedfull gates exit 0; Codex autoreview clean three times (implementation, deep review, rebased branch).operator.questionsmissing from stated defaults; "manual upgrade" claim stale).