<< 使用Apache做负载均衡和Web服务器 | 首页 | 使用NekoHTML和XPath获取网页特定标签 >>

Yale CAS 证书以及Tomcat下配置

Yale CAS证书以及Tomcat下配置

cas server端:
keytool -genkey -alias tomcat -keyalg RSA  //默认生成.keystore
keytool -export -file server.crt -alias tomcat  //生成证书server.crt

 

cas client端://导入证书server.crt到JVM客户端
keytool -import -keystore $JAVA_HOME\jre\lib\security\cacerts -file server.crt -alias tomcat

 


服务器端:
keytool -genkey -alias tomcat -keyalg RSA -keypass changeit -storepass changeit -keystore server.keystore -validity 3600 //CN(用户名)输入机器名或域名
keytool -export -trustcacerts -alias tomcat -file server.cer -keystore  server.keystore -storepass changeit
server.xml:
    <Connector port="8443" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
        keystoreFile="F:\server.keystore"
               keystorePass="changeit" />


客户端://将证书导入客户端的JRE里ca证书
keytool -import -trustcacerts -alias tomcat -file server.cer -keystore  $JAVA_HOME/jre/lib/security/cacerts -storepass changeit

客户端web.xml
   <filter-name>CAS Filter</filter-name>
   <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
     <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
        <param-value>https://dell:8443/cas/login</param-value><!--可以是ip地址-->
     </init-param>
     <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
        <param-value>https://dell:8443/cas/serviceValidate</param-value><!--cas服务器端,必须是机器名或域名-->
     </init-param>
     <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
        <param-value>10.200.26.65:8080</param-value><!--cas客户端-->
     </init-param>
  </filter>

标签 :



发表评论 发送引用通报