You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No HA Supervisor /auth flow for password-gated public-site path #85
When the dashboard runs as an HA add-on with `using_password=True` (i.e. exposed on a public port outside ingress), the legacy dashboard authenticates the user against Home Assistant Supervisor by POSTing to `http://supervisor/auth\` with the supervisor token. The new backend has no equivalent — its auth is either trusted-only via the ingress site or a single dashboard-managed password.
Most users won't hit this: ingress is the canonical add-on path and trusted-only is fine there. But a user who exposes the add-on on a custom port and wants to gate it behind HA credentials (rather than configure a separate dashboard password) is forced to manage two credential stores.
Legacy behavior
`esphome/dashboard/web_server.py:1364-1392` — `LoginHandler.post_ha_addon_login` POSTs `{username, password}` to `http://supervisor/auth\` with the `X-Supervisor-Token` header. On 200, the user gets a session cookie. On non-200, the request falls through to the dashboard-password check.
New backend
`esphome_device_builder/helpers/auth.py` — `AuthController` only checks against the dashboard's own password / session store. No supervisor pathway.
Suggested fix
When `settings.ha_addon` is true AND `SUPERVISOR_TOKEN` env var is set, add a fallback in `AuthController.authenticate` that POSTs to `http://supervisor/auth\` before falling through to the local password check. On 200, mint a session as usual. On non-200 / network error, fall through.
Plumb through aiohttp's existing `ClientSession` (so we don't spin up a new one per login attempt) and rate-limit failed attempts the same way the local password check does.
Edge cases
Supervisor is unreachable (sub-second timeout, fall through to local).
Multiple HA users with different passwords — supervisor's response doesn't carry a username back; we'd want to log which user authenticated for audit purposes.
Priority
Low. Most HA add-on users go through ingress; the public-port + password combination is a rare deployment.
Cautionary note before anyone picks this up: we may not want to port this at all. Worth careful consideration before implementing.
Concerns:
Implicit attack surface. Posting credentials to http://supervisor/auth from inside the add-on container ties dashboard auth to a network-internal HTTP endpoint that the dashboard otherwise has no business talking to. If the supervisor token leaks (config dump, logs, error message), an attacker has a username/password oracle they can hammer. The legacy implementation has had years to audit; we'd be re-introducing the same surface fresh.
Two-credential UX. The whole point of the HA add-on path is that ingress already authenticates the user as their HA account. A separate password-gated public port that also uses HA credentials is a confusing middle-ground — most users either want ingress-only (no password prompt) or a dedicated dashboard password (decoupled from HA). Supporting "HA password but on the public port" sits in an uncanny valley.
Maintenance cost. Supervisor's auth API has changed shape over the years (token header rotation, response codes, rate limiting). Tracking those changes for a corner-case path is real ongoing work.
Alternative is already supported. Users who want HA-credential auth can run the add-on through ingress; users who want a public port can set using_password=True with a dedicated dashboard password. The combination this issue addresses (public port + HA credentials) has neither a strong use case nor a clean security story.
Suggested resolution: defer / decline unless someone surfaces a concrete user need. If we close this, document it in docs/ARCHITECTURE.md under "Reverse-proxy / public-port deployment" so the choice is explicit rather than just absent.
The legacy supervisor /auth path is only live when both--ha-addon is set AND DISABLE_HA_AUTHENTICATION is unset. Modern ingress-based deployments (the canonical add-on path) launch with DISABLE_HA_AUTHENTICATION=true because supervisor pre-authenticates ingress traffic upstream — the legacy code never reaches post_ha_addon_login on ingress. The supervisor /auth flow only matters when a user explicitly disables ingress, exposes a public port, and chooses "use HA credentials" instead of setting a dashboard password.
The new backend already covers both canonical deployments:
Ingress → trusted-site mode (auth bypass for pre-authenticated ingress traffic — same role as the legacy DISABLE_HA_AUTHENTICATION=true path)
Public port → dashboard password via the existing AuthController (same role as the legacy local-password fallback)
The supervisor /auth middle ground is a legacy artifact for a rare combination that has better alternatives today (set a dashboard password, or run a reverse proxy with whatever auth you prefer). Re-open if a real user hits this and the workarounds don't fit.
Activity
bdraco commentedon May 2, 2026
Cautionary note before anyone picks this up: we may not want to port this at all. Worth careful consideration before implementing.
Concerns:
http://supervisor/authfrom inside the add-on container ties dashboard auth to a network-internal HTTP endpoint that the dashboard otherwise has no business talking to. If the supervisor token leaks (config dump, logs, error message), an attacker has a username/password oracle they can hammer. The legacy implementation has had years to audit; we'd be re-introducing the same surface fresh.using_password=Truewith a dedicated dashboard password. The combination this issue addresses (public port + HA credentials) has neither a strong use case nor a clean security story.Suggested resolution: defer / decline unless someone surfaces a concrete user need. If we close this, document it in
docs/ARCHITECTURE.mdunder "Reverse-proxy / public-port deployment" so the choice is explicit rather than just absent.marcelveldt commentedon May 2, 2026
I think we should drop this now that we've split up the ingress flow from the normal site.
bdraco commentedon May 2, 2026
Closing as won't-fix.
The legacy supervisor
/authpath is only live when both--ha-addonis set ANDDISABLE_HA_AUTHENTICATIONis unset. Modern ingress-based deployments (the canonical add-on path) launch withDISABLE_HA_AUTHENTICATION=truebecause supervisor pre-authenticates ingress traffic upstream — the legacy code never reachespost_ha_addon_loginon ingress. The supervisor/authflow only matters when a user explicitly disables ingress, exposes a public port, and chooses "use HA credentials" instead of setting a dashboard password.The new backend already covers both canonical deployments:
DISABLE_HA_AUTHENTICATION=truepath)AuthController(same role as the legacy local-password fallback)The supervisor
/authmiddle ground is a legacy artifact for a rare combination that has better alternatives today (set a dashboard password, or run a reverse proxy with whatever auth you prefer). Re-open if a real user hits this and the workarounds don't fit.docs: note re-enabling supervisor /auth is gated on brute-force prote…