HAProxy: TLS 1.3 only, ECDSA and RSA, HSTS without subdomains
We have not run this one. It is built from the HAProxy documentation. Test it before you rely on it.
Needs an HAProxy build with OpenSSL 3.5 or later. Each .pem file holds the certificate chain and its key. Swap example.com and the paths for your own.
global
ssl-default-bind-options ssl-min-ver TLSv1.3 no-tls-tickets
ssl-default-bind-curves X25519MLKEM768:X25519:secp384r1
frontend web
mode http
bind :80
bind :443 ssl crt /etc/haproxy/certs/example.com.ecdsa.pem crt /etc/haproxy/certs/example.com.rsa.pem alpn h2,http/1.1
http-request redirect scheme https code 301 unless { ssl_fc }
http-response set-header Strict-Transport-Security "max-age=63072000"
http-response set-header X-Content-Type-Options "nosniff"
http-response set-header Referrer-Policy "strict-origin-when-cross-origin"
default_backend app
backend app
mode http
server app1 127.0.0.1:8080
What it does
- Accepts TLS 1.3 only. See protocol versions.
- Offers the hybrid post-quantum group first, then X25519 and P-384. P-256 is not offered. See post-quantum key exchange.
- Expects two certificates: ECDSA P-384, and RSA 3072 for clients that can't use ECDSA. See certificate strength.
- Sends HSTS for this hostname only. Subdomains are not covered. See HSTS.
- Turns session tickets off. 0-RTT is off unless you add
allow-0rtt. See 0-RTT and session tickets.
What it leaves out
- OCSP stapling. See revocation.
- A Content-Security-Policy. It depends on what your pages load.
- HTTP/3. We haven't tested it.
Check what you deployed
openssl s_client -connect example.com:443 -groups X25519MLKEM768 -brief </dev/null
weeb probe example.com --fix
The first should print Negotiated TLS1.3 group: X25519MLKEM768. The second (get weeb) should show TLS 1.0 and 1.1 as unavailable, and TLS 1.2 too.