我们间歇性地收到错误,我们的应用无法连接到 Active Directory。
我们当前使用的是 jBoss 5
和 Java 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/