Add listener-wide TLS version and cipher options - #129
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes TLS protocol versions and cipher selection on the HTTPS listener, under
proxy.https.tls.All fields optional; each absent one keeps Sōzu's default.
Scope: listener-wide, not per-route
The board item was "Per-router TLS options", but Sōzu applies TLS versions and ciphers at bind time — they're a property of the listener (the address:port), not the frontend/route.
RequestHttpFrontendcarries no TLS fields. So per-route TLS options are not possible on this proxy; these are listener-wide, shared by every hostname on the HTTPS port. That covers the actual need (hardening: refuse TLS 1.2, restrict ciphers). The docs say so plainly.Details worth noting
min/maxare expanded into the enabled versions they span (1.2 and 1.3 only).max_version < min_versionfails startup rather than emptying the list.cipherslist, rustls names. Sōzu's worker reads ciphers only from itscipher_listfield (itscipher_suitesfield is never consulted), using rustls names for both TLS 1.2 and 1.3. So there's a singleciphersfield, not two. Listing only 1.2 suites leaves no 1.3 suite enabled — the doc calls this out.Verified
Unit tests cover the version expansion (each min/max combination), the inverted-range and unknown-version rejections, and the cipher forwarding. An e2e test sets
min_version: "1.3"on the listener and asserts a TLS 1.2 client is rejected at the handshake while a 1.3 client passes version negotiation.Review
Codex caught two cipher bugs in the first pass — the dead
cipher_suitesfield and OpenSSL-vs-rustls cipher naming — both fixed (singleciphersfield, rustls names). Re-reviewed clean.