Originally created by: doosting
I have set up ldaps without using SSL. This works
ldap-ad {
//AD example config
com.sun.security.auth.module.LdapLoginModule REQUIRED
userProvider="ldap://xx.xx.xx.xx:389/dc=domain,dc=us"
//authIdentity=sAMAccountName
userFilter="(&(samAccountName={USERNAME})(objectClass=user))"
authzIdentity="{displayName}" //set this to return full name
java.naming.security.authentication="simple"
java.naming.security.principal="cn=ldapacct,ou=ServiceAccounts,dc=domain,dc=us"
java.naming.security.credentials="password"
useSSL=false
debug=true;
};
Now I have to connect to a secured ldaps server with the following:
ldap-ad {
//AD example config
com.sun.security.auth.module.LdapLoginModule REQUIRED
userProvider="ldap://ldaps.domain.corp:636/dc=domain,dc=corp"
//authIdentity=sAMAccountName
userFilter="(&(samAccountName={USERNAME})(objectClass=user))"
authzIdentity="{displayName}" //set this to return full name
java.naming.security.authentication="simple"
java.naming.security.principal="cn=sys_gcp_bastion_ldaps,OU=Top,OU=ServiceAccounts,OU=Accounts,OU=Systems,OU=Corporate,DC=domain,DC=corp"
java.naming.security.credentials="password"
useSSL=true
serverCertificate="/etc/ssl/certificates/keystore.new"
debug=true;
};
Errors
[LdapLoginModule] search-first mode; SSL enabled
[LdapLoginModule] user provider: ldap://ldaps.domain.corp:636/dc=domain,dc=corp
[LdapLoginModule] authentication failed
[LdapLoginModule] aborted authentication
Originally posted by: bendem
you set useSSL=true, but you left the protocol as ldap://. Do you use SSL (ldaps://) or starttls (ldap:// and connection upgrade)?