8.1.7. Multiple directories

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

Follow this guide in case you want to connect to more than one LDAP directories, for example, you have two OpenLDAP databases with suffixes dc=example,dc=com and dc=example,dc=net.

Basically you will configure two identity stores and map them in the PortalRepository repository.

In this way, you can create different connections using different hosts/ports, credentials, protocols (ldap/ldaps) and even different LDAP implementations, for example, one is MSAD and the other is OpenLDAP.


<repositories>
    <repository>
        <id>PortalRepository</id>
        <identity-store-mappings>
            <identity-store-mapping>
                <identity-store-id>PortalLDAPStore</identity-store-id>
                ...
            </identity-store-mapping>
            <identity-store-mapping>
                <identity-store-id>PortalLDAPStore2</identity-store-id> <!-- the second store -->
                ...
            </identity-store-mapping>
        </identity-store-mappings>
    </repository>
</repositories>
<stores>
    <identity-stores>
        <identity-store>
            <id>HibernateStore</id>
            ...
        </identity-store>
        <identity-store>
            <id>PortalLDAPStore</id>
            ...
        </identity-store>
        <identity-store>
            <id>PortalLDAPStore2</id> <!-- the second store -->
            ...
        </identity-store>
    </identity-stores>
</stores>

Note

It is quite simple if all the LDAP stores are Read-only. But, in Read-Write mode it is important to be aware that all users and groups will be saved to only one store, and it should be the first store.

In other words, it is no use to set the second repository to the Read-Write mode. When a user is created in eXo Platform, the identity object will be saved in the first LDAP store if it is a Read-Write one. And if not, it will be saved in IDM (SQL) database, not in second LDAP store at all.

So for Read-Write mode, and assume you want to store platform groups in LDAP, here is the suggested configuration:

Some other considerations:

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus