m8.6: Optional TLS / HTTPS
Adds optional HTTPS (ADR-0019). It is off by default (the zero-config loopback-HTTP experience is unchanged) and designed to be trivial to turn on.
Enabling HTTPS
- One variable (self-signed):
EPIPHANY_TLS=ongenerates a self-signed certificate into{data_dir}/server/tls/on first run and serves HTTPS. No certificate to obtain; browsers show the usual self-signed warning, which is expected for local and internal use. - Your own certificate: set
EPIPHANY_TLS_CERTandEPIPHANY_TLS_KEYto PEM file paths (takes precedence over self-signed).
TLS serves on the same EPIPHANY_BIND address; the startup log shows https://. Graceful shutdown is preserved.
Implementation
Pure-Rust (rustls with the ring provider, rcgen for self-signed generation) behind a tls cargo feature, so the single static binary holds and the default core build stays lean. These release binaries are built with TLS included; a from-source build adds --features tls (and needs the platform C toolchain, since the crypto is compiled). The HSTS header added in m8.5 becomes effective once TLS is on.
Backward compatible: with no TLS configuration the server serves HTTP exactly as before. Verified end-to-end (HTTPS request to a self-signed instance), with the TLS feature linted on every platform in CI.