Skip to content

quic: make it support SDS for mTLS - #47623

Merged
agrawroh merged 1 commit into
envoyproxy:mainfrom
wbpcode:dev-support-sds-secret-for-quic
Sep 25, 2026
Merged

agrawroh merged 1 commit into
envoyproxy:mainfrom
wbpcode:dev-support-sds-secret-for-quic

Conversation

@wbpcode

@wbpcode wbpcode commented Sep 22, 2026

Copy link
Copy Markdown
Member

Commit Message: quic: make it support SDS for mTLS
Additional Description:

In the previous implementation, a pending SDS based CA will be rejected. This PR fixed it.

Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@agrawroh
agrawroh merged commit 77d1a4a into envoyproxy:main Sep 25, 2026
25 checks passed
bpalermo added a commit to bpalermo/aether that referenced this pull request Sep 26, 2026
…r QUIC mTLS) (#952)

* proxy: bump the Envoy snapshot to 1.40.0-dev.20260926.726d7ac

The envoy bazel-registry published its first new snapshot since 2026-09-04
this morning (registry #197/#198, commit 263a259e), and it carries the one
upstream change proposal 038 Phase 4 was blocked on:

  envoyproxy/envoy#47623 "quic: make it support SDS for mTLS" (77d1a4a48e,
  2026-09-25). At 13144fb a QUIC downstream that requires a client certificate
  is rejected at load unless its trust anchor is a static trusted_ca; the
  mesh's inbound validates callers against the SDS-served trust bundle, so the
  per-pod HTTP/3 inbound could not exist on the old pin ("QUIC downstream TLS
  context requires a client certificate but no validation_context.trusted_ca
  is configured", from `envoy --mode validate` on the generated bootstrap).
  After #47623 the load-time check only needs a validation context to be
  configured and the trust anchor is checked once SDS delivers it.

Also in the 369 commits: #47219 (QUIC resumption default off), #47341
(optional client certificates), and #47217 "bazel: Remove WORKSPACE", which
is what most of this diff is:

  - MODULE.bazel: envoy/envoy_api -> 20260926.726d7ac; the .envoy closure to
    what that snapshot requests (quiche 260922-7f07dc4, rules_rust 0.74.0,
    toolchains_llvm 1.9.1, envoy_toolshed via MVS) and abseil-cpp 20260817.0,
    rules_cc 0.2.25, googletest 1.18.0.bcr.1 likewise. googleurl and quiche
    leave the flag-only dep list: upstream no longer wires them from .bazelrc.
  - .bazelrc: registry -> 263a259e (comment rewritten with the why); the
    WORKSPACE-era `--@quiche//:*_impl_lib`, `--@grpc//third_party:*`,
    `--@googleurl//...`, `--@protobuf//:zlib`, `--@envoy//bazel:enable_bzlmod`
    and `--incompatible_enable_proto_toolchain_resolution` lines are gone
    (the registry modules carry those wirings now); upstream's new
    `--@envoy//bazel:deprecated_repo_arg_allowed=false`,
    `--@rules_rust//rust/settings:skip_fission_for_rust=true`, the rustfmt
    setting, and the renamed `--@protobuf//bazel/toolchains:prefer_prebuilt_protoc`
    with its THIS_CC_TOOLCHAIN_IS_BROKEN guard are in.
  - BUILD.bazel + aether_stats/BUILD: the deprecated `repository = "@envoy"`
    argument dropped from every envoy_cc_* macro call -- the strict flag above
    refuses it, as upstream does.
  - build_config: 345 upstream extensions - 32 dropped = 313 compiled in.
  - MODULE.bazel.lock regenerated (bazel mod deps).

Proven locally: `bazel mod deps` resolves the whole closure at 263a259e,
`bazel mod explain` selects exactly the pinned versions, and
`bazel build --nobuild --config=release //:envoy` analyzes clean (46,159
targets). The compile itself is the `proxy` workflow's job (both arches, RBE).
scripts/check-envoy-api-parity.sh: OK (bindings v1.39, proxy 1.40-dev).

Docs: proxy README/image_metadata example strings, runbook pin string, and
038's Q4 answered.

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

* proxy: emit STABLE_CERT_EPOCH_YEAR for Envoy's build-time test certificates

envoyproxy/envoy#47255 (in the 726d7ac snapshot) generates Envoy's integration
test certificates at build time, stamped from STABLE_CERT_EPOCH_YEAR in
bazel-out/stable-status.txt. Upstream's get_workspace_status emits it; ours
did not, so both proxy CI legs failed in @envoy//test/config/integration/certs:
certs_gen for the one target that links Envoy's test utilities
(aether_stats_integration_test). The //:envoy binary itself analyzed and
built. Mirrors upstream: `date -u +%Y`.

Proven locally: `bazel build @envoy//test/config/integration/certs:certs`.

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

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
bpalermo added a commit to bpalermo/aether that referenced this pull request Sep 26, 2026
…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
bpalermo added a commit to bpalermo/aether that referenced this pull request Sep 26, 2026
…chains, one bare TLS context (#953)

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.


Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Co-authored-by: Claude Fable 5.1 <[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.

2 participants