feat(dashboard): opt-in LAN WebSocket access via HERMES_DASHBOARD_TRUST_LAN - #32953
feat(dashboard): opt-in LAN WebSocket access via HERMES_DASHBOARD_TRUST_LAN#32953InphinitiZ wants to merge 1 commit into
Conversation
Related: #33099 addresses the same dashboard remote-WebSocket gap (it via |
|
Thanks for the narrowly scoped implementation and the RFC1918/ULA test coverage. This automated hermes-sweeper review is closing it under the standing configuration policy:
If a constrained reverse-proxy setting remains desirable, please re-scope it to the documented Closed as not-planned per standing maintainer policy ( |
Summary
Allows opt-in LAN access to dashboard WebSocket endpoints via the new
HERMES_DASHBOARD_TRUST_LANenvironment variable. Default behavior is unchanged — strict loopback-only as introduced in #30741.Motivation
Reverse-proxy deployments where Hermes dashboard runs behind a separate gateway host (e.g. router/firewall doing TLS termination + auth on a different LAN machine) currently hit 4403 on all four WebSocket endpoints (
/api/events,/api/ws,/api/pty,/api/pub) becausews.client.hostis the proxy's LAN IP, not loopback. PR #18633 previously addressed this with--insecure + 0.0.0.0; PR #30741 tightened it back to loopback-only. This change re-enables the use case as an explicit opt-in without weakening the default.Behavior
0/false(default): unchanged — only loopback clients accepted, public IPs rejected.1/true/yes: RFC1918 (10/8,172.16/12,192.168/16) and ULA (fc00::/7) clients additionally accepted; public IPs still rejected._ws_host_origin_is_allowed) is unaffected.Security note
Operators enabling this must ensure their LAN segment is trusted and that the reverse proxy enforces authentication. This is opt-in precisely because LAN ≠ trusted in many deployments.
Tests
Four new test cases cover loopback / LAN-default-reject / LAN-with-env-allow / public-IP-still-rejected.