When an external organizational data source (LDAP server, MS ActiveDirectory) is used, eXo Platform must be notified of any changes on organizational entities, including addition, deletion and update. These changes are reflected in the backend settings of eXo Platform. These notifications are performed thanks to several means provided by eXo Platform. Pick up one of the following use cases related to your needs.

Pick up one of the following use cases of integration execution related to your needs.

You could enforce the integration of some organizational elements via REST or JMX. See the operations you can perform in the following table.

OperationDescription
invokeAllListenersSynchronize and integrate all organizational elements.
invokeGroupsListenersSynchronize and integrate all groups stored in the data source.
invokeGroupListenersSynchronize and integrate a selected group stored in the data source.
invokeUsersListenersSynchronize and integrate all users stored in the data source.
invokeUserListenersSynchronize and integrate a selected user stored in the data source.
invokeMembershipListenersSynchronize and integrate a specific membership.

You can select the periodic integration of the whole organizational elements which are not integrated yet. This feature is not activated automatically in the eXo Platform distribution. To do so, you will have to add this configuration:

You need to modify the expression property value to change the period according to the CRON Expression documentation. The value presented above means that this job is executed at 23:45:00 everyday.

The organization integration management API is also exposed as REST. You need to login as an administrator first, then use one of those links:

Para-valueDescription
USERNAMESelect a username.
EVENT

Select one of the following values.

- ADDED - Select this option if the user is not yet integrated into eXo Platform. This will integrate the use and his/her memberships and groups.

- UPDATED - Select this option if the user field or membership has been modified/added/deleted. This will update the user profiles integrated into eXo Platform and all related memberships.

- DELETED - Select this option if the user has been deleted from the organization data source. So the user profile will be deleted from eXo Platform.

Para-valueDescription
EVENT

Select one of the following values:

- ADDED - Search for users who are added to the Organization data source, but not yet integrated. Those users will then be synchronized.

- UPDATED - Search for users that are present in the Organization data source and already integrated into eXo Platform. Those profiles will be updated.

- DELETED - Search for users that are deleted from the Organization data source, but their profiles are still always existing in eXo Platform. Those profiles are then deleted.

Also, you can request for synchronizing all users.

Para-valueDescription
GROUP_IDSelect a groupId, such as /platform/users.
EVENT

Select one of the following values:

- ADDED - Select this option if the group is not yet integrated into eXo Platform. This will integrate the group.

- UPDATED - This option is not used any longer.

- DELETED - Select this option if the group has been deleted from Organization data source. The group profile is then deleted from eXo Platform.

Para-valueDescription
EVENT

Select one of the following values:

- ADDED - Search for groups that are added to the Organization data source, but not yet integrated into eXo Platform. Those groups will be integrated.

- UPDATED: This option is not used any longer.

- DELETED - Search for groups that are deleted from the Organization data source, but their profiles are still existed in eXo Platform. Those profiles are then deleted.

You can also request for synchronizing all groups.

Para-valueDescription
GROUP_IDSelect a groupId, such as /platform/users.
USERNAMESelect a username.
EVENT

Select one of the following values:

- ADDED - Search for memberships that are added to the Organization data source, but not yet integrated into eXo Platform. Those memberships will be integrated.

- UPDATED - This option is not used any longer.

- DELETED - Search for memberships that are deleted from the Organization data source. This will synchronize user's memberships related to the selected group.

To access the Integration Service features via JMX, you can use JMX-compliant monitoring tools, such as JConsole. The name of the MBean is: exo:portal="portal",service=extensions,name=OrganizationIntegrationService,type=platform.

If you used one of those Organization Data Models.

in a previous version of eXo Platform, you will be able to keep working with them on eXo Platform 3.5.

Configure Legacy Organization Services

1. Add a new file named configuration.xml in ${exo.conf.dir.name}/portal/portal/ with the following configuration.

2. Add a new file named legacy-organization-configuration.xml in ${exo.conf.dir.name}/portal/portal with one of the contents below.

Hibernate Organization Service configuration



<configuration xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
  <component>
    <key>org.exoplatform.services.organization.OrganizationService</key>
    <type>org.exoplatform.services.organization.hibernate.OrganizationServiceImpl</type>
  </component>
  <external-component-plugins>
    <target-component>org.exoplatform.services.database.HibernateService</target-component>
    <component-plugin> 
      <name>add.hibernate.mapping</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
      <init-params>
        <values-param>
          <name>hibernate.mapping</name>
          <value>org/exoplatform/services/organization/impl/UserImpl.hbm.xml</value>
          <value>org/exoplatform/services/organization/impl/MembershipImpl.hbm.xml</value>
          <value>org/exoplatform/services/organization/impl/GroupImpl.hbm.xml</value>
          <value>org/exoplatform/services/organization/impl/MembershipTypeImpl.hbm.xml</value>
          <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
        </values-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  <import>classpath:/conf/portal/organization-configuration.xml</import>    
</configuration>  

LDAP Organization Service configuration



