fix(gateway): allow dangerouslyDisableDeviceAuth with trusted-proxy auth mode#17378
Closed
ar-nadeem wants to merge 4 commits intoopenclaw:mainfrom
Closed
fix(gateway): allow dangerouslyDisableDeviceAuth with trusted-proxy auth mode#17378ar-nadeem wants to merge 4 commits intoopenclaw:mainfrom
ar-nadeem wants to merge 4 commits intoopenclaw:mainfrom
Conversation
bfc1ccb to
f92900f
Compare
6 tasks
…uth mode The dangerouslyDisableDeviceAuth and allowInsecureAuth Control UI settings were not working with trusted-proxy authentication mode. These settings only worked with token or password auth modes. The issue was in message-handler.ts where canSkipDevice only checked sharedAuthOk (which is only true for token/password auth), but didn't consider the allowControlUiBypass settings for trusted-proxy auth. This fix allows Control UI to skip device pairing when: - dangerouslyDisableDeviceAuth is enabled, AND - The user is authenticated via trusted-proxy This is useful for setups using identity-aware reverse proxies (nginx + oauth2-proxy, Pomerium, Caddy + OAuth, etc.) where device pairing adds unnecessary friction. Fixes openclaw#8529
b8fc950 to
1293a2e
Compare
This was referenced Feb 21, 2026
chore: resolve merge conflicts
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.
Summary
Fixes #8529
Control UI settings dangerouslyDisableDeviceAuth and allowInsecureAuth did not work when using trusted-proxy authentication. Previously, these options only applied to token or password authentication modes.
This PR updates the authentication logic so that Control UI bypass settings are honored for authenticated trusted-proxy connections.
Changes
src/gateway/server/ws-connection/message-handler.tsto allowallowControlUiBypassto work with authenticated trusted-proxy connectionssrc/gateway/server.auth.e2e.test.tsto verify the fixRoot Cause
In
message-handler.ts,canSkipDeviceonly checkedsharedAuthOk(which is only true for token/password auth), but didn't consider theallowControlUiBypasssettings for trusted-proxy auth.Before:
After:
Impact
This allows Control UI to skip device pairing when:
This is particularly useful for setups using identity-aware reverse proxies (nginx + oauth2-proxy, Pomerium, Caddy + OAuth, etc.) where device pairing adds unnecessary friction.
Testing
Added e2e test: allows control ui without device identity with trusted-proxy auth when device auth is disabled
Configuration Example
With this fix, the following configuration now works as expected:
Replace trustedProxies with your proxy IPGreptile Summary
Fixes Control UI device authentication bypass for trusted-proxy auth mode. Previously,
dangerouslyDisableDeviceAuthandallowInsecureAuthsettings only applied to token/password authentication, leaving trusted-proxy users unable to skip device pairing despite explicit configuration.Key changes:
canSkipDevicelogic inmessage-handler.ts:434to honorallowControlUiBypassfor any authenticated connection, not just shared-secret authdangerouslyDisableDeviceAuthwith trusted-proxy authThe fix correctly checks that both
allowControlUiBypassis enabled (meaning the user explicitly configured bypass settings) ANDauthOkis true (meaning the user is authenticated via trusted-proxy).Confidence Score: 5/5
Last reviewed commit: b8fc950
(2/5) Greptile learns from your feedback when you react with thumbs up/down!