Repository navigation
test/certs: Generate dynamically (stamped to annual) - #47255
Conversation
0efec4d to
c4bf387
Compare
ce76196 to
86e8af9
Compare
ceddf02 to
d605f83
Compare
Signed-off-by: Ryan Northey <[email protected]>
jwendell
left a comment
There was a problem hiding this comment.
Had a read through — nice cleanup, the annual stamping should finally kill the recurring expired-cert fire drills. I verified that toolshed 0.4.14.envoy already ships //certs (so no version bump needed), that every .cfg/key referenced by the three certs.spec files exists, that the ~67 deleted *_info.h/*_hash.h are all still declared as outs, that the dropped *_ocsp_req.der fixtures are unreferenced on main, and that the binary stage's /usr/local/bin/certs/... paths line up with pkg_files(prefix = "certs").
Two things I think want fixing before merge (inline), plus some smaller notes.
Also worth adding to the PR description: because STABLE_CERT_EPOCH_YEAR is a STABLE_ key, the Jan 1 rollover invalidates the cert genrules and every action that consumes them — i.e. a full uncached test rebuild on the first build of each year. That's the intended trade-off, but nobody should have to debug it as a cache bug in January.
A few more things I checked that are not problems, in case it saves anyone else the trip: validity = long is set for long_validity and toolshed maps it to year + 50, so the >32-bit time_t property of the old -days 18250 is preserved; the TEST_EXPIRED__CERT_NOT_AFTER double underscore is deliberate ([cert expired_]) and matches the existing macro on main; all "current" certs now start on Jan 1 which yields OpenSSL's double-space "Jan 1 00:00:00 ...", but TestUtility::parseTime(..., "%b %d ...") is fine because a literal space in an absl/cctz format consumes a run of whitespace; and mobile/.bazelrc already points at ../bazel/get_workspace_status, so mobile picks the new key up (subject to the first comment below).
Disclosure: this review was prepared with AI assistance (GitHub Copilot CLI); the findings were manually verified against the branch.
Signed-off-by: Ryan Northey <[email protected]>
jwendell
left a comment
There was a problem hiding this comment.
two nits, up to you to address them or not.
|
addressed one - wasnt clear what suggestion was on otherk |
Signed-off-by: Ryan Northey <[email protected]>
|
/retest |
…icates 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
…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]>
Generate test certs/keys at build time via
@envoy_toolshed//certsinstead of checking in fixtures that expire.Certs are stamped with
STABLE_CERT_EPOCH_YEAR(fromget_workspace_status) and valid from Jan 1 of that year. As this is aSTABLE_key, the Jan 1 rollover invalidates the cert genrules and all dependent test actions — i.e. a full uncached test rebuild on the first build of each year. This is intentional.The vrp image's test cert/key ship via a separate docker-only
release.docker.tar.zst; the signedrelease.tar.zstis unchanged.