-
-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
OAuth federation not removing users from groups #12938
Comments
Not related to LDAP issues. There is some code to handle removing groups created from sources, but if those groups existed previously, or are not directly linked to a source, then authentik cannot be 100% sure if it should remove those. https://github.com/goauthentik/authentik/blob/main/authentik/core/sources/flow_manager.py#L389 What are your sources settings? Specifically how are groups created and linked ("group matching mode" option). |
I added the enrollment stage to the default-source-authentication flow so now the mapping logic is executed on every login. This solved the issue. I was also pleasantly surprised that authentik can differentiate between source groups and "local" groups in authentik. I was expecting that all group memberships are overridden on every sync, but the memberships to local groups are kept while memberships to source groups are removed. So nice work! :) |
Do you mean the User write stage? If so, then yes, there needs to be one for changes to be saved.
Thank you! |
Yes exactly, I just used the |
Describe your question/
We have setup a federation to an OAuth source with the following user property mapping:
On the initial logging the groups are synced correctly. Non existing groups are created and the user is added to all groups in the
roles
attribute. However it seems like this sync is only happening on the initial login. If a user is removed from a group in the OAuth Source they are not removed from the group in authentik after their next login. The same behaviour is expected if I change for example how the username is set. It does not change after the initial logging, even if the logic is changed. Is this expected? Can this be configured?Version and Deployment (please complete the following information):
Additional context
Not sure if related to #6408 and #1644
The text was updated successfully, but these errors were encountered: