Warn or refuse when the dashboard is reachable off-host without TLS #1100

Closed
opened 2026-10-27 13:39:01 +00:00 by sam · 0 comments
Owner

Goal

A dashboard reachable from somewhere other than loopback serves TLS, or says at
startup that the session and provider tokens travel in clear.

Evidence

internal/webui/auth.go:125,252,260,268 set Secure: r.TLS != nil, so the cookie
is plaintext whenever the request did not arrive over TLS. The default binds are
loopback (internal/config/servicespec.go:115-117), so this only bites an operator
who publishes the port. gosec G124 flags all four cookies; every other attribute
(HttpOnly, SameSite) is already set.

Stop when

[ ] A non-loopback bind without TLS warns at startup, naming the cookie exposure,
or is refused.
[ ] The decision is written where someone deploying the dashboard will see it.

Notes

Warn or refuse: chose warn. archie-ui now logs a startup warning when the bind is non-loopback and [web].trust_forwarded_headers is not set, naming the session cookie and provider token travelling in clear. deployments/README.md 'Running the dashboard' records the decision and how to silence the warning behind a TLS proxy. Found and fixed in passing: IsLoopback(":8484") returned true, so a wildcard bind skipped the token requirement; commit a6ac2587. Commits a6ac2587, e01008ee. task check green.

Close reason

Closed


Imported from beads archie-core-6gh5 · GitHub #1519 · type bug · priority P1 · created 2026-10-08 · closed 2026-10-10

## Goal A dashboard reachable from somewhere other than loopback serves TLS, or says at startup that the session and provider tokens travel in clear. ## Evidence internal/webui/auth.go:125,252,260,268 set `Secure: r.TLS != nil`, so the cookie is plaintext whenever the request did not arrive over TLS. The default binds are loopback (internal/config/servicespec.go:115-117), so this only bites an operator who publishes the port. gosec G124 flags all four cookies; every other attribute (HttpOnly, SameSite) is already set. ## Stop when [ ] A non-loopback bind without TLS warns at startup, naming the cookie exposure, or is refused. [ ] The decision is written where someone deploying the dashboard will see it. ### Notes Warn or refuse: chose warn. archie-ui now logs a startup warning when the bind is non-loopback and [web].trust_forwarded_headers is not set, naming the session cookie and provider token travelling in clear. deployments/README.md 'Running the dashboard' records the decision and how to silence the warning behind a TLS proxy. Found and fixed in passing: IsLoopback(":8484") returned true, so a wildcard bind skipped the token requirement; commit a6ac2587. Commits a6ac2587, e01008ee. task check green. ### Close reason Closed --- _Imported from beads `archie-core-6gh5` · GitHub #1519 · type bug · priority P1 · created 2026-10-08 · closed 2026-10-10_
sam added the highbug labels 2026-10-27 13:39:01 +00:00
sam self-assigned this 2026-10-27 13:39:01 +00:00
sam closed this issue 2026-10-27 13:39:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1100