Repository navigation
fix(proxy): TCP floor transport_socket_match name must be the bare SPIFFE ID - #298
Merged
Merged
Conversation
…IFFE ID The first real TCP-floor e2e (an HTTP echo workload registered appProtocol=tcp, exercised as a raw mTLS passthrough) reset on the upstream. Root cause: the TCP floor cluster (tcp:<svc>) named its transport_socket_matches "<spiffe-id>:tcp", but the shared UpstreamTransportSocketMatcher selects the match by the source pod's BARE SPIFFE ID (egress.go uses the same matcher for HTTP and TCP clusters). So the matcher asked for "<spiffe-id>", the cluster only had "<spiffe-id>:tcp" → no match → Envoy fell back to the default transport socket → no "aether-tcp" ALPN → the inbound :15008 floor chain (which matches application_protocols:["aether-tcp"]) didn't match, the connection hit an HCM chain expecting a different handshake, and reset. The ":tcp" suffix was an unnecessary "keep distinct" guard — transport_socket_matches are scoped per cluster, and the HTTP <svc> and TCP tcp:<svc> clusters are distinct, so the bare-ID names never collide. Drop the suffix so the existing matcher selects them. Validated on talos: curl echo-tcp.aether.internal:18081 (HTTP over the TCP-mTLS floor) -> 200 after the fix (was a connection reset). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
bpalermo
added a commit
that referenced
this pull request
Jun 24, 2026
…sport path (#304) The bespoke "aether-tcp" ALPN forced a duplicated TCP-specific transport-socket stack (UpstreamTCPTransportSocket, the :tcp matches/OnNoMatch) parallel to the proven HTTP one — and all three earlier floor fixes (#298/#299/#301) lived in that copy, yet the upstream mTLS still never connected (upstream_cx_total=0). Collapse the demux onto the standard h2 ALPN instead: - Egress: UpstreamTCPTransportSocket now advertises NO ALPN (HTTP keeps "h2"); it otherwise reuses the same per-source matcher/matches machinery that already works. - Inbound :15008: the no-SNI HCM chain matches application_protocols:["h2"]; per-port HCM chains keep their port SNI; the TCP floor becomes the listener's DEFAULT chain (no match). Envoy precedence (server_names > application_protocols > default) routes h2+SNI → per-port, h2 → default-HCM, no-ALPN mTLS → the floor — no bespoke token. - Removed the AetherTCPALPN constant. This deletes the duplicated TCP transport stack that harbored the per-source-cert selection bug, so the floor rides the validated HTTP per-source mTLS path. Validate on talos: echo-tcp.aether.internal:18081 (HTTP over the mTLS TCP floor) -> 200. Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S Co-authored-by: Claude Opus 4.8 <[email protected]>
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.
First real TCP-floor e2e (HTTP echo registered
appProtocol=tcp, raw mTLS passthrough) reset on the upstream. Root cause:tcp:<svc>named itstransport_socket_matches<spiffe-id>:tcp, but the sharedUpstreamTransportSocketMatcherselects by the bare SPIFFE ID → no match → default socket → noaether-tcpALPN → inbound floor chain (ALPN match) doesn't match → reset. The:tcpsuffix was unnecessary (matches are per-cluster;<svc>vstcp:<svc>don't collide). Drop it. Validated:echo-tcp.aether.internal:18081→ 200 (was reset).