Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAPS useSLL=true #462

Open
doosting opened this issue Aug 24, 2022 · 1 comment
Open

LDAPS useSLL=true #462

doosting opened this issue Aug 24, 2022 · 1 comment

Comments

@doosting
Copy link

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
@bendem
Copy link

bendem commented Feb 14, 2023

you set useSSL=true, but you left the protocol as ldap://. Do you use SSL (ldaps://) or starttls (ldap:// and connection upgrade)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants