LDAP HTTPS Trustore 失败 Spring 安全升级

问题描述

我正在将 Spring Boot 从 2.1.6 升级到 2.4.6 版本,将 Spring Cloud 从 Greenwich 升级到 2020.0.3 版本。如果我尝试使用带有 trustore.jks 证书的 HTTPS 连接到 ldap,则相同的代码将失败。我在日志中有消息: “o.s.s.o.p.e.TokenEndpoint:处理错误:InternalAuthenticationServiceException,与 LDAP 服务器的连接失败。”

"Caused by: org.springframework.ldap.CommunicationException: simple bind Failed: dc-1.land.net:636; 嵌套异常为 javax.naming.CommunicationException: simple bind Failed: dc-1.land.net: 636 [根异常是 javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径]在 org.springframework .ldap.support.LdapUtils.convertLdapException(LdapUtils.java:108)"

解决方案是什么?

问候。

macshaker6

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)