From 9ee8b18bdd65502bf818e46bcaf9c2a81899d82e Mon Sep 17 00:00:00 2001 From: Harshdeep Singh <38904804+super-harsh@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:12:46 +1200 Subject: [PATCH] make the authmode check case sensitive --- v2/internal/identity/credential_provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/internal/identity/credential_provider.go b/v2/internal/identity/credential_provider.go index 1543dc2c198..aabf3c751cf 100644 --- a/v2/internal/identity/credential_provider.go +++ b/v2/internal/identity/credential_provider.go @@ -328,11 +328,11 @@ func getSecretNameFromAnnotation(credentialFrom string, resourceNamespace string } func authModeOrDefault(mode string) (config.AuthModeOption, error) { - if strings.EqualFold(mode, string(config.WorkloadIdentityAuthMode)) || mode == "" { + if mode == string(config.WorkloadIdentityAuthMode) || mode == "" { return config.WorkloadIdentityAuthMode, nil } - if strings.EqualFold(mode, string(config.PodIdentityAuthMode)) { + if mode == string(config.PodIdentityAuthMode) { return config.PodIdentityAuthMode, nil }