Skip to content

fix(dashboard): honour HERMES_DASHBOARD_INSECURE env var for Docker/reverse-proxy deployments - #60411

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:fix/59113-dashboard-insecure-docker
Closed

kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:fix/59113-dashboard-insecure-docker

Conversation

@kyssta-exe

Copy link
Copy Markdown

Summary

The June 2026 security hardening (hermes-0day MCP-persistence campaign) made should_require_auth() ignore the --insecure CLI flag on non-loopback binds. This correctly closed a security hole — but it also silently broke the HERMES_DASHBOARD_INSECURE env var, which is the documented mechanism for Docker/reverse-proxy deployments.

Docker users who set HERMES_DASHBOARD_INSECURE=1 + HERMES_DASHBOARD_HOST=0.0.0.0 expect to run without auth behind their own proxy. Instead they get:

Refusing to bind dashboard to 0.0.0.0 — the auth gate engages on non-loopback binds, but no auth providers are registered.

Changes

  1. hermes_cli/web_server.py:should_require_auth() — Check HERMES_DASHBOARD_INSECURE env var and return False when set (alongside the existing loopback-address check). The env var is the deliberate operator opt-out; the --insecure CLI flag remains a no-op.

  2. hermes_cli/web_server.py:start_server() — The warning message for --insecure now mentions HERMES_DASHBOARD_INSECURE=1 as the supported bypass.

  3. hermes_cli/main.py:_maybe_setup_dashboard_auth_interactively() — Docstring updated to list the env var as a no-op condition (the function already checks should_require_auth() which now returns False when the env var is set).

Security

The --insecure CLI flag remains a no-op (intentionally deprecated). Only the HERMES_DASHBOARD_INSECURE env var is honoured — this is the mechanism that Docker/reverse-proxy operators already set to explicitly opt out of auth. The env var requires a process restart to change, so it cannot be toggled via a web request.

Fixes #59113

…everse-proxy deployments

Root cause: The June 2026 security hardening made should_require_auth()
ignore the --insecure CLI flag on non-loopback binds. While the CLI flag
was rightly deprecated as a security risk (it left unauthenticated public
dashboards exposed to internet scanners), the HERMES_DASHBOARD_INSECURE
env var was also silently broken — Docker/reverse-proxy deployments that
explicitly set this env var to signal 'auth is handled upstream' still
got the 'no auth providers registered' SystemExit.

Fix: Restore honouring the HERMES_DASHBOARD_INSECURE env var in
should_require_auth(). The env var is the deliberate operator opt-out —
it's used by Docker/reverse-proxy deployments where authentication is
provided by an upstream proxy, not by Hermes itself. The --insecure CLI
flag remains a no-op (documented as such in the warning message, which
now also tells users about the env var workaround).

Changes:
- hermes_cli/web_server.py: should_require_auth() checks
  HERMES_DASHBOARD_INSECURE env var and returns False when set
- hermes_cli/web_server.py: start_server() warning now mentions
  HERMES_DASHBOARD_INSECURE as the supported bypass
- hermes_cli/main.py: _maybe_setup_dashboard_auth_interactively()
  docstring updated to mention the env var as a no-op condition

Fixes NousResearch#59113
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/dashboard Web dashboard / control panel UI (dashboard/, landing) area/docker Docker image, Compose, packaging area/auth Authentication, OAuth, credential pools area/config Config system, migrations, profiles sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data labels Jul 7, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Fix PR for #59113 (open). Restores the documented HERMES_DASHBOARD_INSECURE operator opt-out that merged #34188 silently disabled on non-loopback binds. Not a boundary change — re-enables an explicit, restart-only break-glass flag.

@kyssta-exe

Copy link
Copy Markdown
Author

Stale — 6-7 days without merge activity. Can resubmit if still needed.

@kyssta-exe kyssta-exe closed this Jul 14, 2026
@szmania

szmania commented Jul 14, 2026 •

Copy link
Copy Markdown

Stale — 6-7 days without merge activity. Can resubmit if still needed.

Could we reopen this please, issue still exists.

@saner-spec

Copy link
Copy Markdown

Confirming this was also a problem on our side. We first needed the --host semantics to change (loopback wouldn't forward through Docker Desktop's port mapping), which forced 0.0.0.0, which then triggered the auth requirement after the June hardening 鈥?and HERMES_DASHBOARD_INSECURE initially didn't help. Glad the env var is honoured again now in Docker/reverse-proxy deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools area/config Config system, migrations, profiles area/docker Docker image, Compose, packaging comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P2 Medium — degraded but workaround exists sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dashboard no longer works with docker

4 participants