gpt4 book ai didi

single-sign-on - 如何为 CAS 和客户端(不同的机器)设置 SSL

转载 作者:行者123 更新时间:2023-12-04 20:18:28 26 4
gpt4 key购买 nike

如何在不同的机器上为 CAS 服务器和客户端设置 ssl 证书(自签名)

  • CAS 服务器:Linux、Tomcat、jdk6
  • 客户端:windows、Tomcat、jdk6
  • 证书:自签名(keytool)
  • 环境:开发

  • CAS 和客户端在单台机器上工作正常,如果使用不同的机器,则会抛出证书错误。

    单个自签名证书对于客户端和服务器机器是否足够?

    需要任何特定的客户端和服务器设置更改,例如用于证书创建的服务器机器名称和客户端机器名称

    最佳答案

    您能否添加您正在获取的异常以及在哪个节点中?

    作为一般建议,请注意:

    1) 如果您在服务器端使用 cas 客户端和 CAS 服务器之间的 https 通信,则必须在客户端 JVM 机器上安装证书

    2) JVM 将不接受(在运行时)带有 CN(通用名称)中的 ip 的自签名证书。

    https://wiki.jasig.org/display/CASUM/SSL+Troubleshooting+and+Reference+Guide更多细节

    因此,从您发布的异常来看,似乎是以下情况(引自上面的 CAS 故障排除链接):

    No subject alternative names present Sample Alt Name Stack Trace javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present In most cases this is a hostname/SSL certificate CN mismatch.

    This commonly happens when a self-signed certificate issued to localhost is placed on a machine that is accessed by IP address. It should be noted that generating a certificate with an IP address for a common name, e.g. CN=192.168.1.1,OU=Middleware,dc=vt,dc=edu, will not work in most cases where the client making the connection is Java. For example the Java CAS client will throw SSL errors on connecting to a CAS server secured with a certificate containing an IP address in the CN.



    您是否解决了使用域名而不是 ip 更改证书,然后在 system truststore for the CAS client 中重新安装它的问题?在 CAS 服务器的 keystore 中?

    关于single-sign-on - 如何为 CAS 和客户端(不同的机器)设置 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9331087/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com