java - 与 AD 通信时出错 - 重新协商期间服务器证书更改受到限制

标签 java active-directory ldap certificate

我们间歇性地收到错误,我们的应用无法连接到 Active Directory。

我们当前使用的是 jBoss 5Java 7,并计划将来升级到 6 和 8。这可能是由于域 Controller 上的证书错误造成的吗?

错误

  javax.naming.CommunicationException: simple bind failed: ad.xxx.com:636 [Root exception is javax.net.ssl.SSLHandshakeException: server certificate change is restrictedduring renegotiation]
        at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:218)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2740)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
Caused by: javax.net.ssl.SSLHandshakeException: server certificate change is restrictedduring renegotiation
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:269)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1409)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:709)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:431)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:404)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:358)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:213)
    ... 54 more

最佳答案

我相信客户端层代码中的此错误消息是 Java 更新中的“SSL V3.0 Poodle 漏洞 - CVE-2014-3566”之后代码强化的结果。

恕我直言,这是 Java 的一个错误。

根据我的观察和了解,这是由于 Java 客户端与您的情况下的同一服务器(Microsoft Active Directory)有现有的 SSL 连接所致。

Java 客户端尝试执行 Full Handshake 失败并尝试恢复之前连接的 TLS 握手。

看来您可以通过 disable SSL v3.0 in TLS Client Oracle JDK and JRE 执行解决方法.

有关此问题的任何其他反馈将不胜感激。

关于java - 与 AD 通信时出错 - 重新协商期间服务器证书更改受到限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48830765/

相关文章:

c# - 将 User.Identity.Name 解析为 Domain\Username 的内置帮助程序

javascript - MSAL 2.*.js 是否适用于 IE 11?

node.js - 连接到 LDAP 并绑定(bind)到更多 "general"DN 来搜索用户需要什么?

java - 在 Apache POI 中,有没有办法通过 id 访问 XWPF 元素的 id?

java - Hibernate JPA 递归查询

powershell - 在 PowerShell 中,如何确定加入域的计算机是否连接到域网络?

python - 尝试使用 python-ldap 模块通过 TLS 连接到 LDAP 服务器

java - 玩!使用 LDAP 的框架身份验证

java - @sign 有什么作用?

Java put方法调用与自身比较的目的是什么