I have to integrate LDAP with two different services: exoPlatform and Liferay. So I set up an LDAP server via a Docker image with these configurations:
- Server Name: openldap
- Base Provider URL: ldap://openldap:389
- Base DN: cn=users,ou=Platform,o=acme,dc=example,dc=org
My admin account is just: cn=admin
With exoPlatform, it works fine, I can log in with my LDAP accounts. Here the configurations in the picketlink-idm-openldap-config.xml:
<option>
<name>providerURL</name>
<value>ldap://openldap:389</value>
</option>
<option>
<name>adminDN</name>
<value>cn=admin,dc=example,dc=org</value>
</option>
<option>
<name>adminPassword</name>
<value>admin</value>
</option>
But for Liferay, it tells me that the host is not known...
Unable to bind to the LDAP server
liferay | javax.naming.CommunicationException: openldap:389 [Root exception is java.net.UnknownHostException: openldap]
Caused by: java.net.UnknownHostException: openldap
I don't know if it's related but I'll say it anyway just in case, I have 2 different docker-compose that I launch at the same time:
- one that contains the images
openldap
,phpldapadmin
,exoPlatform
andmysql1
- one that contains the
liferay
andmysql2
images
I am also behind a corporate proxy, but I don't remember having done anything special for exoPlatform. I simply added the proxy settings to Catalina Tomcat for my exoPlatform and Liferay images.
Also, I have set LDAP authentication to enabled
in the Liferay control panel with the Bind method
.