Skip to content

Commit

Permalink
make the authmode check case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
super-harsh committed Aug 30, 2023
1 parent 8ad87aa commit 9ee8b18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/internal/identity/credential_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 9ee8b18

Please sign in to comment.