Skip to content

test/certs: Generate dynamically (stamped to annual) - #47255

Merged
phlax merged 3 commits into
envoyproxy:mainfrom
phlax:test-cert-gen
Sep 8, 2026
Merged

phlax merged 3 commits into
envoyproxy:mainfrom
phlax:test-cert-gen

Conversation

@phlax

@phlax phlax commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Generate test certs/keys at build time via @envoy_toolshed//certs instead of checking in fixtures that expire.

Certs are stamped with STABLE_CERT_EPOCH_YEAR (from get_workspace_status) and valid from Jan 1 of that year. As this is a STABLE_ 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 signed release.tar.zst is unchanged.

@phlax
phlax marked this pull request as draft September 6, 2026 20:55
@phlax
phlax force-pushed the test-cert-gen branch 2 times, most recently from 0efec4d to c4bf387 Compare September 6, 2026 21:44
@phlax
phlax force-pushed the test-cert-gen branch 2 times, most recently from ce76196 to 86e8af9 Compare September 6, 2026 22:53
@phlax
phlax force-pushed the test-cert-gen branch 5 times, most recently from ceddf02 to d605f83 Compare September 7, 2026 15:13
@phlax phlax changed the title [WIP] test/certs: Generate dynamically (stamped to annual) test/certs: Generate dynamically (stamped to annual) Sep 7, 2026
@phlax
phlax marked this pull request as ready for review September 7, 2026 15:13

@jwendell jwendell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread bazel/get_workspace_status Resolved
Comment thread docs/bazel/get_workspace_status Resolved
Comment thread distribution/binary/BUILD Resolved
Comment thread test/integration/BUILD Resolved
Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax requested a review from agrawroh as a code owner September 8, 2026 15:55
@phlax
phlax enabled auto-merge (squash) September 8, 2026 16:00
jwendell
jwendell previously approved these changes Sep 8, 2026

@jwendell jwendell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two nits, up to you to address them or not.

@phlax

phlax commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

addressed one - wasnt clear what suggestion was on otherk

Signed-off-by: Ryan Northey <[email protected]>
@jwendell

jwendell commented Sep 8, 2026

Copy link
Copy Markdown
Member

/retest

@phlax
phlax merged commit b7aebfb into envoyproxy:main Sep 8, 2026
24 checks passed
bpalermo added a commit to bpalermo/aether that referenced this pull request Sep 26, 2026
…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
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]>
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