Gap Summary
The event_gateway_virtual_cluster declarative resource supports five authentication types: anonymous, sasl_plain, sasl_scram, oauth_bearer, and client_certificate. The client_certificate type was added in the SDK 0.30.0 upgrade (commit 448ba68) with unit tests for buildVirtualClusterAuthentication and convertToVirtualClusterSensitiveDataAwareAuth, but no E2E scenario exercises create, plan, or update with client_certificate authentication. All existing scenarios exclusively use anonymous auth.
This matters because client_certificate flows through a distinct code path in both the planner (compareAuthentication switch-case added in 448ba68) and the executor (convertToVirtualClusterSensitiveDataAwareAuth), and a regression in either would pass unit tests while silently breaking the real apply/sync workflow.
Evidence
Recently added implementation without E2E coverage:
internal/declarative/executor/event_gateway_virtual_cluster_adapter.go — buildVirtualClusterAuthentication case "client_certificate" (line 570) and convertToVirtualClusterSensitiveDataAwareAuth
internal/declarative/planner/event_gateway_virtual_cluster_planner.go — compareAuthentication case VirtualClusterAuthenticationSensitiveDataAwareSchemeTypeClientCertificate (added in 448ba68)
internal/declarative/executor/event_gateway_virtual_cluster_adapter_test.go — unit tests added in 448ba68 only exercise client_certificate, not E2E lifecycle
All existing E2E configs use anonymous only:
test/e2e/scenarios/event-gateway/virtual-cluster/testdata/config.yaml
test/e2e/scenarios/event-gateway/virtual-cluster/overlays/*/config.yaml
test/e2e/scenarios/event-gateway/plan/*/overlays/003-virtual-cluster/config.yaml
test/e2e/scenarios/event-gateway/dump/testdata/config.yaml
Proposed Scenario Work
Option A — Add a new overlay step to the existing virtual-cluster scenario
Add overlays/005-auth-client-cert/config.yaml that changes the virtual cluster authentication from the current sasl_plain (used in overlays/001-update-fields) to client_certificate, and add a corresponding step 006-auth-switch-to-client-cert in scenario.yaml:
- Step: plan the auth change — assert plan shows
UPDATE for event_gateway_virtual_cluster
- Step: apply the change — assert
applied: 1, failed: 0
- Step: verify via
get event-gateway virtual-clusters — assert authentication[0].type == "client_certificate"
Option B — New standalone scenario
Create test/e2e/scenarios/event-gateway/virtual-cluster-client-cert/ with a self-contained create → verify → delete lifecycle using client_certificate auth throughout.
Option A is lower effort and keeps the coverage expansion in the established pattern.
Important assertions to include:
- Plan output:
changes[?...] | [0].fields["authentication[0].type"] == "client_certificate"
- Post-apply
get: authentication[0].type == "client_certificate"
- Post-update verify that
compareAuthentication in the planner treats a re-apply as a no-op (idempotency)
Prerequisites:
KONGCTL_ENABLE_EVENT_GATEWAY env var must be set (already required by the existing scenario)
Acceptance Criteria
Reference Patterns
test/e2e/scenarios/event-gateway/virtual-cluster/scenario.yaml — existing lifecycle pattern to extend
test/e2e/scenarios/event-gateway/virtual-cluster/overlays/001-update-fields/config.yaml — overlay structure to copy
internal/declarative/executor/event_gateway_virtual_cluster_adapter_test.go — unit test showing correct client_certificate input shape
Generated by E2E Coverage Scanner · ● 944.1K · ◷
Gap Summary
The
event_gateway_virtual_clusterdeclarative resource supports five authentication types:anonymous,sasl_plain,sasl_scram,oauth_bearer, andclient_certificate. Theclient_certificatetype was added in the SDK 0.30.0 upgrade (commit448ba68) with unit tests forbuildVirtualClusterAuthenticationandconvertToVirtualClusterSensitiveDataAwareAuth, but no E2E scenario exercises create, plan, or update withclient_certificateauthentication. All existing scenarios exclusively useanonymousauth.This matters because
client_certificateflows through a distinct code path in both the planner (compareAuthenticationswitch-case added in448ba68) and the executor (convertToVirtualClusterSensitiveDataAwareAuth), and a regression in either would pass unit tests while silently breaking the real apply/sync workflow.Evidence
Recently added implementation without E2E coverage:
internal/declarative/executor/event_gateway_virtual_cluster_adapter.go—buildVirtualClusterAuthenticationcase"client_certificate"(line 570) andconvertToVirtualClusterSensitiveDataAwareAuthinternal/declarative/planner/event_gateway_virtual_cluster_planner.go—compareAuthenticationcaseVirtualClusterAuthenticationSensitiveDataAwareSchemeTypeClientCertificate(added in448ba68)internal/declarative/executor/event_gateway_virtual_cluster_adapter_test.go— unit tests added in448ba68only exerciseclient_certificate, not E2E lifecycleAll existing E2E configs use
anonymousonly:Proposed Scenario Work
Option A — Add a new overlay step to the existing
virtual-clusterscenarioAdd
overlays/005-auth-client-cert/config.yamlthat changes the virtual cluster authentication from the currentsasl_plain(used inoverlays/001-update-fields) toclient_certificate, and add a corresponding step006-auth-switch-to-client-certinscenario.yaml:UPDATEforevent_gateway_virtual_clusterapplied: 1, failed: 0get event-gateway virtual-clusters— assertauthentication[0].type == "client_certificate"Option B — New standalone scenario
Create
test/e2e/scenarios/event-gateway/virtual-cluster-client-cert/with a self-contained create → verify → delete lifecycle usingclient_certificateauth throughout.Option A is lower effort and keeps the coverage expansion in the established pattern.
Important assertions to include:
changes[?...] | [0].fields["authentication[0].type"]=="client_certificate"get:authentication[0].type=="client_certificate"compareAuthenticationin the planner treats a re-apply as a no-op (idempotency)Prerequisites:
KONGCTL_ENABLE_EVENT_GATEWAYenv var must be set (already required by the existing scenario)Acceptance Criteria
authentication: [{type: client_certificate}]getverification after apply assertsauthentication[0].type == "client_certificate"KONGCTL_ENABLE_EVENT_GATEWAY=trueReference Patterns
test/e2e/scenarios/event-gateway/virtual-cluster/scenario.yaml— existing lifecycle pattern to extendtest/e2e/scenarios/event-gateway/virtual-cluster/overlays/001-update-fields/config.yaml— overlay structure to copyinternal/declarative/executor/event_gateway_virtual_cluster_adapter_test.go— unit test showing correctclient_certificateinput shape