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

Restrict access based on OAuth/OpenID Group membership #46

Open
xathon opened this issue Jan 24, 2024 · 4 comments
Open

Restrict access based on OAuth/OpenID Group membership #46

xathon opened this issue Jan 24, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@xathon
Copy link

xathon commented Jan 24, 2024

It would be great to have the possibility to restrict logins to a specific group listed in the /userinfo endpoint on OpenID/Oauth.

@smhaller
Copy link
Owner

For LDAP you have this possibility:

  • LDAP_USER_FILTER / LDAP_ADMIN_GROUP_FILTER
    or do you mean something different?

@xathon
Copy link
Author

xathon commented Jan 24, 2024

🤦 I missed that this was possible. I am using it with Oauth, where it's not possible, and I totally missed that this is already supported with LDAP, apologies.

@xathon xathon changed the title Restrict access based on LDAP/OAuth Group membership Restrict access based on OAuth/OpenID Group membership Jan 24, 2024
@smhaller smhaller added the enhancement New feature or request label Jan 24, 2024
@smhaller
Copy link
Owner

no problem :) - if you have time to implement this for OAUTH you could create a pull request ;)

@yzx9
Copy link
Collaborator

yzx9 commented Jan 25, 2024

Based on my understanding, the ID Token in the OAuth2/OIDC protocol does not inherently include group or role claims. As a workaround, I suggest implementing group filtering directly within the OAuth2/OIDC provider, such as through client roles in KeyCloak. This approach allows for more streamlined and effective role management within the authentication process.

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

No branches or pull requests

3 participants