Skip to content

Commit

Permalink
Corrects OIDC group parsing in case userinfo_endpoint is not OIDC com…
Browse files Browse the repository at this point in the history
…pliant

Signed-off-by: Vitor <vitor.barth@gmail.com>
  • Loading branch information
vbob committed Dec 27, 2023
1 parent e397e86 commit 7b60ac9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pkg/oidc/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ func groupsFromClaims(gp claimsProvider, k string) ([]string, bool) {
}
res = append(res, s)
}
// if remote.Groups is not a []string, but local.Groups is, this will create a fallback
if len(res) == 0 {
return res, false
}
return res, true
}

Expand Down

0 comments on commit 7b60ac9

Please sign in to comment.