#23280: fix(control-ui): remove stale allowInsecureAuth suggestion from error message (#22974)
gateway
size: XS
Cluster:
Device Auth and Security Fixes
## Problem
Since 2026.2.21, `allowInsecureAuth: true` no longer enables token-only
HTTP access to the Control UI. However, the disconnect error message still
told users to set this option as a fix — making it actively misleading.
## Changes
- Updated disconnect error message in `message-handler.ts` to remove the
stale `allowInsecureAuth` suggestion and point users to HTTPS or a
reverse proxy (nginx/Caddy) instead
- Updated `audit.ts` warning detail to accurately reflect that
`allowInsecureAuth` no longer bypasses secure context requirements
## Tests
- 78 existing audit tests pass with no regressions
## Closes
Closes #22974
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Removes stale `allowInsecureAuth` suggestion from Control UI error messages to align with security hardening introduced in 2026.2.21 that requires secure context and device identity checks regardless of the `allowInsecureAuth` setting.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge - it only updates error messages to reflect actual behavior
- The changes are documentation-only updates to error messages that align them with the security hardening implemented in 2026.2.21. No functional code changes, all tests pass, and the updates correctly guide users to proper solutions (HTTPS or localhost) instead of misleading them about `allowInsecureAuth` capabilities.
- No files require special attention
<sub>Last reviewed commit: 4c41723</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#17378: fix(gateway): allow dangerouslyDisableDeviceAuth with trusted-proxy...
by ar-nadeem · 2026-02-15
82.0%
#17605: fix: preserve scopes when disableControlUiDeviceAuth is enabled
by MisterGuy420 · 2026-02-16
80.6%
#6352: fix(ux): update gateway token error message UI location
by Glucksberg · 2026-02-01
79.1%
#17572: fix: make dangerouslyDisableDeviceAuth bypass device identity checks
by gitwithuli · 2026-02-15
78.5%
#18273: fix: extract token from URL query string for Control UI websocket auth
by MisterGuy420 · 2026-02-16
78.1%
#20089: fix(gateway): preserve control-ui scopes when dangerouslyDisableDev...
by vashkartik · 2026-02-18
77.8%
#13960: fix(ui): preserve structured config validation error details
by constansino · 2026-02-11
77.6%
#21326: Security/UI: harden Control UI gatewayUrl URL overrides
by bmendonca3 · 2026-02-19
76.4%
#17753: fix: Control UI unusable over HTTP - missing scopes
by MisterGuy420 · 2026-02-16
76.2%
#9440: fix(security): warn users when gateway token appears in URLs
by zenchantlive · 2026-02-05
75.7%