Skip to content

docs(038): fold east-west QUIC in as a requirement and reassess the whole - #943

Merged
bpalermo merged 5 commits into
mainfrom
docs/038-fold-quic
Sep 26, 2026
Merged

bpalermo merged 5 commits into
mainfrom
docs/038-fold-quic

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

The proposal carried QUIC as a "does NOT deliver" appendix, deferred on a security-model objection that upstream has since resolved in the direction that preserves aether's invariant (envoyproxy/envoy #47076, in the pinned snapshot). A capture path that is the foundation for a second, identity-bearing traffic class is a different proposal from one that only fixes plaintext selection — so this restructures rather than appends.

What changes

Requirements R1–R6. Two traffic classes on one path — plaintext per-service UDP and the QUIC mesh transport — with the destination port class as the discriminator:

destination port class security
18008 / 18009 mesh transport → QUIC listener, require_client_certificate, same validation_context as TCP mTLS, identity-bearing
a declared UDP service port plaintext → udp_proxy matcher on DestinationIPInput plaintext, as today
anything else not captured —

The mesh ports are constants; the service ports come from PORT_PROTOCOL_UDP (#933/#934), so the CNI rule set is derived from declared facts.

Phases 4 and 5 added. Phase 4 is the QUIC transport: inbound QUIC on UDP:18008 beside TCP:18008 with the same validation context and SDS secrets as the TCP inbound; an HTTP/3 upstream presenting the source's client cert; the east-west gateway on UDP:18009 last. Resumption and early data off, gated, until the pin passes #47219 (R4). Phase 5 is TCP capture → TPROXY, gated on the 0xae7e mark analysis and on Phase 4 being on in a soak — not for symmetry, because TCP and QUIC on two capture mechanisms is the split that produced #916.

Phase 1 gains a capture-mode parameter (R6) so Phase 5 is a flag flip, and must pick a divert mark disjoint from 0xae7e.

Flagged, not decided

  • D1 — the plaintext UDP dial spelling. Today :18081 only. The per-service-port design implies the service's application port. Recommendation: adopt it, keep :18081 one release.
  • D2 — the divert mark.
  • Q1–Q4 — sharpest is Q2: does transport_socket_matches select a QUIC upstream transport the way it selects a TLS one? That decides whether Phase 4's outbound is one cluster or one per source.

Alternatives

Adds a separate port for QUIC (rejected, R3, pinned by #942) and QUIC via HBONE/CONNECT-UDP (rejected on 031's grounds). Do nothing downgraded from legitimate to weaker-now — #931 showed the plaintext path had been silently broken for its whole life.

Docs only. Refs #916.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…hole

The proposal carried QUIC as a "does NOT deliver" appendix, deferred on a
security-model objection that upstream has since resolved in the direction that
preserves aether's invariant (envoyproxy/envoy #47076, in the pinned snapshot).
A capture path that is the foundation for a second, identity-bearing traffic
class is a different proposal from one that only fixes plaintext selection, so
this restructures rather than appends.

WHAT CHANGES

Requirements section (R1-R6). Two traffic classes on one path -- plaintext
per-service UDP and the QUIC mesh transport -- with the destination port class
as the discriminator, so a plaintext datagram can never be offered to a QUIC
chain or vice versa. The mesh ports are constants; the service ports come from
the registry's PORT_PROTOCOL_UDP (#933/#934), so the CNI rule set is derived
from declared facts.

Phases 4 and 5 added. Phase 4 is the QUIC transport itself: inbound QUIC on
UDP:18008 beside TCP:18008 with require_client_certificate and the SAME
validation_context and SDS secrets as the TCP inbound; an HTTP/3 upstream that
presents the source's client cert; the east-west gateway on UDP:18009 last.
Resumption and early data off, gated, until the pin passes #47219. Phase 5 is
TCP capture moving to TPROXY, gated on the 0xae7e mark analysis and on Phase 4
being on in a soak -- not for symmetry, because TCP and QUIC on two capture
mechanisms is the split that produced #916.

Phase 1 now builds the rule set with a capture-mode parameter (R6) so Phase 5
is a flag flip, and must choose a divert mark disjoint from 0xae7e.

Two decisions flagged rather than made (D1 the plaintext dial spelling --
recommendation: the application port, with :18081 kept one release; D2 the
divert mark) and four open questions, the sharpest being Q2: whether
transport_socket_matches selects a QUIC upstream transport, which decides if
Phase 4's outbound is one cluster or one per source.

Alternatives gains "a separate port for QUIC" (rejected, R3, pinned by #942)
and "QUIC via HBONE/CONNECT-UDP" (rejected on 031's grounds). "Do nothing" is
downgraded from legitimate to weaker-now: #931 showed the plaintext path had been
silently broken for its whole life.

Refs #916

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo and others added 4 commits September 25, 2026 23:00
…w TCP

Folds the one-number-both-transports rule (R3) one level down, which decides D1
and simplifies two phases.

A client dials <svc>.<ns>.<mesh-domain>:18082 for a UDP service exactly as it
does for a raw-TCP one; only the transport differs. That gives plaintext UDP
exactly ONE dialed port, so:

  - Phase 2 collapses from "one transparent listener per distinct UDP service
    port" to ONE listener on UDP:18082 per pod, matcher on destination IP.
    Listener count no longer scales with services or ports.
  - Phase 1's rule set becomes three literals (18082, 18008, 18009). No
    declared-port-set plumbing.
  - Q1 (how the CNI learns the declared UDP port set) is dissolved.
  - The CNI never needs to know which application ports UDP services bind;
    UDPLoadAssignment already rewrites the udp: cluster to the app port, which
    is exactly how tcp: clusters reach a raw-TCP backend from the shared :18082.

This is the TCP floor's shape under 037, transport for transport. The 09-23
draft's "distinct UDP port set is small" reasoning is preserved in the text as
history; the folded rule makes that set exactly one.

:18081/udp stays captured and routed to the plaintext class for one release.
ProxyTCPOutboundPort's name and the CNI's "18082 is a TCP spelling" comment go
stale under this rule; Phase 1 corrects the comment and may rename the constant.
The east-west port gate extends to 18082 in Phase 1 and 18008 in Phase 4.

Refs #916

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…PR plan

D2 decided: CaptureDivertFwMark = 0xae71, same 0xae7x family as the passthrough
mark so they read as related, a distinct value so neither rule matches the
other's traffic, disjoint from kube-proxy's masked marks. Phase 1 pins both.

Q2 restated. The first phrasing asked whether transport_socket_matches selects
a QUIC upstream transport -- but aether retired that shape in #842. Per-source
identity is ONE upstream TLS socket whose custom_tls_certificate_selector (the
filter_state_override cert mapper) resolves the client cert per connection from
a hashable filter-state key, which also partitions the pool per (host, source
identity). So the real questions are Q2a (does QuicUpstreamTransport honour the
mapper) and Q2b (does the HTTP/3 pool fold the hashable key). Q2b=no would
re-open the #831 leak class on QUIC, which fails open. Asked of the Envoy tree;
the plan carries both branches.

Plan added: 12 PRs across Phases 1-5 with sizes and gates, every gate named as
something that must be seen red. Notable: Phase 2a must extend
TestUDPCaptureListenerResolvesAgainstCDS by hand because the #895 chain->CDS
gate cannot see a connection-less listener; Phase 4a's envoy_validate gate must
FAIL a chain missing the two resumption falses; Phase 4b's //test/mtlspool gains
a QUIC arm. Phase 4 must not merge before Phase 3a's selection assertion exists,
or the two traffic classes share a path with no e2e proving they stay apart.

Refs #916

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
… source SA

Q2a = no, Q2b = yes, established at 13144fb and verified against the file at
that commit.

Q2a: QuicClientTransportSocketFactory::create rejects a certificate selector at
config load (quic_client_transport_socket_factory.cc:93-94, UnimplementedError
"Client certificate selector not supported on QUIC"). The client cert is
installed once per crypto config via SSL_CTX_set_chain_and_key on the shared
QUICHE SSL_CTX (line 80), not per connection, because the QUICHE handshaker needs
direct access to the private key. Loud, not silent.

Q2b: the HTTP pool key is protocol-agnostic (ClusterEntry::httpConnPool calls
transportSocketFactory().hashKey), and QuicClientTransportSocketFactory inherits
CommonUpstreamTransportSocketFactory::hashKey, so HTTP/3 pools partition per
(host, source identity) exactly as h2 pools do.

Net: pooling does not reopen #831, but partitioning alone does not give
per-source identity because the presented certificate is the cluster's. So
Phase 4b is one QUIC cluster per source ServiceAccount -- the pre-#842 shape,
for QUIC only, bounded by local ServiceAccounts rather than mesh services and
never touching the TCP clusters. The mtlspool QUIC arm still matters: the
pooling guarantee is real even though the cert is per cluster.

D3 added: whether to pursue a per-connection selector for QUIC upstream in
Envoy. It is an Envoy limitation, not a design constraint, and if landed Phase
4b collapses back to one cluster. Unsized; Bruno's call; the plan does not
depend on it.

Refs #916

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit 9234170 into main Sep 26, 2026
23 checks passed
@bpalermo
bpalermo deleted the docs/038-fold-quic branch September 26, 2026 02:19
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