eXo Platform organizational entities (users, groups and memberships), can be stored in a database or a directory such as OpenLDAP or Active Directory (AD). This chapter documents how to configure eXo Platform to plug to a directory.
Please notice that this integration is not SSO (Single Sign On). If SSO is what you need, read the SSO chapter, eXo Add-ons guide that explains how eXo Platform works with a directory through an SSO service like CAS or OpenAM.
- eXo Platform supports only the read-only mode with a directory (LDAP/AD).
- Only one single directory is allowed.
- The mapped organizational entities from directory are imported in one way direction: from the directory to eXo Platform.
This chapter covers the following topics:
- Introduction An introduction about directory server integration basics.
- Quick start A step by step tutorial for eXo Platform configuration with a directory server.
- How to map multiple DNs for users? A step by step tutorial to map multiple DNs for users from your directory to eXo Platform.
- How to change default mandatory users attributes mapping? A step by step tutorial to map default users attributes.
- How to map additional user attributes? A step by step tutorial to map additional users attributes than the default ones.
- How to map multiple DNs for groups? A tutorial allowing to map multiple DNs for groups from your directory to eXo platform.
- How to map directory groups to a new eXo Platform group? A tutorial allowing to map your directory groups to new eXo platform groups.
- Configuration reference A reference guide about PicketLink IDM configuration and eXO Platform configuration.
- Frequently asked questions How to resolve some possible issues of a directory integration.
eXo Platform uses PicketLink IDM framework that allows a very flexible integration with a directory server:
- It can be plugged to an already populated directory, in read-only mode. The directory can contain users and groups, or only users.
- Structure of users and groups in the directory can be finely customized.
- The supported directory implementations are: OpenLDAP and Microsoft Active Directory. You can refer to our official supported environments matrix for more details about the supported versions.
The term “Directory users” represents users who are created in the directory by its utilities. The term “Platform users” represents users who are created via eXo Platform UI. The understanding is similar for “Directory groups” and “Platform group*”.
The following section is a step-by-step tutorial to integrate eXo Platform with a directory server.
If you want to know more about PicketLink IDM configuration, you can refer to the official documentation of PicketLink.
Through this tutorial, you will be able to integrate eXo Platform with a populated directory server. We suppose that your directory server has a structure similar to the following one:
In this quick start, you configure eXo Platform to read information of users and groups from the directory. It might not match your need exactly, but after this start you will have everything packaged in an extension, that you can adapt by following the following sections.
The ldap-extension is technically a portal extension that is described in Developer guide, but it does not require compilation as it requires only xml files, so administrators can pack the war archive without using a Maven build. If you are a developer, you can create a Maven project for it like any other extension.
ldap-extensiondirectory having this structure:
ldap-extension |__ META-INF |__ exo-conf |__ configuration.xml |__ WEB-INF |__ conf |__ configuration.xml |__ organization |__ idm-configuration.xml |__ picketlink-idm-ldap-config.xml |__ jboss-deployment-structure.xml |__ web.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd http://www.exoplatform.org/xml/ns/kernel_1_3.xsd" xmlns="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd"> <import>war:/conf/organization/idm-configuration.xml</import> </configuration>
Copy content of the
portal.war!/WEB-INF/conf/organization/idm-configuration.xmlfile of eXo Platform to your
idm-configuration.xmlfile, then edit your file to replace:
with the path to your
Copy content from one of PicketLink sample files to your
The sample files can be found in,``portal.war!/WEB-INF/conf/organization/picketlink-idm/examples``. Choose either of the following files:
picketlink-idm-msad-config.xmlif you use MS Active Directory.
picketlink-idm-ldap-config.xmlfor other LDAP compliant directories.
picketlink-idm-ldap-config.xmlfile according to your directory setup. Most of the time, the following parameters need to be changed:
- all the DNs locating the users and groups:
- ctxDNs of the USER identity object, which must be the root DN of the users.
- ctxDNs of the platform_type identity object, which must be the root DN of the groups mapped under the eXo Platform /platform group.
- ctxDNs of the organization_type identity object, which must be the root DN of the groups mapped under the eXo Platform /organization group
For Microsoft Active Directory (MSAD); do the following sub-steps :
- Prepare a truststore file containing the valid certificate for MSAD. It can be generated by the Linux command:
keytool -import -file certificate -keystore truststore
Edit the following parameters in the ``picketlink-idm-ldap-config.xml``file:
- providerURL: Should use SSL (ldaps://).
- customSystemProperties: Give your truststore file path and password.
<name>customSystemProperties</name> <value>javax.net.ssl.trustStore=/path/to/msad.truststore</value> <value>javax.net.ssl.trustStorePassword=password</value>
Uncomment the following entries in the
<entry> <key><string>/platform/*</string></key> <value><string>platform_type</string></value> </entry> <entry> <key><string>/organization/*</string></key> <value><string>organization_type</string></value> </entry>
<value> <string>/platform/*</string> </value> <value> <string>/organization/*</string> </value>
This step enables mapping of directory groups (platform and organization - that are predefined groups) to eXo Platform. If you bypass this step, only user mapping is performed.
Configure your extension by following the steps 3, 4 and 5 of Creating a portal extension.
Package and deploy your ldap-extension into Platform.
Make sure the directory server is running, then start eXo Platform.
Packaging and deploying¶
The extension folder must be packaged into
ldap-extension.war then copied to
To compress the folder into a .war (and decompress the .war for editing), you can use any archiver tool that supports .war extension. You can use the JDK built-in tool jar, as follows:
To compress, first go to inside ldap-extension directory:
jar cvf path/to/save/ldap-extension.war *
To decompress, run:
jar xvf path/to/ldap-extension.war
Do not include the ldap-extension folder itself into the
should contain META-INF and WEB-INF folders at root of the archive, it should
not contain ldap-extension folder. That’s why you need to go to inside the folder first.
You should have ldap-extension packaged in .war when deploying it to production. However when testing, if you feel uncomfortable having to edit a .war, you can skip compressing it. In Tomcat, just deploy the original folder ldap-extension.
If the integration was successful, the directory users and groups will appear in eXo Platform under the menu Administration –> Users –> Manage Users.
How to map multiple DNs for users?¶
eXo Platform allows to map users dispatched in multiple directory DNs, like this:
In such case, you should, in addition to previous steps described in the Quick start section, follow these steps:
Open the configuration file
Search for the option ctxDNs.
Define the different locations of DNs where your directory users are located:
<option> <name>ctxDNs</name> <value>ou=People,o=acme,dc=example,dc=com</value> <value>ou=People,o=emca,dc=example,dc=com</value> </option>
Since only one type of user can be defined, all users of these DNs must share the same attributes mapping.
How to change default mandatory users attributes mapping?¶
There are five attributes that should always be mapped (because they are mandatory in eXo Platform):
The username mapping is defined by the option
<option> <name>idAttributeName</name> <value>...</value> </option>
The password mapping is defined by the option
<option> <name>passwordAttributeName</name> <value>...</value> </option>
The firstname, lastname and email mapping are defined in user attributes:
<attribute> <name>firstName</name> <mapping>givenName</mapping> ... </attribute> <attribute> <name>lastName</name> <mapping>sn</mapping> ... </attribute> <attribute> <name>email</name> <mapping>mail</mapping> … </attribute>
The default mapping defined in the provided sample configuration files for OpenLDAP and MSAD directories is summarized in the following table:
eXo Platform Configuration attribute OpenLDAP default value MSAD default value username Option
uid cn password Option
userPassword unicodePwd firstname Attribute
cn givenname lastname Attribute
sn sn Attribute
You can update them in the file picketlink-idm-ldap-config.xml to match your specific mapping.
How to map additional user attributes?¶
As described in the previous section, by default, only 5 attributes are mapped from a directory user to an eXo Platform user.
Additional user attributes can be mapped by configuration by adding new
attribute element in the
attributes section of
the USER identity object type. For example if you want to map a directory attribute title to eXo Platform attribute user.jobtitle,
you must add this configuration snippet under the “attributes” tag in the file
picketlink-idm-ldap-config.xml, as follows:
<attributes> ... <attribute> <name>user.jobtitle</name> <mapping>title</mapping> <type>text</type> <isRequired>false</isRequired> <isMultivalued>false</isMultivalued> <isUnique>false</isUnique> </attribute> ... </attributes>
How to map multiple DNs for groups?¶
As in previous sections, we assume that you already have a populated directory and some groups that should be mapped into eXo Platform.
To be clear about the LDAP “group”, it should be the “groupOfNames” objectClass in OpenLDAP or “group” objectClass in Active Directory. In OpenLDAP (default core.schema), the groupOfNames must have the member attribute.
Under the context DN (ou=Groups,o=acme,dc=example,dc=com), there are several groups as shown in the diagram below:
In this case, you should, in addition to previous steps described in the Quick start section, follow these steps:
Open the configuration file
Search for the option ctxDNs to define the multiple locations of DNs where your directory groups are located:
<option> <name>ctxDNs</name> <value>ou=Groups,o=acme,dc=example,dc=com</value> <value>ou=Groups,o=emca,dc=example,dc=com</value> </option>
How to map directory groups to a new eXo Platform group?¶
In the Quick start chapter we map the directory groups to default eXo Platform groups
/organization. In this chapter we will learn how to map directory groups into a new eXo Platform group.
Let’s say we want to map the groups contained in the directory
DN o=acme,dc=example,dc=com into the eXo Platform group
As a prerequisite, the group /acme must be already created in eXo Platform.
Then this new object type must be referenced in the PortalRepository repository:
<repository> <id>PortalRepository</id> ... <identity-store-mapping> <identity-store-id>PortalLDAPStore</identity-store-id> <identity-object-types> ... <identity-object-type>acme_groups_type</identity-object-type> ... </identity-object-types> </identity-store-mapping>... </repository>
Besides the PicketLink configuration, the eXo service configuration defined in the file
idm-configuration.xmlmust be updated. A new entry must be added in the fields
ignoreMappedMembershipTypeGroupListto map the group defined in PicketLink configuration with the eXo Platform group, as follows:
<component> <key>org.exoplatform.services.organization.OrganizationService</key> <type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type> ... <field name="groupTypeMappings"> <map type="java.util.HashMap"> .. <entry> <key><string>/acme/*</string></key> <value><string>acme_groups_type</string></value> </entry> </map> </field> ... <field name="ignoreMappedMembershipTypeGroupList"> <collection type="java.util.ArrayList" item-type="java.lang.String"> <value><string>/acme/*</string></value> ... </collection> </field> ... </component>
This section is a complete description of the available configuration options. It lists the options of both eXo configuration and PicketLink configuration.
The eXo configuration related to PicketLink integration is defined in these 2 services:
You can adapt the configuration by updating these services configuration
in the file
idm-configuration.xml as described in the Quick Start section.
Frequently asked questions¶
A: Not any condition except that the top DN should be created before being integrated.
You should ensure that the Directory contains an entry like the following:
dn: dc=example,dc=com objectClass: top objectClass: domain dc: example
A: LDAP users are visible in the Users and Groups Management Page but they are unable to sign in eXo Platform. More exactly, they do not have access permission to any pages.
Additional steps should be done to allow them to sign in:
Manually add users to the appropriate groups
It is performed in the User and Group Management Page (http://[your_host]:[your_port]/portal/g/:platform:administrators/administration/management). Just go to this page and add users to appropriate groups. The /platform/users group is required to access the intranet page.
A: Use this option:
<option> <name>entrySearchScope</name> <value>subtree</value> </option>
See more details at PicketLink IDM configuration.
A: This may happen with OpenLDAP, when users are created successfully but they cannot login, and there is error code 49 in your LDAP log as follows:
5630e5ba conn=1002 op=0 BIND dn="uid=firstuser,ou=People,o=portal,o=gatein,dc=steinhoff,dc=com" method=128 5630e5ba do_bind: version=3 dn="uid=firstuser,ou=People,o=portal,o=gatein,dc=steinhoff,dc=com" method=128 5630e5ba ==> bdb_bind: dn: uid=firstuser,ou=People,o=portal,o=gatein,dc=steinhoff,dc=com 5630e5ba bdb_dn2entry("uid=firstuser,ou=people,o=portal,o=gatein,dc=steinhoff,dc=com") 5630e5ba => access_allowed: result not in cache (userPassword) 5630e5ba => access_allowed: auth access to "uid=firstuser,ou=People,o=portal,o=gatein,dc=steinhoff,dc=com" "userPassword" requested 5630e5ba => dn:  5630e5ba <= acl_get: done. 5630e5ba => slap_access_allowed: no more rules 5630e5ba => access_allowed: no more rules 5630e5ba send_ldap_result: conn=1002 op=0 p=3 5630e5ba send_ldap_result: err=49 matched="" text="" 5630e5ba send_ldap_response: msgid=1 tag=97 err=49
To resolve this, add an ACL (Access Control List) rule in the
slapd.conf file as below:
# Access and Security Restrictions (Most restrictive entries first) access to attrs=userPassword by self write ## by dn.sub="ou=admin,dc=domain,dc=example" read ## not mandatory, useful if you need grant a permission to a particular dn by anonymous auth by users none access to * by * read