Repository navigation
fix(listener): bump esockd to 5.17.9 - #19600
Merged
Merged
Conversation
5.17.9 over the pinned 5.17.7 brings:
* 5.17.9, esockd#235: read the PROXY V2 SSL TLVs ahead of the inner TLS
session. esockd#218 made the certificate accessors delegate to the
inner ssl_socket unconditionally on an SSL listener, which made the
TLV path unreachable. A proxy that terminates mTLS and re-encrypts
the hop to EMQX then lost the client common name. The header comes
from the hop closest to the client, so it wins when it carries
certificate information; the inner session is used when it does not.
This restores the behaviour of 5.8 and 5.10, which pin esockd 5.13.0
and 5.14.0 and predate esockd#218.
* 5.17.8: listener socket option fixes for v6only and
{tune_buffer, false}, rejection of invalid socket tuning options, and
rejection of fragmented PROXY V1 headers.
Verified with mix deps.get that the tag resolves and the fetched tree
carries the change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev-60 #19600 +/- ##
==========================================
+ Coverage 85.53% 85.77% +0.23%
==========================================
Files 1175 1175
Lines 89514 89995 +481
==========================================
+ Hits 76570 77194 +624
+ Misses 12944 12801 -143 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Release version: 6.0.5, 6.1.6, 6.2.4, 6.3.3, 7.0.0
Introduced in: 6.0.0
Summary
Bump
esockdfrom 5.17.7 to 5.17.9 inmix.exs.5.17.9 — PROXY V2 SSL TLVs take precedence (emqx/esockd#235)
A proxied connection to an SSL listener has two places a client certificate can
come from, and which one holds it depends on where TLS was terminated.
esockd#218 made
peercert/1,peer_cert_subject/1andpeer_cert_common_name/1delegate to the inner
ssl_socketunconditionally on an SSL listener, which madethe TLV path unreachable.
tls: passthrough) + TLS listener, client mTLS to EMQXRows C and D are a 5.x to 6.x upgrade regression: 5.8 and 5.10 pin esockd 5.13.0
and 5.14.0, which predate esockd#218, while 6.0 and later pin 5.17.x. Row D does
not fail loudly today.
esockd now reads the SSL TLVs when the header carries certificate information, and
the inner session when it does not. The PROXY header comes from the hop closest to
the client, and enabling
proxy_protocolon a listener already declares theupstream trusted — the peer address comes from the same header. No new
configuration option.
peersni/1follows the same rule for the authority TLV.5.17.8 — listener socket options
Also included, since this branch is on 5.17.7: correct handling of
v6onlyand{tune_buffer, false}, rejection of invalid socket tuning options rather thanapplying them, and rejection of fragmented PROXY V1 headers.
Verification
mix deps.getresolvesesockd 5.17.9and the fetched tree carries the change.pre-push-sanity.sh dev-60: ALL SANITY CHECKS PASSED.Note for the sync chain
dev-63pins esockd 5.17.8, so the forward sync will conflict on that single linein
mix.exs. Keep 5.17.9.PR Checklist
changes/ee/(feat|perf|fix|breaking)-<PR-id>.en.mdfiles