<configuration xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
    <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="version"><string>3</string></field>
                    <field name="minConnection"><int>5</int></field>
                    <field name="maxConnection"><int>10</int></field>       
                    <field name="referralMode"><string>follow</string></field>  
                    <field name="serverName"><string>default</string></field>
                </object>
            </object-param>
        </init-params>
    </component>
    <component>
        <key>org.exoplatform.services.organization.OrganizationService</key>
        <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
        <component-plugins>
            <component-plugin>
                <name>init.service.listener</name>
                <set-method>addListenerPlugin</set-method>
                <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
                <description>this listener populate organization ldap service create default dn</description>      
            </component-plugin>  
        </component-plugins> 
        <init-params>
            <value-param>
                <name>ldap.userDN.key</name>
                <description>The key used to compose user DN</description>
                <value>cn</value>
            </value-param>
            <object-param>
                <name>ldap.attribute.mapping</name>
                <description>ldap attribute mapping</description>
                <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">                
                    <field name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field>
                    <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
                    <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
                    <field name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
                    <field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
                    <field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
                    <field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
                    <field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
                    <field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
                    <field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
                    <field name="userUsernameAttr"><string>uid</string></field>
                    <field name="userPassword"><string>userPassword</string></field>
                    <field name="userFirstNameAttr"><string>givenName</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="userObjectClassFilter"><string>objectClass=person</string></field>
                    <field name="membershipTypeMemberValue"><string>member</string></field>
                    <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
                    <field name="membershipTypeNameAttr"><string>cn</string></field>
                    <field name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field>
                    <field name="membershiptypeObjectClass"><string>organizationalRole</string></field>
                    <field name="groupObjectClass"><string>organizationalUnit</string></field>
                    <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
                    <field name="membershipObjectClass"><string>groupOfNames</string></field>
                    <field name="membershipObjectClassFilter"><string>objectClass=groupOfNames</string></field>
                    <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
                    <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
                    <field name="ldapDescriptionAttr"><string>description</string></field>
                </object>
            </object-param>
        </init-params>     
    </component>

    <external-component-plugins>
        <target-component>org.exoplatform.services.database.HibernateService</target-component>
        <component-plugin> 
            <name>add.hibernate.mapping</name>
            <set-method>addPlugin</set-method>
            <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
            <init-params>
                <values-param>
                    <name>hibernate.mapping</name>          
                    <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
                </values-param>
            </init-params>
        </component-plugin>
    </external-component-plugins>
</configuration>

AD Organization Service configuration



<configuration xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
  <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://192.168.2.88:389</string></field>
          <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
          <field name="password"><string>Secret1234</string></field>
          <field name="version"><string>3</string></field>
          <field name="minConnection"><int>5</int></field>
          <field name="maxConnection"><int>10</int></field>
          <field name="referralMode"><string>ignore</string></field>
          <field name="serverName"><string>active.directory</string></field>
        </object>
      </object-param>
    </init-params>
  </component>
  <component>
    <key>org.exoplatform.services.organization.OrganizationService</key>
    <type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
    <component-plugins>
      <component-plugin>
        <name>init.service.listener</name>
        <set-method>addListenerPlugin</set-method>
        <type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
        <description>this listener populate organization ldap service create default dn</description>
      </component-plugin>
    </component-plugins>
    <init-params>
      <object-param>
        <name>ldap.attribute.mapping</name>
        <description>ldap attribute mapping</description>
        <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
          <field name="userLDAPClasses"><string>top,person,organizationalPerson,user</string></field>
          <field name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
          <field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
          <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
          <field name="membershipLDAPClasses"><string>top,group</string></field>
          <field name="baseURL"><string>DC=test,DC=man</string></field>
          <field name="groupsURL"><string>ou=groups,ou=portal,DC=test,DC=man</string></field>
          <field name="membershipTypeURL"><string>ou=memberships,ou=portal,DC=test,DC=man</string></field>
          <field name="userURL"><string>ou=users,ou=portal,DC=test,DC=man</string></field>
          <field name="profileURL"><string>ou=profiles,ou=portal,DC=test,DC=man</string></field>
          <field name="userUsernameAttr"><string>sAMAccountName</string></field>
          <field name="userPassword"><string>unicodePwd</string></field>
          <field name="userFirstNameAttr"><string>givenName</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="userObjectClassFilter"><string>objectClass=user</string></field>
          <field name="membershipTypeMemberValue"><string>member</string></field>
          <field name="membershipTypeRoleNameAttr"><string>cn</string></field>
          <field name="membershipTypeNameAttr"><string>cn</string></field>
          <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
          <field name="membershiptypeObjectClass"><string>group</string></field>
          <field name="groupObjectClass"><string>organizationalUnit</string></field>
          <field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
          <field name="membershipObjectClass"><string>group</string></field>
          <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
          <field name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
          <field name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
          <field name="ldapDescriptionAttr"><string>description</string></field>
        </object>
      </object-param>
    </init-params>
  </component>
  <external-component-plugins>
    <target-component>org.exoplatform.services.database.HibernateService</target-component>
    <component-plugin>
      <name>add.hibernate.mapping</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
      <init-params>
        <values-param>
          <name>hibernate.mapping</name>
          <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
        </values-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
</configuration>