Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth): oidc group can be a string #1263

Merged
merged 1 commit into from
Jan 2, 2023
Merged

fix(auth): oidc group can be a string #1263

merged 1 commit into from
Jan 2, 2023

Conversation

z06tbond
Copy link
Contributor

@z06tbond z06tbond commented Nov 14, 2022

When authenticating through OIDC, if the user belongs to only one group, then the field containing the group claim (groupsField in akhq) can either be an array (with one item) or a string, depending on the IdP implementation.
There is no standard.

With the current code, a user with only one group can't log in if the IdP returns a string.

This PR handles this particular case.

See for example the same issue on k8s: kubernetes/kubernetes#33290

Fixes #840

@z06tbond z06tbond marked this pull request as ready for review November 14, 2022 09:59
@tchiotludo tchiotludo merged commit 82b1daf into tchiotludo:dev Jan 2, 2023
@tchiotludo
Copy link
Owner

Thanks a lot ! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Oauth 2, support role as string or array
2 participants