Spring boot Spring Security+;启用SSL/TLS时,LDAP抛出错误凭据,但凭据正确

Spring boot Spring Security+;启用SSL/TLS时,LDAP抛出错误凭据,但凭据正确,spring-boot,authentication,ssl,spring-security,spring-ldap,Spring Boot,Authentication,Ssl,Spring Security,Spring Ldap,我在web应用程序中使用SpringSecurity、SpringLDAP和SpringBoot 在我使用ldaps启用SSL/TSL之前,身份验证工作正常 我如何启用SSL: 从安全团队收到根+中间CA证书,并在运行此应用程序时添加以下VM参数 -Djavax.net.ssl.keyStore= -Djavax.net.ssl.keystrepassword=pass -Djavax.net.ssl.trustStore= -Djavax.net.ssl.trustStorePassword=

我在web应用程序中使用SpringSecurity、SpringLDAP和SpringBoot

在我使用ldaps启用SSL/TSL之前,身份验证工作正常

我如何启用SSL:

  • 从安全团队收到根+中间CA证书,并在运行此应用程序时添加以下VM参数

    -Djavax.net.ssl.keyStore=
    -Djavax.net.ssl.keystrepassword=pass
    -Djavax.net.ssl.trustStore=
    -Djavax.net.ssl.trustStorePassword=pass

  • 2.将ldap url更改为ldaps

    3.将ldap端口从3268更改为636

  • 覆盖默认身份验证状态,如下所示

    LdapContextSource contextSource=new LdapContextSource();
    AbstractTlsDirContextAuthenticationStrategy statregy=新的默认TLSDirContextAuthenticationStrategy();
    statregy.setShutdownTlsGracefully(真);
    setAuthenticationStrategy(statregy)

  • 即使我使用了正确的凭证,我也犯了以下错误。 请注意,相同的凭据在没有SSL的情况下可以正常工作


    我遗漏了什么吗?

    您能检查LDAP服务器端的LDAP响应代码吗?它是否显示LDAP错误“49”(无效凭据)?能否请检查LDAP服务器端的LDAP响应代码?它是否显示LDAP错误“49”(无效凭据)?