Authentication Fails | External login to Cloudera Manager Using LDAPS

0 votes
458 views
asked Aug 20, 2017 in Hadoop by admin (4,410 points)
SummaryExternal login using the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword Java options.
Symptoms

After configuring CM with external LDAPS authentication by following the documentation, the root CA certificate for the LDAPS server has been added into the  trust store configured in the "Cloudera Manager TLS/SSL Certificate Trust Store File" showing in below Cloudera Manager setting for trust store:

Cloudera Manager Truststore configuration

However, users fails to log into Cloudera Manager using AD/LDAP account and below exception is seen from CM server log:

2014-06-27 14:32:52,092 ERROR [647029980@scm-web-16:cmf.CmfLdapAuthenticationProvider@113] LDAP/AD authentication failed /  

org.springframework.ldap.CommunicationException: simple bind failed: ldap.someserver.com:636; nested exception is javax.naming.CommunicationException: /  
simple bind failed: ldap.someserver.com:636 [Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: /  
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target] 
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:100) 
at org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider.bindAsUser(ActiveDirectoryLdapAuthenticationProvider.java:170) 
at org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider.doAuthentication(ActiveDirectoryLdapAuthenticationProvider.java:111)
at org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider.authenticate(AbstractLdapAuthenticationProvider.java:61) 
at com.cloudera.server.web.cmf.CmfLdapAuthenticationProvider.authenticate(CmfLdapAuthenticationProvider.java:104) 
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156) 
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)


 
Applies To
  • Cloudera Manager 4
  • Cloudera Manager 5
  • LDAPS
Cause

Cloudera Manager external authentication using LDAPS requires trust of the Certificate Authority (CA) used to sign the server's certificate. Currently, Cloudera Manager looks to the default JDK trust for that information.

There is an enhancement opened for Cloudera Manager to reuse CM UI configuration for Trust Store. It is still open for future release.





 

Instructions
If the LDAP server certificate has been signed by a trusted Certificate Authority (that is, VeriSign, GeoTrust, and so on), steps 1 and 2 below may not be necessary.
  1. Copy the CA certificate file to the Cloudera Manager Server host.
  2. Import the CA certificate(s) from the CA certificate file to the local truststore. The default truststore is located in the $JAVA_HOME/jre/lib/security/cacerts file. This contains the default CA information shipped with the JDK. Create an alternate default file called jssecacerts in the same location as the cacerts file. You can now safely append CA certificates for any private or public CAs not present in the default cacerts file, while keeping the original file intact.For our example, we will follow this recommendation by copying the default cacerts file into the new jssecacerts file, and then importing the CA certificate to this alternate truststore.
    $ cp $JAVA_HOME/jre/lib/security/cacerts \
    $JAVA_HOME/jre/lib/security/jssecacerts
    
    $ /usr/java/latest/bin/keytool -import -alias nt_domain_name \
    -keystore /usr/java/latest/jre/lib/security/jssecacerts -file path_to_CA_cert
    Note: The default password for the cacerts store is changeit. The -alias does not always need to be the domain name.

    Alternatively, you can use the Java options: javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword. Open the /etc/default/cloudera-scm-server file and add the following options:

    export CMF_JAVA_OPTS="-Xmx2G -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError \
    -XX:HeapDumpPath=/tmp -Djavax.net.ssl.trustStore=/usr/java/default/jre/lib/security/jssecacerts \
    -Djavax.net.ssl.trustStorePassword=changeit"
  3. From Cloudera Manager UI, go to Administration > Settings > External Authentication category, in the LDAP URL property, use ldaps://ldap_server instead of ldap://ldap_server.
  4. Restart the Cloudera Manager Server.
Note: Above steps are also documented in the official Cloudera Manager documentation: Configuring Cloudera Manager to Use LDAP

Please log in or register to answer this question.

...