Skip to content

test(e2e): kind e2e for the ext_authz sidecar and its roll ordering (#1275) - #1287

Merged
bpalermo merged 1 commit into
upgrade/authz-native-sidecarfrom
upgrade/authz-e2e
Oct 5, 2026
Merged

bpalermo merged 1 commit into
upgrade/authz-native-sidecarfrom
upgrade/authz-e2e

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #1285. This PR adds the first ext_authz e2e, for #1275.

e2e/authz.sh

The script follows e2e/uds.sh: one kind cluster, SPIRE off, pinned kind and node image from e2e/kind-version.sh. It installs the chart's OPA preset with failureMode: DENY and the prober canary's policy (allow if input.attributes.request.http.headers["x-authz"] == "letmein"). The policy guards an extAuthz HTTPFilter on authz-echo. Assertions:

  • a. The allow header gets 200, and a request without it gets 403. ext_authz.ok and ext_authz.denied both move, which shows the sidecar made both decisions.

  • b. On the live pod, authz is a started native sidecar (initContainerStatuses, restartPolicy: Always), and proxy started after it.

  • c. The script evicts the OPA image from the node (crictl rmi), which is the proxy pod: the ext_authz sidecar can start after the proxy is serving — authz errors (403 under failureMode DENY) until it is up #1275 trigger: the new pod must pull it again. It then runs kubectl rollout restart ds/aether-proxy with 3 request loops sending allowed requests the whole time. Gates:

    • ZERO 403s on the allowed path.
    • ZERO new http.*.ext_authz.error, read on the node Envoy's admin. Hot restart carries the counters across epochs.
    • The node Envoy ends at a newer restart_epoch, so a real handoff happened.

    Then (a) runs again.

AUTHZ_CHARTS=<older charts/> AUTHZ_EXPECT=red inverts (c), so the harness can be shown to tell the two layouts apart.

Local runs (kind v0.33.0 from a scratch dir, k8s 1.35.8)

main's chart (2.4.8), red:   F403=495 EXT_AUTHZ_ERRORS=990 (t=+2..+5s), authz started 3 s after proxy
#1285's chart, fresh:        REQUESTS=17423 F403=0 OTHER_NON200=0 EXT_AUTHZ_ERRORS=0 EPOCH=0->1
#1285's chart, upgraded:     REQUESTS=17406 F403=0 OTHER_NON200=0 EXT_AUTHZ_ERRORS=0 EPOCH=4->5

Workflow

.github/workflows/e2e.yaml gets one new authz job (run-e2e-script, AUTHZ_SKIP_BUILD), plus authz in the only= options and in the report-failure needs and results. //e2e:kind_pin_test passes. actionlint 1.7.12 reports no findings in the new block; its remaining findings (SC2024/SC2046 in the gateway-http and mesh-http jobs) are already on main. The proxy and OPA images are pulled from their registries, as in the other suites.

Proof: bazel test //charts/... //e2e/... 82/82, lint with fail_on_violation clean, make format-check clean. The nightly dispatch (only=authz) result is in a comment below.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…1275)

e2e/authz.sh: one kind cluster, SPIRE off, the chart's OPA preset under
failureMode DENY with the prober canary's allow-header policy on an
extAuthz HTTPFilter. Asserts:

  a. allow header -> 200, none -> 403, with ext_authz ok/denied moving
  b. `authz` is a started native sidecar and `proxy` started after it
  c. with the OPA image evicted from the node (the #1275 trigger: the
     new pod's sidecar must pull it), a proxy rollout restart under
     continuous allowed requests gives ZERO 403s and ZERO new
     ext_authz.error, across a real hot-restart handoff (newer epoch)

AUTHZ_CHARTS=<older charts/> AUTHZ_EXPECT=red inverts (c), proving the
harness discriminates. Locally (kind v0.33.0, k8s 1.35.8):
  main's chart (2.4.8):  495 x 403, 990 ext_authz errors in 4 s
  this chart (2.4.9):    0 x 403, 0 errors (17,406 requests), twice

Wired into the nightly e2e workflow as job `authz` (run-e2e-script,
only=authz, report-failure).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo added this pull request to stack #1288 October 5, 2026 20:05
@bpalermo
bpalermo merged commit 671003d into main Oct 5, 2026
79 of 89 checks passed
@bpalermo
bpalermo deleted the upgrade/authz-e2e branch October 5, 2026 22:04
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.

1 participant