docs/system-admin-guide/authentication/ldap-connections/ldap-group-synchronization/README.md
This feature is available for the Enterprise edition only. For more information and differences to Community edition, see the Enterprise edition overview.
In OpenProject Enterprise edition, you can provision and periodically synchronize groups and their members from your existing LDAP or Active Directory. This guide assumes that you:
memberOf attribute on user entries (reverse lookup, default) or via a member list attribute on the group entry such as uniqueMember or member (forward lookup, configurable).[!NOTE] This feature is available for both Enterprise cloud and Enterprise on-premises. When using Enterprise cloud, your LDAP server must be reachable from the OpenProject cloud infrastructure, which typically means exposing it to the internet, which is not recommended. This is a network and security consideration for your organization to evaluate. Consider using SAML or SCIM provisioning as a more secure alternative.
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,dc=example,dc=com with two users;cn=groupB,ou=groups,dc=example,dc=com with one user.Your base DN for users is ou=people,dc=example,dc=com.
You can use this integration in the following two ways:
To access 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 Add button on the top right of the index page and select "Synchronized LDAP group". You will then be asked to select the 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=groupA,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.
To trigger a full synchronization manually (group discovery and member sync), run the following rake task in a console:
bundle exec rake ldap_groups:synchronize
This method of creating synchronized groups is well-suited for a small number of groups, or a carefully selected 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 automatically discover matching groups in your LDAP and synchronize their members.
When the synchronization task is executed, the filter is queried against LDAP and the resulting group objects will be created as synchronized groups and as OpenProject groups.
To create a new synchronized filter, use the Add button on the top right of the index page and select "LDAP Group synchronization filter". You will then be asked to select the LDAP authentication source to query and define the group search criteria. The following properties can be set:
memberOf attribute on user entries. Set this to uniqueMember for groupOfUniqueNames schemas, or member for groupOfNames schemas. Use forward lookup when your LDAP server does not maintain memberOf on user entries.Click on Create to finish the creation of the synchronized filter. This filter is executed hourly as part of the background job before the actual group synchronization runs.
Once the filter is created, the Discover LDAP groups button on the filter detail page runs the discovery immediately: it queries LDAP using the filter and creates the corresponding synchronized groups and OpenProject groups. It does not synchronize group members — member synchronization is handled by the hourly background job.
To trigger a full synchronization manually (group discovery and member sync), run the following rake task in a console:
bundle exec rake ldap_groups:synchronize
[!NOTE] Forward lookup via the Group member attribute is only available for groups created through a synchronized filter. Manually-created synchronized groups always use reverse lookup (
memberOf).
[!NOTE] If you manually create a synchronized group that is also found by a filter, its properties (such as the Sync users setting) are overridden by the filter settings.
No, currently nested LDAP groups (i.e., group entries that are members of another group) 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 on 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:
(memberOf=<DN of the group>), which requires memberOf to be present on user entries (Active Directory, OpenLDAP with memberof overlay). If your LDAP server does not support memberOf, configure forward lookup by setting the Group member attribute on the synchronized filter (e.g. uniqueMember or member). You can use ldapsearch to verify either approach works as expected.