Decide whether Edge Router should emit HSTS, on the admin host and optionally for proxied hosts #59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The cookie half of this is fixed in
78ae254, alongside #69. Rescoped to the HSTS question this issue raised as the separate decision it is.api.rsset the cookie'sSecureflag from theIsHttpsextension, whichtls.rsinserts only when ER itself terminated TLS — so the supported CDN/tunnel topology shipped the cookie without it. There are now not two definitions of "is this request HTTPS" but one:access::request_is_https(the TLS marker, or atrust_forwarded_forlistener reportingX-Forwarded-Proto: https), used by the redirect, the session-route guard and the cookie. As this issue noted, the trust gate fromf02af79is what made that safe, and spoofing can only ever addSecure.What remains: HSTS
There is no
Strict-Transport-Securityheader anywhere insrc/. The attack this issue described is only partly closed by the cookie fix:Securestopser_sessionbeing sent overhttp://, but nothing stops the browser trying plaintext in the first place, and a login overhttp://is now refused rather than redirected (#69), which a user may read as a broken dashboard rather than a scheme problem.Decisions needed:
max-age.includeSubDomains. If it is offered at all it should be per-service, opt-in, withmax-ageexplicit rather than defaulted, and the docs should say plainly that it cannot be un-done quickly.Worth doing (1) and deferring (2) until someone asks.
Session cookie lacks Secure behind a TLS-terminating proxy, and there is no HSTSto Decide whether Edge Router should emit HSTS, on the admin host and optionally for proxied hostsDeferred: not requested (James, 2026-10-27). Milestone removed, left open.
His rule, which now applies to this repo generally: don't optimise early. If nothing asks for a thing and it brings no real benefit, don't build it — and don't put it forward as a decision either. Defects with a real attack or failure path still get fixed; #63 and #69 are the examples.
HSTS is a feature nobody has asked for. The cookie half of this issue was a real defect and is fixed (
78ae254):Secureis now set whenever the client's hop was TLS, including behind a trusted terminating proxy. What is left is header emission, which guards against a browser tryinghttp://first — and every fleet host reaches the dashboard over TLS, while a cleartext login is now refused outright rather than redirected (#69).If it is ever picked up, the decisions in the comment above still stand: admin host only is the low-risk case, proxied hosts are a much larger commitment because an operator-set HSTS on a shared parent domain cannot be undone quickly, and preload should probably never come from Edge Router's config.