Skip to content

Commit f67e2eb

Browse files
committed
fix(gateway): honor dangerouslyDisableDeviceAuth regardless of sharedAuthOk
Fixes #44485 ## Problem After upgrading from 2026.3.8 to 2026.3.11, Control UI rejects all browser connections over HTTP with 'device identity required', even with `gateway.controlUi.dangerouslyDisableDeviceAuth: true`. ## Root Cause Commit 8d1481c changed shouldSkipControlUiPairing to require BOTH: 1. dangerouslyDisableDeviceAuth: true 2. sharedAuthOk: true But on HTTP-only deployments, sharedAuthOk is often false (no token/password provided in browser). This defeats the purpose of the flag. ## Solution When dangerouslyDisableDeviceAuth: true, skip pairing entirely regardless of sharedAuthOk. This restores the 2026.3.8 behavior. ## Changes - src/gateway/server/ws-connection/connect-policy.ts - src/gateway/server/ws-connection/connect-policy.test.ts ## Testing - [x] Unit test updated to reflect new behavior - [x] bypass + sharedAuthOk=false now returns true - [x] HTTP-only deployments can use Control UI again ## Impact Restores Control UI access for HTTP-only deployments behind reverse proxies.
1 parent 7c48d65 commit f67e2eb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/gateway/server/ws-connection/connect-policy.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ describe("ws connect policy", () => {
182182
controlUiConfig: undefined,
183183
deviceRaw: null,
184184
});
185+
// When dangerouslyDisableDeviceAuth is true, always skip pairing
185186
expect(shouldSkipControlUiPairing(bypass, true, false)).toBe(true);
186-
expect(shouldSkipControlUiPairing(bypass, false, false)).toBe(false);
187+
expect(shouldSkipControlUiPairing(bypass, false, false)).toBe(true); // CHANGED: now skips even without sharedAuth
187188
expect(shouldSkipControlUiPairing(strict, true, false)).toBe(false);
188189
expect(shouldSkipControlUiPairing(strict, false, true)).toBe(true);
189190
});

src/gateway/server/ws-connection/connect-policy.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ export function shouldSkipControlUiPairing(
3737
sharedAuthOk: boolean,
3838
trustedProxyAuthOk = false,
3939
): boolean {
40+
// When dangerouslyDisableDeviceAuth is true, skip pairing entirely
41+
// This is the intended behavior for HTTP-only deployments
42+
if (policy.dangerouslyDisableDeviceAuth) {
43+
return true;
44+
}
4045
if (trustedProxyAuthOk) {
4146
return true;
4247
}

0 commit comments

Comments
 (0)