Repository navigation
benchmarking: dial atenet-router over SPIFFE mTLS on port 443 - #3089
Merged
Max Smythe (maxsmythe) merged 1 commit intoOct 24, 2026
Merged
Max Smythe (maxsmythe) merged 1 commit into
Max Smythe (maxsmythe) merged 1 commit into
Conversation
Sairaj Pokale (sairajp-rewind)
force-pushed
the
fix/benchmarks-router-mtls
branch
from
October 21, 2026 22:22
c11f4a8 to
d9f5a6a
Compare
Collaborator
|
LGTM |
atenet-router removed plaintext HTTP ingress on port 80 and now requires SPIFFE client certificates over TLS on port 443 with the 3-label SAN atenet-router.ate-system.svc. Add boomerutil.RouterTLSConfig() using credbundle.ParsePool and credbundle.ClientLoader, and update boomer-worker, ateenv, nighthawk-ingress, and counter_demo.py to verify /run/servicedns-ca/ca.crt against atenet-router.ate-system.svc and present /run/podidentity.podcert.ate.dev/credential-bundle.pem. Keep ForceAttemptHTTP2 disabled on boomer-worker's HTTP transport so VUs do not multiplex onto a single Envoy worker thread.
Sairaj Pokale (sairajp-rewind)
force-pushed
the
fix/benchmarks-router-mtls
branch
from
October 24, 2026 04:03
d9f5a6a to
b60dfb5
Compare
Sairaj Pokale (sairajp-rewind)
requested a review
from Max Smythe (maxsmythe)
October 24, 2026 04:18
Max Smythe (maxsmythe)
approved these changes
Oct 24, 2026
Max Smythe (maxsmythe)
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, this is a benchmarking-only PR
Merged
2 tasks done
Giuseppe Cofano (GiuseppeCofano)
pushed a commit
to GiuseppeCofano/substrate
that referenced
this pull request
Nov 6, 2026
…substrate#3089) Following agent-substrate#2977 (`5d5dd7ae`), `atenet-router` no longer exposes plaintext HTTP on `:80` and requires SPIFFE mTLS on `:443` (`https://atenet-router.ate-system.svc`), verifying the server leaf against `/run/servicedns-ca/ca.crt` (SAN `atenet-router.ate-system.svc`) and presenting `/run/podidentity.podcert.ate.dev/credential-bundle.pem`. This PR updates all benchmark data-plane clients to dial `atenet-router` over SPIFFE mTLS on `:443`: - **`internal/benchmarking/boomer/boomerutil`**: - Add `DefaultRouterURL = "https://atenet-router.ate-system.svc"` and `RouterTLSConfig()`, cached with `sync.OnceValues` and returning a `Clone()` configured with `RootCAs` from `credbundle.ParsePool("/run/servicedns-ca/ca.crt")`, `GetClientCertificate` from `credbundle.ClientLoader("/run/podidentity.podcert.ate.dev/credential-bundle.pem")`, and `ServerName: "atenet-router.ate-system.svc"`. - Add unit tests in `client_test.go` covering mTLS handshake success, mismatched `ServerName` rejection, and missing credential files. - **`cmd/benchmarking/boomer-worker`**: - Default `--router-url` to `boomerutil.DefaultRouterURL` and fail fast on startup if `--router-url` does not start with `https://`. - Configure `http.Transport.TLSClientConfig` via `boomerutil.RouterTLSConfig()` and keep `ForceAttemptHTTP2 = false` so Go does not implicitly enable HTTP/2 ALPN when `TLSClientConfig` is non-nil (preserving HTTP/1.1 connection-pool semantics for `glutton` and `durdir`). - **`internal/benchmarking/boomer/ateenv`**: - Update `routerGRPCTarget` to require `https://` and default to `:443`. - Dial `atenet-router` with `credentials.NewTLS(tlsCfg)` from `boomerutil.RouterTLSConfig()`. - **`benchmarking/nighthawk-ingress` & `benchmarking/nighthawk-egress`**: - Update `DEFAULT_ROUTER_URL` to `https://atenet-router.ate-system.svc:443` and configure `_warm_actor` `requests.Session` with `verify = "/run/servicedns-ca/ca.crt"` and `cert = "/run/podidentity.podcert.ate.dev/credential-bundle.pem"`. - Reject non-`https://` URIs in `build_spec_dict` and populate `tls_context` (`sni: "atenet-router.ate-system.svc"`, `tls_certificates` client cert + key from `/run/podidentity.podcert.ate.dev/credential-bundle.pem`, `trusted_ca` from `/run/servicedns-ca/ca.crt`, and `match_typed_subject_alt_names` exact `DNS` match on `atenet-router.ate-system.svc`). - **`benchmarking/locust/tests/counter_demo.py`**: - Switch `ROUTER_URL` to `https://atenet-router.ate-system.svc` and configure `http_session.verify` and `http_session.cert`. - Unit tests: `go test -race -count=1 ./cmd/benchmarking/... ./internal/benchmarking/... ./benchmarking/...`, `benchmarking/automation` unit tests, and Nighthawk proto round-trip & URI validation tests (`test_spec_round_trips_through_real_protos`, `test_rejects_non_https_uri`). - Live GKE cluster smoke tests (`glutton`, `durdir`, and `ate-env` on gVisor): 0 failures across all runs; verified `atenet-router` Envoy metrics (`ssl_handshake > 0`, `ssl_fail_verify_* == 0`, HTTP/1.1 connections for `glutton`/`durdir`, and HTTP/2 connections for `ate-env`). Fixes agent-substrate#3088 - [x] Tests pass - [x] Docs updated
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.
What this PR does and why we need it ?
Following #2977 (
5d5dd7ae),atenet-routerno longer exposes plaintext HTTP on:80and requires SPIFFE mTLS on:443(https://atenet-router.ate-system.svc), verifying the server leaf against/run/servicedns-ca/ca.crt(SANatenet-router.ate-system.svc) and presenting/run/podidentity.podcert.ate.dev/credential-bundle.pem.This PR updates all benchmark data-plane clients to dial
atenet-routerover SPIFFE mTLS on:443:internal/benchmarking/boomer/boomerutil:DefaultRouterURL = "https://atenet-router.ate-system.svc"andRouterTLSConfig(), cached withsync.OnceValuesand returning aClone()configured withRootCAsfromcredbundle.ParsePool("/run/servicedns-ca/ca.crt"),GetClientCertificatefromcredbundle.ClientLoader("/run/podidentity.podcert.ate.dev/credential-bundle.pem"), andServerName: "atenet-router.ate-system.svc".client_test.gocovering mTLS handshake success, mismatchedServerNamerejection, and missing credential files.cmd/benchmarking/boomer-worker:--router-urltoboomerutil.DefaultRouterURLand fail fast on startup if--router-urldoes not start withhttps://.http.Transport.TLSClientConfigviaboomerutil.RouterTLSConfig()and keepForceAttemptHTTP2 = falseso Go does not implicitly enable HTTP/2 ALPN whenTLSClientConfigis non-nil (preserving HTTP/1.1 connection-pool semantics forgluttonanddurdir).internal/benchmarking/boomer/ateenv:routerGRPCTargetto requirehttps://and default to:443.atenet-routerwithcredentials.NewTLS(tlsCfg)fromboomerutil.RouterTLSConfig().benchmarking/nighthawk-ingress&benchmarking/nighthawk-egress:DEFAULT_ROUTER_URLtohttps://atenet-router.ate-system.svc:443and configure_warm_actorrequests.Sessionwithverify = "/run/servicedns-ca/ca.crt"andcert = "/run/podidentity.podcert.ate.dev/credential-bundle.pem".https://URIs inbuild_spec_dictand populatetls_context(sni: "atenet-router.ate-system.svc",tls_certificatesclient cert + key from/run/podidentity.podcert.ate.dev/credential-bundle.pem,trusted_cafrom/run/servicedns-ca/ca.crt, andmatch_typed_subject_alt_namesexactDNSmatch onatenet-router.ate-system.svc).benchmarking/locust/tests/counter_demo.py:ROUTER_URLtohttps://atenet-router.ate-system.svcand configurehttp_session.verifyandhttp_session.cert.Testing
go test -race -count=1 ./cmd/benchmarking/... ./internal/benchmarking/... ./benchmarking/...,benchmarking/automationunit tests, and Nighthawk proto round-trip & URI validation tests (test_spec_round_trips_through_real_protos,test_rejects_non_https_uri).glutton,durdir, andate-envon gVisor): 0 failures across all runs; verifiedatenet-routerEnvoy metrics (ssl_handshake > 0,ssl_fail_verify_* == 0, HTTP/1.1 connections forglutton/durdir, and HTTP/2 connections forate-env).Fixes #3088