Skip to content

feat(038): per-pod HTTP/3 inbound on UDP:18008 — unconditional, same identity as the TCP inbound (Phase 4a) - #953

Merged
bpalermo merged 1 commit into
mainfrom
feat/quic-pr6-inbound
Sep 26, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/quic-pr6-inbound

Conversation

@bpalermo

@bpalermo bpalermo commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Ready — stacked on #952 + #954 (merged). On the previous pin TestEnvoyValidate/node_bootstrap.json was RED: at 13144fb the pinned Envoy rejects a QUIC downstream that requires a client certificate unless its trust anchor is a static trusted_ca — "QUIC downstream TLS context requires a client certificate but no validation_context.trusted_ca is configured" — and the mesh validates callers against the SDS-served bundle. envoyproxy/envoy#47623 (2026-09-25) lifts that; #952 bumps the pin to 1.40.0-dev.20260926.726d7ac, and the chart-pin PR that follows its release is what //test/envoy_validate:envoy_bin runs. With the pin at 719f66a (Envoy 726d7ac) the same fixture PASSES locally and in CI below — the proof this listener needed.

What

Every managed pod gets inbound_<pod>_h3: UDP on the TCP inbound's port (18008, R3 — pinned by a new port-role gate), in the pod netns, enable_reuse_port + quic_options, mTLS over QUIC with the pod's own SVID and the same client-certificate requirement and workload SAN pin (#843) as the TCP inbound, routing to the same app_<pod>_<port> clusters through the same inbound route.

  • Unconditional — no flag. One UDP socket per pod, inert until a per-source quic: cluster (Phase 4b) dials it; unconditional means it soaks under ordinary churn from the next deploy. The opt-in stays on the outbound side, where the per-SA cluster fan-out is.
  • No CNI change. Inbound QUIC arrives on the pod's eth0 from other nodes' proxies; the plan's udp dport 18008 divert would have sent a pod's own UDP to VIP:18008 into its own listener and is dropped.
  • One bare DownstreamTlsContext, two wrappers (downstreamTLSContext() → TLS socket for TCP, QuicDownstreamTransport for QUIC with ALPN ["h3"]), so the two transports cannot drift in what they accept. TestInboundQUICSharesTheTCPInboundTLSContext pins that byte-for-byte (ALPN aside).
  • R4 explicit: enable_resumption: false + enable_early_data: false on every mTLS QUIC chain — a resumed/0-RTT session carries a peer identity the destination never verified. Explicit even though #47219 made off the default at the new pin: defaults move.
  • Chains: default = primary port (no h2 ALPN to key on), server_names per non-primary HTTP port, none for a raw-TCP port (QUIC carries HTTP/3 only). SNI matching on a QUIC listener verified in the pinned source (envoy_quic_proof_source.cc passes the CHLO hostname into findFilterChain).
  • test/envoy_validate: node fixture carries the QUIC inbound; downstreamTLSPinned now unwraps QuicDownstreamTransport (an mTLS QUIC chain passed the Inbound validation context accepts any trust-domain member: pin a spiffe://<td>/ns/*/sa/* URI SAN prefix #843 check vacuously before); QUICChainsWithoutR4 asserted over every fixture; anti-vacuity tests for both.

Gates, each seen red

gate red state
TestNewInboundQUICListener EnableResumption dropped → "R4 enable_resumption must be EXPLICIT"
TestUnpinnedInboundChainsSeesThroughQUIC QUIC unwrap removed → "the QUIC unwrap is vacuous"
TestInboundPortIsSharedAcrossTransports const inboundQUICPort = 18010 → named in the failure
TestEnvoyValidate/node_bootstrap.json red now on the old pin (this is the proof #952 is needed)

Local: proxy + cache green and race-clean, lint clean, per-pod listener count tests 2 → 3.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…chains, one bare TLS context

Phase 4a of proposal 038, R2/R3/R4. Every managed pod now gets a second inbound
listener, inbound_<pod>_h3: UDP on the TCP inbound's port (18008 — R3, pinned
by the new port-role gate TestInboundPortIsSharedAcrossTransports), bound into
the pod's netns, reuse_port + quic_options, terminating mTLS over QUIC with the
pod's own SVID and the SAME client-certificate requirement and workload SAN pin
as the TCP inbound, routing to the same app_<pod>_<port> clusters.

Unconditional, not behind a flag: it is one UDP socket per pod, inert until a
per-source `quic:` cluster (Phase 4b) dials it, and unconditional means it
soaks under ordinary churn from the first deploy that carries it. The opt-in
stays on the OUTBOUND side, where the per-SA cluster fan-out is.

No CNI change: a QUIC datagram from another node's proxy arrives on the pod's
eth0 and is delivered to the socket by ordinary routing. The plan's "udp dport
18008 divert" was wrong — it would have sent a pod's own UDP to VIP:18008 into
its own inbound listener — and is dropped.

  proxy/transportsocket.go  downstreamTLSContext() extracted as the ONE bare
                            context; DownstreamTransportSocket wraps it in TLS,
                            InboundQUICTransportSocket in QuicDownstreamTransport
                            with ALPN ["h3"] and EXPLICIT enable_resumption:false
                            + enable_early_data:false (R4: a resumed or 0-RTT
                            session carries a peer identity the destination never
                            verified; explicit because defaults move).
  proxy/ingress.go          buildInboundHCM() shared by the TCP and QUIC chains;
                            NewInboundQUICListener: default chain = primary port,
                            server_names chain per non-primary HTTP port, NONE for
                            a raw-TCP port (QUIC carries HTTP/3 only). SNI matching
                            on a QUIC listener verified in the pinned source:
                            envoy_quic_proof_source.cc passes the CHLO hostname
                            into findFilterChain.
  cache                     listenerEntry.inboundQUIC on all three build paths
                            (AddPod, LoadListenersFromStorage, rebuildPodListenersLocked),
                            published beside the TCP inbound; untyped nil when
                            SPIRE is off.
  test/envoy_validate       node fixture carries the QUIC inbound; downstreamTLSPinned
                            UNWRAPS QuicDownstreamTransport (before: an mTLS QUIC
                            chain passed the #843 pin check vacuously);
                            QUICChainsWithoutR4 + the R4 assertion in the fixture
                            loop; anti-vacuity tests for both.

Gates, each seen red: TestNewInboundQUICListener with EnableResumption dropped
("R4 enable_resumption must be EXPLICIT"); TestUnpinnedInboundChainsSeesThroughQUIC
with the unwrap removed ("the QUIC unwrap is vacuous");
TestInboundPortIsSharedAcrossTransports on `const inboundQUICPort = 18010`.
Per-pod resource count tests: 2 → 3 listeners per pod.

STACKED ON #952. On the current proxy pin (13144fb) `envoy --mode validate`
rejects the node bootstrap: "QUIC downstream TLS context requires a client
certificate but no validation_context.trusted_ca is configured" — the QUIC
server side wanted a static trust anchor and the mesh validates against the
SDS-served bundle. envoyproxy/envoy#47623 (2026-09-25) lifts that; #952 moves
the pin to a snapshot that carries it, and this PR's TestEnvoyValidate is
expected RED until the chart pin follows.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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