docs/system-admin-guide/authentication/ldap-connections/ldap-group-synchronization/README.md
Note: This feature is available for the Enterprise on-premises only, for OpenProject versions 7.4+. For more information and differences to Community edition, see this page.
In OpenProject Enterprise on-premises, you can provision and periodically synchronize groups and their members from your existing LDAP or Active Directory. Group memberships using the groupOfNames LDAP object class are supported for this. This guide assumes that you:
memberOf: <DN of the group> attribute to determine the members of a group entry. Right now we do not support LDAP instances that only have member attributes, but not the inverse memberOf property.[!NOTE] OpenProject does not support other attributes other than the
memberOfproperty to define groups. Please make sure that user objects have thememberOfproperty for the synchronization to work.
For the sake of simplicity, we assume that in this guide, your LDAP structure looks like the following:
You have two groups cn=groupA,ou=groups,ou=example,ou=com and cn=groupB,ou=groups,ou=example,ou=com with two and one users, respectively*.* Your base DN is ou=people,ou=example,ou=com.
You can use this integration in the following two ways:
In order to get to the LDAP group sync administration pane, expand the LDAP authentication menu item in your administration.
Synchronizing a single LDAP group allows you to connect an existing group in OpenProject with one from LDAP.
LDAP group synchronization extends the memberships defined by administrators in an existing OpenProject group. Important things to note are:
To create a new synchronized group, use the button on the top right of the page. There, you will select your LDAP authentication source that contains the group, as well as the existing OpenProject group that members should be synchronized to. The following options can be set:
cn=team1,ou=groups,dc=example,dc=com.Click on Create to finish the creation of the synchronized group. The LDAP memberships of each user will be synchronized hourly through a background job on your packaged installation. Changes and output will be logged to /var/log/openproject/cron-hourly.log.
If you want to trigger the synchronization manually you can do so by running the respective rake task directly. In the packaged installation, for instance, this would work like this:
sudo openproject run bundle exec rake ldap_groups:synchronize
This method of creating synchronized groups is well-suited for a small number of groups, or a very individual set of groups that you need to synchronize. It is very flexible by allowing individual groups to synchronize users into OpenProject.
If you need to synchronize a large number of groups that follow a common pattern, consider using the following filter functionality.
Instead of manually synchronizing groups from a given group DN in your LDAP, you can also create filter objects that will query the LDAP not only for group members, but the groups themselves.
When the synchronization task is executed, the filter is being queried against the LDAP and resulting group objects will be created as synchronized groups and as OpenProject groups.
To create a new synchronized filter, use the button on the top right of the index page. There, you will select your LDAP authentication source that should be queried. The following properties can be set:
Click on Create to finish the creation of the synchronized filter. This filter is being executed hourly as part of the background job before the actual group synchronization runs.
[!NOTE] If you manually create a synchronized group that is also found by a filter, its properties (such as the Sync users setting) is being overridden by the filter setting.
No, at this point in time, nested LDAP groups (i.e., group DNs being memberOf of another group entry) are not supported in OpenProject. However, there is a feature ticket for this in the wish list.
If you'd like to voice your interest in this feature, please comment it with your use-case to provide visibility.
Please double check the DN of the groups and the LDAP connection. The base DN of the LDAP connection and the DN must share a common hierarchy. Otherwise, the group DN will not be found by the connection, as the base DN is used for all subsequent queries for the lifetime of the connection.
For users to be automatically synchronized, the following conditions need to be met:
member LDAP property, and users need to have the memberOf property or virtual property. OpenProject will look for users with the following filter: (memberOf=<DN of the group>). You can use ldapsearch to verify that this works as expected.