Skip to content

Commit

Permalink
chore(backport release-0.9): fix(api): fix broken bearer token auth (#…
Browse files Browse the repository at this point in the history
…2801)

Co-authored-by: Kent Rancourt <[email protected]>
  • Loading branch information
akuitybot and krancour authored Oct 21, 2024
1 parent d1af44d commit e746b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/kubernetes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ func getAuthorizedClient(globalServiceAccountNamespaces []string) func(

// sub is a standard claim. If the user has this claim, we can infer that
// they authenticated using OIDC.
if userInfo.Claims["sub"] != "" {
if _, ok := userInfo.Claims["sub"]; ok {
var namespacesToCheck []string
if key.Namespace != "" {
// This is written the way it is to keep key.Namespace as the first
Expand Down

0 comments on commit e746b7b

Please sign in to comment.