This chapter will help you integrate eXo Platform 3.0 to your information system.

The predefined membership types are specified in the membershipType field of the OrganizationConfig plugin parameter.

The predefined groups are specified in the group field of the OrganizationConfig plugin parameter.

The predefined users are specified in the membershipType field of the OrganizationConfig plugin parameter.

If you have an existing LDAP server, the eXo predefined settings will likely not match your directory structure. eXo LDAP organization service implementation was written with flexibility in mind and can certainly be configured to meet your requirements.

The configuration is done in ldap-configuration.xml file, and this part will explain the numerous parameters which it contains.

Firstly, start by connection settings which will tell eXo how to connect to your directory server. These settings are very close to JNDI API context parameters. This configuration is activated by the init-param ldap.config of service LDAPServiceImpl.

<component>
  <key>org.exoplatform.services.ldap.LDAPService</key>
  <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
  <init-params>
    <object-param>
      <name>ldap.config</name>
      <description>Default ldap config</description>
      <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
        <field name="providerURL"><string>ldap://127.0.0.1:389,10.0.0.1:389</string></field>
        <field name="rootdn"><string>CN=Manager,DC=exoplatform,DC=org</string></field>
        <field name="password"><string>secret</string></field>
        <!-- field  name="authenticationType"><string>simple</string></field-->           
        <field name="version"><string>3</string></field>
        <field name="referralMode"><string>follow</string></field>      	    
        <!-- field  name="serverName"><string>active.directory</string></field-->
      </object>
    </object-param>
  </init-params>
</component>
  • providerURL: LDAP server URL (see PROVIDERURL ). For multiple LDAP servers, use comma separated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389).

  • rootdn: distinguished name of user that will be used by the service to authenticate on the server (see SECURITYPRINCIPAL ).

  • password: password for user rootdn (see SECURITYCREDENTIALS ).

  • authenticationType: type of authentication to be used (see SECURITYAUTHENTICATION ). Use one of none, simple, strong. Default is simple.

  • version: LDAP protocol version (see java.naming.ldap.version). Set to 3 if your server supports LDAP V3.

  • referalMode: one of follow, ignore, throw (see REFERRAL).

  • serverName: you will need to set this to active.directory to work with Active Directory servers. Any other value will be ignored and the service will act as on a standard LDAP.

Next, you need to configure the eXo OrganizationService to show how the directory is structured and how to interact with it. This is managed by a couple of init-params: ldap.userDN.key and ldap.attribute.mapping in file ldap-configuration.xml (by default located at portal.war/WEB-INF/conf/organization)

ldap.attribute.mapping maps your LDAP to eXo. At first, there are two main parameters to configure in it:

Other parameters are discussed in the following sections.

Here are the main parameters to map eXo users to your directory:

Example:

However, if users exist deeply under userURL, eXo will be able to retrieve them.

Example:

Example: john and tom will be recognized as valid eXo users but EMEA and France entries will be ignored in the following subtree:

When a new user is created, an entry will be created with the given objectClass attributes. The classes must at least define cn and any attribute referenced in the user mapping.

Example: Adding the user Marry Simons could produce:

eXo groups can be mapped to organizational or applicative groups defined in your directory.

Groups can be structured hierarchically under groupsURL. Example: Groups communication, communication/marketing and communication/press would map to:

When a new group is created, an entry will be also created with the given objectClass attributes. The classes must define at least the required attributes: ou, description and l.

Example: Adding the group human-resources could produce:

Example: groups WebDesign, WebDesign/Graphists and sales could be retrieved in:

Memberships are used to assign a role within a group. They are entries that are placed under the group entry of their scope group. Users in this role are defined as attributes of the membership entry. Example: To designate tom as the manager of the group human-resources:

The parameters to configure memberships are:

When a new membership is created, an entry will be also created with the given objectClass attributes. The classes must at least define the attribute designated by membershipTypeMemberValue. Example: Adding membership validator would produce:

Values should be a user dn.

Example: james and root, who have admin role within the group human-resources, would give:

For example, in the following membership entry:

cn attribute is used to designate the manager membership type. In other words, the name of role is given by the 'cn' attribute.

You can use rather complex filters. Example: Here is a filter used for a customer that needs to trigger a dynlist overlay on openldap.

Here is an alternative configuration for active directory that you can find in activedirectory-configuration.xml

Here is how to use LDAPs protocol with the Active Directory:

[...]
  <component>
  <key>org.exoplatform.services.ldap.LDAPService</key>
[..]
        <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">         
         <!-- for multiple ldap servers, use comma seperated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
	 <!-- whether or not to enable ssl, if ssl is used ensure that the javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
	 <!-- exo portal default installed javax.net.ssl.trustStore with file is java.home/lib/security/cacerts-->
	 <!-- ldap service will check protocol, if protocol is ldaps, ssl is enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 ) -->
	 <!-- when enable ssl, ensure server name is *.directory and port (Ex. active.directory) -->	  		 
	 <field name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
 	 <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
	 <field name="password"><string>site</string></field> 		
	 <field name="version"><string>3</string></field>	            
    	 <field name="referralMode"><string>ignore</string></field>     	       	       
    	 <field name="serverName"><string>active.directory</string></field>    	       	  
      	</object>
[..]
  </component>
  <component>
    <key>org.exoplatform.services.organization.OrganizationService</key>
    [...]
        <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">                
          [...]
          <field name="userAuthenticationAttr"><string>mail</string></field>
          <field name="userUsernameAttr"><string>sAMAccountName</string></field>
          <field name="userPassword"><string>unicodePwd</string></field> 
          <field name="userLastNameAttr"><string>sn</string></field>
          <field name="userDisplayNameAttr"><string>displayName</string></field>
          <field name="userMailAttr"><string>mail</string></field>
          [..]
          <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
          <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
          [..]
          <field name="membershipLDAPClasses"><string>top,group</string></field>
          <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
        </object>
        [...]  
</component>