spring-ldap icon indicating copy to clipboard operation
spring-ldap copied to clipboard

Certificate based mutual authentication failing for LDAP server

Open zishanjms opened this issue 5 years ago • 0 comments
trafficstars

I am using Spring-Ldap's LdapTemplate to create the connection between client and the LDAP server providing the custom socket factory with the key-manager which includes client-certificate and trust-store which includes server certificate. Hitting the below exception:

Caused by: javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C09125A, comment: TLS or SSL already in effect, data 0, v3839]
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3194)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3100)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2891)
    at com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3279)
    at javax.naming.ldap.InitialLdapContext.extendedOperation(InitialLdapContext.java:184)
    at org.springframework.ldap.core.support.AbstractTlsDirContextAuthenticationStrategy.processContextAfterCreation(AbstractTlsDirContextAuthenticationStrategy.java:131)
    at org.springframework.ldap.core.support.AbstractContextSource.doGetContext(AbstractContextSource.java:142)
    ... 16 common frames omitted

Didn't find any concrete answer to the problem. Any suggestion would be appreciated.

zishanjms avatar Jun 24 '20 06:06 zishanjms