Skip to content

router authn/z part 4: Remove deprecated-insecure mode - #2977

Merged
Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
ahmedtd:router-authnz-4
Oct 21, 2026
Merged

Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
ahmedtd:router-authnz-4

Conversation

@ahmedtd

@ahmedtd Taahir Ahmed (ahmedtd) commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

We have now cut over all e2e tests so that they work in static-mtls mode.

Remove deprecated-insecure mode from the atenet ingress router.

Agent-gateway's config is still left supporting insecure ports, for followup from Solo.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

generally looks good but question on agentgateway support here. (cc: Eitan Yarmush (@EItanya) Keith Mattix II (@keithmattix) )

Also, have we documented how to do port-forward/obtain cert for local testing etc?

Comment on lines +149 to +150
func (agentGatewayAtenetDataplane) AuthenticatesIngressClients() bool { return false }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why is that? I think agw supports static-mtls? no?

if we do leave it, I dont see any distinction in the CI then for agw or not

@ahmedtd

Copy link
Copy Markdown
Collaborator Author

Also, have we documented how to do port-forward/obtain cert for local testing etc?

I'll have Claude whip up a summary of what's done in the e2e tests.

@LiorLieberman

Copy link
Copy Markdown
Collaborator

Also, have we documented how to do port-forward/obtain cert for local testing etc?

I'll have Claude whip up a summary of what's done in the e2e tests.

sg. into this pr?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

talked with keith offline, good to go.

@ahmedtd

Taahir Ahmed (ahmedtd) commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

Also, have we documented how to do port-forward/obtain cert for local testing etc?

I'll have Claude whip up a summary of what's done in the e2e tests.

sg. into this pr?

Yes, it's in cmd/atenet/internal/router/README.md now. I've reviewed it for accuracy but not style.

@ahmedtd
Taahir Ahmed (ahmedtd) added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
@BenTheElder Benjamin Elder (BenTheElder) added the area/security Security related issue/pr label Oct 21, 2026
@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 21, 2026
Merged via the queue into agent-substrate:main with commit 5d5dd7a Oct 21, 2026
15 checks passed
SamPriyadarshi pushed a commit to SamPriyadarshi/substrate that referenced this pull request Oct 24, 2026
…substrate#3089)

## What this PR does and why we need it ?
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`.
## Testing
- 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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/security Security related issue/pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants