Codementor Events

Spring boot ldap authentication issues

Published Jan 13, 2020

Start writing here...Spring boot ldap configuraiton.

I am getting the below exception, even though credentials are correct and this is authenticating with plain java code using initialcontext

2020-01-13 11:24:46.008 DEBUG 15376 --- [nio-8206-exec-6] w.a.UsernamePasswordAuthenticationFilter : Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials

org.springframework.security.authentication.BadCredentialsException: Bad credentials
at org.springframework.security.ldap.authentication.BindAuthenticator.authenticate(BindAuthenticator.java:101)


I am unable to authenticate with ldap user using the below springboot ldap configuration. please help

auth
.ldapAuthentication()
.contextSource()
.url("ldap://192.168.101.254:389/DC=LDAPTest,DC=com")
.managerDn("administrator@ldaptest.com")
.managerPassword("Pass@1234$!2")
.and()
.userSearchBase("OU=CRYSTAL,DC=LDAPTest,DC=com");

Discover and read more posts from Saritha B
get started
post commentsBe the first to share your opinion
Show more replies