Skip to content

fix(proxy): TCP floor OnNoMatch must reference the bare node SPIFFE ID - #299

Merged
bpalermo merged 1 commit into
mainfrom
fix/tcp-floor-onnomatch
Jun 24, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/tcp-floor-onnomatch

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Follow-up to #298. InjectUpstreamTCPMTLS still set OnNoMatch to <nodeSpiffeID>:tcp — dangling now that the TCP matches are bare-named. The tcp_proxy fallback then selected no transport socket → upstream mTLS never formed (upstream_cx_total=0) → reset. Fix: OnNoMatch → bare node SPIFFE ID.

Follow-up to the transport_socket_match rename: InjectUpstreamTCPMTLS still set the
matcher's OnNoMatch to `<nodeSpiffeID>:tcp`, a dangling reference now that the TCP
matches are bare-named. A captured TCP-floor connection whose netns filter state
doesn't resolve a per-source match (the tcp_proxy fallback) then selected no transport
socket at all, so the upstream mTLS connection never formed (upstream_cx_total=0) and
the downstream reset. Point OnNoMatch at the bare node SPIFFE ID so the fallback
presents the node identity over the aether-tcp ALPN, matching the inbound floor chain.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
@bpalermo
bpalermo merged commit 40745c4 into main Jun 24, 2026
7 checks passed
@bpalermo
bpalermo deleted the fix/tcp-floor-onnomatch branch June 24, 2026 13:13
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant