Repository navigation
Add an HTTPS listener for the web dashboard — prerequisite for OIDC, and the shared token currently crosses the LAN in the clear #2562
Description
Activity
- added 4 commits that reference this issue
on Aug 23, 2026 Shipped in #2568 (merged to
devascc335836).web.network.tlstakes a PKCS#12 bundle or a PEM pair — one form, never both — applied to the network listener only. Loopback stays plain HTTP because the certificate names the LAN address rather thanlocalhost. Redirect-versus-refuse settled by mechanism: one port cannot speak both schemes, so a plain-HTTP client fails the handshake, and a second HTTP port to redirect from would reopen the surface this closes. The session cookie'sSecureflag became per-request, since one host now serves both schemes. Fails closed exactly as an undecryptable token does — missing, unreadable, ambiguous, not-yet-valid or expired means Critical then loopback-only — with a 30-day warning before an expiry takes the dashboard down.Four things the issue did not anticipate, all found by running it rather than reasoning about it:
- Key storage flags are wrong in two opposite directions.
EphemeralKeySetlooks obviously right; Windows accepts it and then fails every handshake, and macOS refuses the flag outright.MachineKeySeton Windows (noPersistKeySet, so disposal removes the key material), default key set elsewhere. - Both loaders dropped the intermediate chain.
CreateFromPemFilematerializes only the first certificate in a PEM andLoadPkcs12FromFileonly one of a bundle, so a leaf+intermediate file — exactly what this issue's own config doc told operators to supply — served an incomplete chain. Measured withopenssl s_client -showcerts: two certificates on disk, one on the wire. Now two. - The leaf could be the root. "First certificate with a private key" served
CN=darling-test-rootfrom a bundle exported wholesale off a CA machine. The leaf is now the terminal node — holds a key AND issued nothing else in the bundle. - The certificate must carry an iPAddress SAN. The anti-DNS-rebind Host allowlist accepts only
localhost, a loopback literal, or the listen IP, so a LAN client cannot reach the dashboard by DNS name — which makes the DNS-name certificate an internal CA issues by default permanently unusable here. The service now says so at startup instead of leaving it to a browser warning.
That last one led to #2569, filed separately: a wildcard
listen(0.0.0.0) makes the same guard refuse every LAN request with a 400, and that is what the compose distribution ships.Also corrected two doc comments stale since #1649 that still claimed loopback passes tokenless while exposed, and
--configure-networknow reports TLS state alongside listen/allowFrom.#2550 (OIDC) is unblocked — this was its prerequisite.
- Key storage flags are wrong in two opposite directions.
- added a commit that references this issue
on Aug 24, 2026
Erik's call, 2026-08-23: yes, the product gets an HTTPS listener. This is the prerequisite #2550 (OIDC) is blocked on, and it is worth having on its own.
Where things stand
grep -c UseHttpsacrossDarling/returns 0.DarlingWebHostServicecallsoptions.Listen(...)with no TLS configuration at all, so the dashboard is plain HTTP in every mode.Two consequences:
redirect_uri, with the near-universal exception ofhttp://localhost— which is the loopback case, the one mode that does not need OIDC. Network mode, which does, is the mode that cannot have it.SameSite=Strictcookie, CIDR allowlist, Host-header anti-rebind — but all of it rides on an unencrypted transport once the listener is not on loopback.That second point stands independently of OIDC. Even if #2550 never happens, a LAN-exposed dashboard behind a bearer token deserves TLS.
Decisions I will take unless told otherwise
web.network, resolved through the existingfile:/env:secret indirection (Darling on Linux: Docker/compose distribution of the service + TimescaleDB store #1804) rather than a new mechanism. Most people exposing this on a LAN have a cert, and an internal CA is the normal answer.web.networkalongsidelisten/allowFrom/token, and is therefore file-only and restart-only, matching what that block already logs about itself.What needs care
DarlingHostBinding's ladder). TLS must not change which addresses are bound or the CIDR gate's behaviour — those are separately reasoned and pinned inDarlingWebAuthTests.Darling/compose/) mounts secrets already; a certificate is one more of those, anddarling.sample.jsonshould show it.Not in scope
Certificate issuance or ACME. The product should consume a certificate, not manage a PKI.
Related: #2550 (OIDC, blocked on this), #1804 (the
file:/env:secret indirection to reuse), #1562 / #1649 (the current browser auth model this must not disturb).