Lesson 8 of 9 · 21m
A Sane TLS Configuration Baseline
Modern TLS configuration is mostly subtraction — TLS 1.2/1.3, ephemeral key exchange, AEAD ciphers, correct chain serving, and controlled compatibility exceptions.
TLS configuration has a culture of copy-pasted cipher strings from 2014. Most production services do not need a custom cryptography essay. They need TLS 1.2 and 1.3, forward secrecy, AEAD ciphers, correct certificates, and a small number of explicit compatibility decisions.
The baseline
For a modern internet-facing service, enable TLS 1.3, keep TLS 1.2 only if real clients need it, disable TLS 1.0 and 1.1, require ephemeral key exchange and AEAD suites, and leave compression disabled.
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_certificate /etc/nginx/pki/api.fullchain.pem;
ssl_certificate_key /etc/nginx/pki/api.key;
ssl_session_timeout 1d;
ssl_session_cache shared:TLS:20m;
ssl_session_tickets off;ssl_session_tickets off is a forward-secrecy and key-management tradeoff. Some large deployments enable tickets with rotating keys instead. Know why you chose yours.
Let TLS 1.3 do its job
TLS 1.3 mandates forward secrecy, uses modern AEAD suites, and simplifies negotiation. If clients support it, prefer it and stop tuning like it is 2009. TLS 1.2 remains common; acceptable suites use ECDHE and AEAD, such as TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 or the ChaCha20-Poly1305 equivalent.
Static RSA key transport, CBC suites, RC4, DES, and export crypto are history. If a vendor requires one, isolate the service and write down the exception.
Certificate hygiene is part of configuration
Strong ciphers do not compensate for serving the wrong chain. Verify that the fullchain includes leaf and intermediates, private key permissions are restrictive, SNI selects the intended certificate, and certificate and key match:
openssl x509 -in api.crt -noout -pubkey | openssl sha256
openssl pkey -in api.key -pubout | openssl sha256HSTS is a commitment
HTTP Strict Transport Security tells browsers to use HTTPS for a period of time. Start conservatively:
Strict-Transport-Security: max-age=300Move to long durations and includeSubDomains only after every subdomain is ready. preload is a public commitment and difficult to undo.
Before disabling old protocol support, inspect real handshake versions in load balancer or CDN telemetry. Scope compatibility exceptions by listener or hostname where possible instead of weakening the entire estate for one ancient scanner.
Field notes
- Prefer modern library defaults over giant cipher strings unless compliance requires otherwise.
- Use
testssl.shor SSL Labs for evidence, not as a score-chasing game. - TLS termination at a CDN changes which configuration matters; origin TLS still matters.
- Document exceptions with expiry dates. Permanent exceptions become load-bearing.
- Verify process reload behavior after changing certificates; file timestamps are not proof.
Was this lesson helpful?