Symptoms
- The TeamCity groups synchronization with OpenLDAP was set up following the instructions from LDAP groups synchronization with OpenLDAP article.
- Example
ldap-config.propertiescontents:java.naming.provider.url=ldap://<...>:389/dc=<...>,dc=localjava.naming.security.principal=cn=<...>,ou=People,dc=<...>,dc=localjava.naming.security.credentials=<...>teamcity.users.base=ou=Peopleteamcity.users.login.filter=(&(objectClass=posixAccount)(!(businessCategory=disabled))(uid=$capturedLogin$))teamcity.users.username=uidteamcity.options.users.synchronize=trueteamcity.users.filter=(&(objectClass=posixAccount)(!(businessCategory=disabled)))teamcity.options.groups.synchronize=trueteamcity.groups.base=ou=Groupsteamcity.groups.filter=(CN=grp_teamcity_test)teamcity.options.createUsers=trueteamcity.options.deleteUsers=trueteamcity.options.syncTimeout=60000teamcity.groups.property.member=memberUidteamcity.property.distinguishedName=dnteamcity.users.property.memberId=uidteamcity.users.property.displayName=cnteamcity.users.property.email=mailteamcity.groups.fetchOnlyMappedGroups=false - Example mapping in the
ldap-mapping.xmlfile:<group-mapping teamcityGroupKey="TEST" ldapGroupDn="cn=grp_teamcity_test,ou=Groups,dc=<...>,dc=local"/> - The groups (in this example, only one
grp_teamcity_testgroup) are synchronized correctly. - But the group members are not getting synchronized. From the logs:
Skipped 1 unknown member during membership synchronization of the remote group '{remoteId='cn=grp_teamcity_test,ou=Groups,dc=<...>,dc=local', groupKey='TEST', members=1}' as it is not present in the full list of users or groups. Ignored members: 'testuser'
Cause
It is caused by differences in how TeamCity maps users and available OpenLDAP attributes.
Related issue: Group membership synchronization with OpenLDAP.
Resolution
Change the teamcity.property.distinguishedName=dn to teamcity.property.distinguishedName=uid in the ldap-config.properties file.
Additional information
An example of a working configuration can be found in Configuring TeamCity to synchronize users and groups with OpenLDAP.
Comments
0 comments
Please sign in to leave a comment.