Repository navigation
feat(038): east-west QUIC outbound — per-source quic: clusters selected by the source identity (Phase 4b) - #956
Merged
Merged
Conversation
…ed by the source identity
Phase 4b of proposal 038, R2/R4, opt-in per destination via
--east-west-quic-services (chart: agent.eastWestQuicServices; default none).
For each allow-listed destination and each LOCAL ServiceAccount the node gets
a cluster "quic:<svc>.<domain>@<ns>/<sa>" -- a clone of the h2 entry (same EDS
resource, subsets, outlier detection; no second load assignment), HTTP/3
protocol options, and a QuicUpstreamTransport that names that SA's SVID
statically, pins the destination SAN, carries the port SNI, offers h3 only and
sets MaxSessionKeys: 0. The identity has to be the cluster's own because
QuicClientTransportSocketFactory rejects a certificate selector; the per-SA
fan-out is the price, and the agent logs it ("east-west QUIC fan-out") whenever
it changes.
Selection is a route-level matcher cluster specifier
(envoy.router.cluster_specifier_plugin.matcher) keyed on the
envoy.matching.inputs.filter_state input for aether.source.spiffe_id -- the
plain-string stamp every mesh-originating chain already carries. One arm per
local identity -> its twin; on_no_match -> the h2 cluster, byte-identical to
before. No header, no new filter-state key: the plan's request_headers_to_add
+ cluster_header cannot work (route header mutations apply AFTER matching;
cluster_header is read AT matching), and both the plugin and the HTTP
filter-state input are present and compiled in at the 726d7ac pin. Applied on
BOTH route tables (out_http from the entry vhost, cap_http in the capture
vhost builder) with one predicate, so no route can name a twin the snapshot
does not carry. GAMMA (weighted) routes are untouched: GAMMA-routed
destinations stay h2 in this cut. A listed service is forced into the
dependency set. Twins are built only for the service's DEFAULT entry
(per-port and alias entries would multiply the fan-out) and only once the node
identity is served.
config/http.go Http3ProtocolOptions()
proxy/egress.go QUICClusterName, SourceSAKeyFromSpiffeID, QUICClusterFrom
proxy/transportsocket QUICUpstreamTransportSocket
proxy/route.go ApplyQUICClusterSelection, QUICSelectionArms
cache SetEastWestQUICServices (depMu, forced membership),
quicFanout/twinsFor/entryTwinsAndVhost, cap_http arms
cmd/root.go, chart --east-west-quic-services, agent.eastWestQuicServices,
chart 0.94.1 -> 0.95.0
test/envoy_validate QUICOutboundBootstrapJSON: source listener with the
identity stamp, inline route with the selection
plugin, the h2 cluster and two twins; upstreamTLSPinned
UNWRAPS QuicUpstreamTransport; QUICUpstreamsWithSessionCache
(R4 client side) asserted over every fixture; anti-vacuity.
`envoy --mode validate` on the pinned proxy ACCEPTS the fixture: the plugin
loads, the HTTP filter-state input resolves, the QUIC upstream with explicit
HTTP/3 options is accepted on an EDS cluster.
Gates, each seen red: TestQUICClusterFrom + the fixture's R4 check with
MaxSessionKeys dropped; TestUnpinnedMeshClustersSeesThroughQUIC with the unwrap
removed ("the QUIC unwrap is vacuous"); TestQUICFanoutPublishesPerSourceTwins
with the cap_http application removed ("the echo vhost on BOTH out_http and
cap_http must carry the selection plugin").
Not here: the //test/mtlspool HTTP/3 selection arm (quic-go server, negative
control on the arm map) and the e2e -- PR 7b/8. Pre-existing local flake
TestObservedUpstreamsStore_* filed as #955 (fails 6/6 on main locally, passes
in CI); untouched.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
marked this pull request as draft
September 26, 2026 17:53
…Ns (aether#957 workaround) Envoy's QUIC client verifies the leaf against the SNI as a DNS hostname AFTER any configured validator succeeds (envoy_quic_proof_verifier.cc); only accept_untrusted skips it. The h2 path's bare-port SNI matched no DNS SAN, so every mTLS HTTP/3 handshake failed with a verified peer (#957). The upstream fix is in flight; this is the workaround the phase ships: - proxy.QUICServerName(port, authority) = "<port>.<svc>.<ns>.<meshDomain>" is the SNI every quic: twin presents (cache twinsFor) and the server_names the HTTP/3 inbound matches per non-primary port; the primary port's name lands on the default chain. QUIC chains are now named by port, not by SNI. NewInboundQUICListener takes meshDomain. - The e2e workloads' ClusterSPIFFEID issues "<sa>.<ns>.<mesh>" and "*.<sa>.<ns>.<mesh>" DNS SANs (dnsNameTemplates) -- identity stays the URI SAN pin; the DNS SANs only satisfy the QUIC client's check. - Gates seen red with QUICServerName returning the bare port: TestQUICServerName, TestQUICClusterFrom, TestNewInboundQUICListener, TestQUICFanoutPublishesPerSourceTwins, and envoy_validate's new TestQUICUpstreamSNIIsAHostname (QUICUpstreamsWithPortSNI). - 038 Q5, getting-started and the chart value document the prerequisite. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
marked this pull request as ready for review
September 26, 2026 18:50
This was referenced Sep 26, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 26, 2026
…IC; only weighted splits stay h2 (#961) (#964) ApplyQUICClusterSelection reaches every route on the vhost whose action names the h2 cluster: the default route and a GAMMA rule whose single backendRef is the parent Service (it renders as the same `cluster:` action). That rule rides QUIC with the caller's own twin exactly like the default route; nothing is lost. What stays h2 is a WeightedClusters action -- the matcher plugin's action names ONE cluster, so a per-source weighted split has no representation. #956 said "GAMMA stays h2"; this makes the statement exact instead of narrowing the feature. - route.go: the doc says which routes are reached and why the weighted shape is a representation limit, not a policy. - TestApplyQUICClusterSelection: a single-backend rule to the parent IS selected; a single-cluster rule to another service is left alone. - e2e/eastwest-quic.sh: E4b applies a single-backendRef HTTPRoute (with a request-header filter so its liveness is observable on the data, since the backend is the parent itself) and asserts it rides each caller's own twin over HTTP/3; E4's weighted case unchanged. Closes #961. Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Fable 5.1 <[email protected]>
This was referenced Sep 27, 2026
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.
Phase 4b of proposal 038 (after #953's inbound). Opt-in per destination:
--east-west-quic-services/agent.eastWestQuicServices(default none). Chart → 0.95.0.What
quic:<svc>.<domain>@<ns>/<sa>cluster per (allow-listed destination × local ServiceAccount) — a clone of the h2 entry (same EDS resource, subsets, outlier detection; no second load assignment), HTTP/3 protocol options,QuicUpstreamTransportnaming that SA's SVID statically, destination SAN pin,<port>.<authority>SNI (see the 038 Phase 4b blocker: Envoy's QUIC client requires the server leaf's DNS SAN to match the SNI hostname — SVIDs have only URI SANs, the mesh's SNI is the port #957 section),h3ALPN,MaxSessionKeys: 0(R4 client side). The identity has to be the cluster's own:QuicClientTransportSocketFactoryrejects a certificate selector. The fan-out (local SAs × listed services) is logged whenever it changes.envoy.router.cluster_specifier_plugin.matcher) keyed on theenvoy.matching.inputs.filter_stateinput foraether.source.spiffe_id— the plain-string stamp every mesh-originating chain already carries. Arms: local identity → its twin;on_no_match→ the h2 cluster (byte-identical to before). No header, no new filter-state key. The plan'srequest_headers_to_add+cluster_headercannot work: route header mutations apply after matching,cluster_headeris read at matching. Both the plugin and the HTTP filter-state input are registered and compiled in at the726d7acpin.out_httpandcap_http) with one predicate, so a route can never name a twin the snapshot doesn't carry. GAMMA weighted routes untouched (GAMMA destinations stay h2 in this cut). A listed service is forced into the dependency set. Only the service's default entry gets twins, and only once the node identity is served.test/envoy_validate: a newquic_outbound_bootstrap.json— source listener with the identity stamp, inline route with the selection plugin, the h2 cluster and two twins.envoy --mode validateon the pinned proxy accepts it, which proves the plugin loads, the HTTP filter-state input resolves, and a QUIC upstream with explicit HTTP/3 options is accepted on an EDS cluster.upstreamTLSPinnednow unwrapsQuicUpstreamTransport(an unpinnedquic:cluster passed vacuously before);QUICUpstreamsWithSessionCacheasserted over every fixture.Gates, each seen red
TestQUICClusterFrom+ fixture R4 checkMaxSessionKeysdropped → "R4 client side: MaxSessionKeys must be EXPLICIT" / "QUIC upstream clusters without explicit max_session_keys:0"TestUnpinnedMeshClustersSeesThroughQUICTestQUICFanoutPublishesPerSourceTwinscap_httpapplication removed → "the echo vhost on BOTH out_http and cap_http must carry the selection plugin"TestQUICUpstreamSNIIsAHostname(envoy_validate) +TestQUICServerName/TestQUICClusterFrom/TestNewInboundQUICListener/ the fan-out test's SNI assertQUICServerNamereturning the bare port → all five red#957 workaround (path B) — cf1c18f
The mtlspool HTTP/3 arm found that Envoy's QUIC client verifies the leaf against the SNI as a DNS hostname after any validator succeeds (
envoy_quic_proof_verifier.cc); onlyaccept_untrustedskips it, so the h2 path's bare-port SNI failed every mTLS HTTP/3 handshake with a fully verified peer (#957). The upstream fix (skip the hostname check when an explicit identity check is configured) is in flight; this PR ships the workaround:<port>.<svc>.<ns>.<meshDomain>(proxy.QUICServerName) on everyquic:twin, and the same string is theserver_namesthe HTTP/3 inbound matches per non-primary port (the primary port's name lands on the default chain, like an h2 primary-port client). QUIC chains are now named by port.NewInboundQUICListenertakesmeshDomain.<sa>.<ns>.<meshDomain>and*.<sa>.<ns>.<meshDomain>— viadnsNameTemplateson the workloads'ClusterSPIFFEID(the three e2e scripts; talos viaspire-server.controllerManager.identities.clusterSPIFFEIDs.default.dnsNameTemplatesin GitOps, after the soak grade). Mesh Service names are ServiceAccount names, so the template can name the authority. Identity stays the URI-SAN pin; the DNS SANs only satisfy the QUIC client's check. 038 Q5,docs/getting-started.mdand the chart value record the prerequisite.echo.demo.svc+*.echo.demo.svc, SNI18008.echo.demo.svc→ both sources verified over HTTP/3.0, and the swapped-arms negative control shows the swap.Local: proxy/config/envoy_validate race-clean, lint clean, deps-audit OK, chart tests green. The only local failures are the pre-existing
TestObservedUpstreamsStore_*timing tests — 6/6 red onmainhere, green in CI — filed as #955 and untouched.Not in this PR
PR 7b: the
//test/mtlspoolHTTP/3 selection arm (quic-go server withRequireAndVerifyClientCert; negative control = one arm pointed at the other source's twin, destination sees the wrong SAN). PR 8: kind e2e. PR 9: talos withaether-testallow-listed + soak. Nothing deploys until the running rev239 soak is graded.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr