最近将一个集成了cas sso的web应用部署到weblogic 12c 12.2.1.2.0的时候报如下错误:
Caused By: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
cas启用了https,此错误是由于weblogic没有导入cas服务器的证书导致的。
像往常一样,使用如下命令导入证书到jre默认keystore:
keytool -import -alias cas -keystore /home/biee02/java/jre/lib/security/cacerts -file /home/biee02/java/jre/bin/itebetacom.cer
重启服务,错误依旧。明明已经导入了呀,为撒还是找不到证书呢?
怀疑weblogic使用了不同keystore,查看日志,发现如下:
<Loading trusted certificates from the KSS keystore file kss://system/trust.>
果然,可以看到此处weblogic使用了KSS keystore,其是OPSS中的一个组件。
注:也可以在console中进行查看
既然如此,那就把证书导入到kss://system/trust中吧。