我试图通过JAAS将应用程序身份验证从LDAP (工作正常)切换到LDAPS。应用程序在JVM上运行。我跟踪供应商如何(Rundeck - problem with jaas LDAPS configuration),但我面临一个问题。
来自日志:
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: javax.net.ssl.SSLPeerUnverifiedException: Certificate for <ActiveDirectoryIP> doesn't match any of the subject alternative names: <ActiveDirectoryFQDN>我注意到,DNS中的ActiveDirectoryFQDN是小写,但在从openssl s_client命令导入的cert/pem中,则是大写。SSL证书不应该区分大小写,但是Java可能会以相反的方式对待它吗?作为一种解决方法,我试图在/etc/host中添加大写的ActiveDirectoryFQDN条目,并修改/etc/nsswitch以:
hosts: files [success=return] dns但没有joy。我不能修改DNS。
是否存在忽略SSLHandshakeException错误和/或通常禁用JVM (低端选项)的SSL验证的论点?
发布于 2021-02-23 05:17:05
不知道为什么我之前没有想过--解决方案很简单:在应用程序配置<ActiveDirectoryIP>中,只需将<ActiveDirectoryFQDN>替换为AD证书,只为AD (IPs没有alt)。
https://stackoverflow.com/questions/66116731
复制相似问题