-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
LDAP group sync does not work with several LDAP Group mapping #20954
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
Comments
after further testing, the second mapping in the example above does not work even alone. dn: CN=p-AppGit-Usr,OU=FunctionalProfiles,OU=GIT,OU=PSL-SDE,OU=ApplicationsManagement,DC=my,DC=company,DC=corp |
finally, the only difference between working ldap groups and non-working ldap groups in my case looks to be the parenthesis in the user DN for the member attribute inside a group object. |
My bad, found the issue in wrongly typing the DN Path in the mapping configuration entry. |
Description
With a valid working LDAP authentication source configured for AD.
By Checking enable LDAP Groups and filling group search base, group attribute and user attribute in the configuration form and checking the 'remove users from synchronized teams...'.
Adding one mapping in the json form:
{"CN=MY-Team-Usr,OU=PSL-SDE,OU=ApplicationsManagement,DC=my,DC=company,DC=corp":{"TOOLS":["developers"]}}
works fine , users are added or removed according to their membership of the ldap group.
But if we add a second mapping in the form:
{"CN=MY-Team-Usr,OU=PSL-SDE,OU=ApplicationsManagement,DC=my,DC=company,DC=corp":{"TOOLS":["developers"]},"CN=p-AppGit-Usr,OU=GIT,OU=PSL-SDE,OU=ApplicationsManagement,DC=my,DC=company,DC=corp":{"PROD": ["developers"]} }
the second mapping remove systematically users if they were manually added to the second team and they are not added at login phase despite their membership of the LDAP group p-AppGit-Usr .
Please note that a restart of gitea is required each time the LDAP auth source is changed/updated for taking into account the changes.
Please note the 2 teams have the same name in different organizations
Note also that logs are unclear as they mention adding user in the Organisation Name instead of the ORG/Team name
2022/08/25 11:43:20 ...source_group_sync.go:46:SyncLdapGroupsToTeams() [T] [63074437] LDAP group sync: adding user [axxxxxx] to team [TOOLS]
<= that is the org name not the team nameLogs with expression 'ldap' and trace level does not show any significant information other tha "adding user to team" or "removing user from team"
Also no log errors about not finding teams or org.
Gitea Version
1.17.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.27.0
Operating System
RHEL 8
How are you running Gitea?
From Github release executable
Database
MySQL
The text was updated successfully, but these errors were encountered: