zoukankan      html  css  js  c++  java
  • CAS的部署

    CAS的架构图

    CAS部署之前需要先准备一下内容

    •   LDAP
    •   安装JDK1.8
    •   tomcat8

        

    对CAS进行打包编译,使用官网提供的 这边选择MAVEN WAR overlays 地址:<a href="https://github.com/apereo/cas-configserver-overlay" target="_black">WAR overlays</a>

        如果相对CAS的配置文件进行编译, 可以在cas-configserver-overlay中进行处理

    1.   如果src目录不存在,先创建src目录
    2.   复制的路径和文件名必须与其构建对应项完全匹配,否则更改将不会生效。 请参阅下表以了解如何将构建中的文件夹和文件映射到src

            eg: 我这边对配置信息进行修改

                这个配置文件 会覆盖默认构建的配置文件

     详细可以参考官网文档 <a href="https://apereo.github.io/cas/development/installation/WAR-Overlay-Installation.html" target="_black">WAR  Overlays</a>

       在pom文件中增加对LDAP的支持

        

    <dependency>
           <groupId>org.apereo.cas</groupId>
           <artifactId>cas-server-support-ldap</artifactId>
           <version>${cas.version}</version>
    </dependency>

    配置LDAP信息(根据自己公司的LDAP服务进行修改) 在cas.properties文件中进行配置

    #cas connection setting
    cas.authn.ldap[0].ldapUrl=ldaps://ldap1.example.edu ldaps://ldap2.example.edu
    cas.authn.ldap[0].bindDn=cn=Directory Manager,dc=example,dc=org
    cas.authn.ldap[0].bindCredential=Password
    
    cas.authn.ldap[0].minPoolSize=3
    cas.authn.ldap[0].maxPoolSize=50
    cas.authn.ldap[0].validateOnCheckout=true
    cas.authn.ldap[0].validatePeriodically=true
    cas.authn.ldap[0].validatePeriod=600
    cas.authn.ldap[0].failFast=true
    cas.authn.ldap[0].idleTime=5000
    cas.authn.ldap[0].prunePeriod=5000
    cas.authn.ldap[0].blockWaitTime=5000
    cas.authn.ldap[0].useSsl=false
    
    #cas other setting
    cas.authn.ldap[0].type=AD|AUTHENTICATED|DIRECT|ANONYMOUS
    cas.authn.ldap[0].baseDn=dc=example,dc=org
    cas.authn.ldap[0].subtreeSearch=true
    cas.authn.ldap[0].enhanceWithEntryResolver=true
    cas.authn.ldap[0].dnFormat=uid=%s,ou=people,dc=example,dc=org

     把配置好的cas-overlay-template中的etc/cas/config中文件  如果是linux系统就放到 /etc/cas/config 中,如果是window系统放到项目所在盘符 中的/etc/cas/config 例如项目在D盘,则 d:/etc/cas/config

     把 build之后的war包放到tomcat的webapp中,然后启动tomcat 启动成功之后访问 http://localhost:8080/cas/login就可以了

  • 相关阅读:
    Thrift全面介绍
    ZooKeeper全面介绍
    Redis全面介绍
    第三篇:彻底解决ssh.invoke_shell() 返回的中文问题
    第二篇:ssh.invoke_shell() 切换root出现的新问题
    第一篇:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
    pycharm安装 suds模块报错:AttributeError: module 'pip' has no attribute 'main'
    变量赋值理解--Pyton中让两个值互换的方法
    02 Django框架基础(APP的创建访问)
    01 Web框架介绍
  • 原文地址:https://www.cnblogs.com/hujia/p/9773376.html
Copyright © 2011-2022 走看看