From 56d6ebb3b29db5bcb50119b062e9655bc3e26ca8 Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Mon, 5 Jan 2026 12:26:39 +0530 Subject: [PATCH 1/4] feat: Enable Gateway authentication configuration from Secrets, taking precedence over ConfigMaps. --- .../workflows/operator-integration-test.yml | 36 +++++++ go.work | 1 + go.work.sum | 94 +++++++++---------- .../api/v1alpha1/gateway_types.go | 6 ++ .../api/v1alpha1/zz_generated.deepcopy.go | 5 + ...ateway.api-platform.wso2.com_gateways.yaml | 17 ++++ .../internal/auth/auth_helper.go | 44 +++++++++ .../internal/auth/auth_helper_test.go | 57 +++++++++++ .../internal/controller/restapi_controller.go | 24 ++++- 9 files changed, 227 insertions(+), 57 deletions(-) diff --git a/.github/workflows/operator-integration-test.yml b/.github/workflows/operator-integration-test.yml index 9a23a2013..b32257db6 100644 --- a/.github/workflows/operator-integration-test.yml +++ b/.github/workflows/operator-integration-test.yml @@ -833,6 +833,22 @@ jobs: affinity: {} EOF + # Create Auth Secret + cat < Date: Mon, 5 Jan 2026 12:27:16 +0530 Subject: [PATCH 2/4] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d32fe90fb..964ab8ec4 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,4 @@ bin/ # CLI test logs and output cli/src/tests/logs/ cli/src/tests/target/ +zzz \ No newline at end of file From 57dd163e233220e4dee8bc8bd5e00b4ba20cd1ae Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Mon, 5 Jan 2026 12:28:30 +0530 Subject: [PATCH 3/4] Revert "Update .gitignore" This reverts commit 8cce767e6134b4bb2ee859ebac510f794443b981. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 964ab8ec4..d32fe90fb 100644 --- a/.gitignore +++ b/.gitignore @@ -110,4 +110,3 @@ bin/ # CLI test logs and output cli/src/tests/logs/ cli/src/tests/target/ -zzz \ No newline at end of file From d25354cbdd1d1ba3b52a85361cb52d750a5246f6 Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Mon, 5 Jan 2026 13:23:28 +0530 Subject: [PATCH 4/4] feat: Add authSecretRef to Gateway CRD for user list configuration from Secrets --- .../gateway.api-platform.wso2.com_gateways.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_gateways.yaml b/kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_gateways.yaml index c08763273..16aa3bdb7 100644 --- a/kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_gateways.yaml +++ b/kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_gateways.yaml @@ -103,6 +103,23 @@ spec: required: - scope type: object + authSecretRef: + description: |- + AuthSecretRef references a Secret containing the user list in a 'users.yaml' key. + The Secret data should contain a key "users.yaml" with a list of users. + This takes precedence over auth configuration in ConfigRef. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic configRef: description: |- ConfigRef references a ConfigMap containing custom Helm values configuration.