How to configure the IQ Server to trust an LDAP Server SSL certificate

In the case of connecting the IQ Server to a secure LDAP Server using SSL ( ldaps:// ), it is common for the LDAP server to be using a self-signed certificate that the JVM running CLM server does not yet trust. A common error message in this case is:

javax.naming.CommunicationException: [Root exception is PKIX path building failed: unable to find valid certification path to requested target]

In order to establish trust in this self-signed certificate, you have to import the LDAP SSL certificate into a keystore file and feed this file as the truststore to the IQ Server.

Here are the basic steps:

  1. Determine the Java install that IQ Server is using and locate the default truststore file included with Java. See our guide for how to determine the truststore file being used.
    Make a copy of that cacerts file to the same directory where nexus-iq-server-<version>.jar is located. Name the copy nexus-iq-server-outbound.jks so that the purpose of this file is very clear.
  2. Get the LDAPS server certificate and save it to a PEM encoded format text file - here is one way to do this using OpenSSL:
    echo -n | openssl s_client -showcerts -connect ldaphost:636 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ldaps.pem
  3. Import the LDAPS server PEM encoded certificate into the truststore that IQ Server will use:
    keytool -importcert -file ldaps.pem -alias nexus-iq-server-ldaps-cert -trustcacerts -keystore nexus-iq-server-outbound.jks -storepass changeit
  4. Change the command used to launch IQ Server so that the new truststore is used, as specified by additional Java command line system properties:<replace_with_absolute_full_path>/nexus-iq-server-outbound.jks
Have more questions? Submit a request


Article is closed for comments.