-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for keycloak and option to disable group-of-groups #37
Add support for keycloak and option to disable group-of-groups #37
Conversation
98341bc
to
61c5382
Compare
Cool PR! I had to do some changes to make it work and noted them in my review. I had the intent to do this today and luckily found that you made this PR 3 hours prior! Thanks for the contribution! |
Hi @seang96 I did not see any comments on the PR, maybe you forgot to submit the comments? |
I did a review, perhaps the maintainer needs to approve them or something? |
Ah woops I did forget to submit the review. Don't do many of those sorry about that haha |
61c5382
to
61c8db5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed my review was still pending after submitting it.. let's see if it works now.
61c8db5
to
1801ea4
Compare
Did some quick changes to fix the mentioned issues, will test it more later this week. |
dbaedfb
to
85aa4cd
Compare
Hi @BlackVoid. Thanks a lot for this - it looks really nice
Yes - there's no need to use the UID cache if Keycloak is already providing the UIDs
This is a neat trick. Don't think I've seen that before.
It's a bit opaque, but the purpose of this is to allow you to make an LDAP request that looks like "all groups that members of group X belong to". For example if you have
then you'll get
where groups_of_groups A contains primary_user_groups X and Y. If you make an LDAP request that looks like: This is to work around a problem with Microsoft Entra which doesn't have primary user groups natively. I assume Keycloak does? If so, I'll take a look at moving the group-of-groups logic into
I could imagine this might cause the attribute validation to fail. If it doesn't then I don't see a problem with this.
Sounds fine - I haven't included all the optional fields for the various classes, but there's no reason not to have this. I don't have time for a full review now, but I'll take a look maybe next week or the week after? |
@BlackVoid are you happy to allow edits from maintainers on your fork? |
Sure, I've enabled it now :) |
Keycloak does not have primary user groups either, so I think this is just that our use cases are different, I understand your explanation right. So I think it's fine to have it be available for all backends in case someone has the same usecase but uses Keycloak or perhaps in the future some other provider. My usecase is for the most part to integrate with systems that use ldap like Proxmox and various self hosting solutions that do not support OIDC like calibre web and homeassistant. So I only use regular groups for access management and don't really have a need for the primary user groups. |
Just a note, I'm not really in a hurry to get this or the other PR merged. It's changes I've made to use it for my own purpose and just thought it would be nice to eventually get it in to the project so others can have a use for it. However I might not have the coming weeks to promptly respond or do changes to the PR. How do you want me to solve the python linting. I personally don't agree with the linting rule since I think it's quite clear what the true and false stands for, but I can change it if you want to :) |
a249e66
to
a312892
Compare
…and client_secret to the OAuth backend
de07cca
to
38a28e4
Compare
@BlackVoid: I've fixed the linting errors and made one change to your logic: I replaced the custom UID calculation method with a call to UidCache but kept the logic of reading from the Could you check whether these changes still work for you? |
I've tested the changes and other than some minor issues that I fixed with the latest commit it appears to work well. |
…irrored groups parameter
29e2e57
to
2483fa6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @BlackVoid !
Hi
Want to start of with thanking you for creating this project, stumbled upon this after digging into this kind of service for the thousand time and finally finding a project that makes it easy to integrate OIDC with LDAP for the services which do not support OIDC.
I've made a few changes in order to fit my use case and if you want to I can split it up into multiple PRs or if you don't feel like merging certain changes I can remove them.
The following changes have been made: