JustNote
  • Introduction
  • DesignPattern
    • 七大原则
      • 开闭原则(OCP)
      • 依赖倒置原则(DIP)
      • 单一职责原则(SRP)
      • 接口隔离原则(ISP)
      • 迪米特法则(LoD)
      • 里氏代换原则(LSP)
      • 合成复用原则(CRP)
    • 创建型模式
      • 简单工厂模式
      • 工厂方法模式
      • 抽象工厂模式
      • 建造者模式
      • 单例模式
      • 原型模式
    • 结构型模式
      • 外观模式
      • 装饰模式
      • 适配器模式
      • 享元模式
      • 组合模式
      • 桥接模式
      • 代理模式
    • 行为型模式
      • 模板方法模式
      • 迭代器模式
      • 策略模式
      • 解释器模式
      • 观察者模式
      • 备忘录模式
      • 命令模式
      • 中介者模式
      • 责任链模式
      • 访问者模式
      • 状态模式
  • Java
    • Java Core
      • JVM 如何加载类
      • JVM 垃圾回收
      • JVM G1GC
      • JVM G1GC Q&A
      • JVM 与 Hbase
      • JVM ZGC Overview
      • JVM ZGC 内存管理
      • JVM ZGC 线程
      • JVM ZGC 垃圾回收
      • JVM ZGC 日志分析
      • JVM ZGC 参数调优
    • checkstyle
  • Golang
    • 源码阅读
      • Goroutines
      • Channel
    • gRPC
      • 1、快速开始
      • 2、什么是gRPC
      • 3、gRPC概念梳理
      • 4、基于Golang的gRPC入门
      • 5、gRPC组件ProtocolBuffers介绍
      • 6、gRPC组件Http 2.0
      • 7、错误处理和Debug
      • 8、gRPC身份验证
      • 9、服务注册与发现
      • 10、gRPC与gRPC Gateway
      • 11、gRPC与分布式链路追踪
  • Scala
    • 数据结构与算法
      • 数组
      • 队列
    • 函数式编程
      • 高阶函数
      • 偏函数
    • Immutable Collection
      • List
    • Mutable Collection
      • Array
    • 常见函数操作
      • A
        • aggregate
        • andThen
        • appended
        • appendedAll
      • C
        • chain
        • collect
        • collectFirst
        • combinations
        • compose
        • concat
        • cond
        • condOpt
        • const
        • contains
        • containsSlice
        • copyToArray
        • corresponds
        • count
        • curried
      • D
        • diff
        • distinct
        • distinctBy
        • drop
        • dropRight
        • dropWhile
      • E
        • empty(PartialFunction)
        • empty(collections)
        • endsWith
        • exists
      • F
        • fill
        • filter
        • filterKeys
        • filterNot
        • find
        • findLast
        • flatMap
        • flatten
        • fold
        • foldLeft
        • foldRight
        • forall
        • foreach
        • fromFunction
      • G
        • getOrElse (Map)
        • getOrElse (Option)
        • groupBy
        • groupMap
        • groupMapReduce
        • grouped
      • H
        • head
        • headOption
      • I
        • indexOf
        • indexOfSlice
        • indexWhere
        • indices
        • init
        • inits
        • intersect
        • isDefinedAt (Map)
        • isDefinedAt (Seq)
        • isEmpty
        • isTraversableAgain
      • K
        • keys
      • L
        • last
        • lastIndexOf
        • lastIndexOfSlice
        • lastIndexWhere
        • lastOption
        • length
        • lift
      • M
        • map
        • mapConserve
        • mapValues
        • max
        • maxBy
        • maxByOption
        • maxOption
        • min
        • minBy
        • minByOption
        • minOption
        • mkString
      • N
        • nonEmpty
      • O
        • orElse
      • P
        • padTo
        • par
        • partition
        • partitionMap
        • patch
        • permutations
        • prefixLength
        • prepended
        • prependedAll
        • product
      • R
        • range
        • reduce
        • reduceLeft
        • reduceLeftOption
        • reduceOption
        • reduceRight
        • reduceRightOption
        • reverse
        • reverseIterator
        • reverseMap
        • runWith
      • S
        • sameElements
        • scan
        • scanLeft
        • scanRight
        • search
        • segmentLength
        • size
        • slice
        • sliding
        • sortBy
        • sortWith
        • sorted
        • span
        • splitAt
        • startsWith
        • sum
      • T
        • tabulate
        • tail
        • tails
        • take
        • takeRight
        • takeWhile
        • transpose
        • tupled
      • U
        • unfold
        • union
        • unlift
        • untupled
        • unzip
        • unzip3
        • updated
      • V
        • values
        • view
      • W
        • withFilter
        • withDefault
        • withDefaultValue
      • Z
        • zip
        • zipAll
        • zipWithIndex
      • map
      • flatmap
      • filter
      • reduceLeft
      • foldLeft
    • Futures
      • Method with future as return type
      • Non blocking future result
      • Chain futures using flatMap
      • Chain futures using for comprehension
      • Future Option with for comprehension
      • Future Option with map
      • Composing Futures
      • Future Sequence
      • Future Traverse
      • Future foldLeft
      • Future reduceLeft
      • Future firstCompletedOf
      • Future zip
      • Future zipWith
      • Future andThen
      • Future configure threadpool
      • Future recover
      • Future recoverWith
      • Future fallbackTo
      • Future promise
    • Akka
  • Algorithm
  • Docker
  • Kubernetes
    • 二进制安装kubernetes
      • 00.从零开始
  • Architecture
    • Infrastructure
      • Opentracing
      • Jaeger && ZipKin
      • SkyWalking
      • Consul
      • Envoy
      • Service Mesh
      • Service Mesh: Istio 详解
      • Service Mesh: 基于 Istio 的落地实践(一)
    • CAS
      • CAS Server
      • CAS Service Management
      • CAS 集成LDAP
      • CAS 集成gitlab
      • CAS SSO & SLO
      • CAS Gitbook
    • xCAT
  • Netty
  • DDD
  • Reactive Programming
    • Reactor
      • Publisher
      • Subscriber
      • Subscription
      • Processor
    • WebFlux
  • Gitlab
    • Git Hook
  • CICD
    • Jenkins
      • Kubectl
Powered by GitBook
On this page
  • 参考
  • 环境介绍
  • 下载cas
  • 构建CAS Server War
  • 修改配置
  • 部署CAS War
  • 方法一: 使用 tomcat 部署
  • 方法二: 使用内置的 web server (也是tocmat) 部署

Was this helpful?

  1. Architecture
  2. CAS

CAS Server

PreviousCASNextCAS Service Management

Last updated 4 years ago

Was this helpful?

参考

cas-overlay-template 下载 地址

cas-management 下载地址

环境介绍

  • CAS 6.4.0 (小版本之间差异也很大)

  • CentOS 7.5

  • JDK 11

  • Tomcat 9.0

下载cas

通过 查看代码配置发现,内置的tomcat 版本为 9.0 为了保持一致,我们也下载 9.0 版本的tomcat。

构建CAS Server War

最新版本的cas 部署,推荐使用overlay 方式.

也就是说,我们下载的 cas-overlay-template 项目,并不是项目本身,相反,他是一个单独的overlay 项目。可以用来发布cas.

  1. 进入到 java workspace 目录下,下载 cas-overlay-template 项目。

git clone https://github.com/apereo/cas-overlay-template.git

  1. 手动指定 gradle 的java home,在gradle.properties 文件中添加下面一行。

org.gradle.java.home=/usr/lib/jdk-11.0.10

  1. 指定本地的gradle,避免每次都下载,在gradle-wrapper.properties 文件中,修改下面一行。如果是

distributionUrl=file:///mnt/d/download/gradle-6.8.3-bin.zip

  1. 执行 ./gradlew clean build 就可以 构建出一个 cas war 包了。

修改配置

修改 项目目录下的 /etc/cas/config/cas.properties

cas.server.name=http://10.0.41.74:8090
cas.server.prefix=${cas.server.name}/cas

logging.config= file:/etc/cas/config/log4j2.xml
server.port=8090
server.ssl.enabled=false

cas.service-registry.core.init-from-json=true
cas.serviceRegistry.json.location=file:/etc/cas/services

cas.authn.oauth.grants.resourceOwner.requireServiceHeader=true
cas.authn.oauth.userProfileViewType=NESTED

cas.authn.policy.requiredHandlerAuthenticationPolicyEnabled=false

cas.authn.attributeRepository.stub.attributes.email=casuser@example.org
#REST API JSON
cas.rest.attributeName=email
cas.rest.attributeValue=.+example.*

# cas.authn.accept.users=

将 cas 目录 拷贝到 系统的 /etc 目录下

部署CAS War

构建出来的cas.war 包,既可以单独部署,又可以部署到tomcat 中去。

方法一: 使用 tomcat 部署

将cas.war 拷贝到 tomcat 的 webapps 目录下,修改 tomcat server.xml 文件 ,新增下面的配置

 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS"
    keystoreFile="/etc/cas/thekeystore"
    keystorePass="changeit" />

启动 tomcat

由于 cas.war 比较大,启动过程需要花费一些时间。

启动完成后,cas.war 就被解压了。

方法二: 使用内置的 web server (也是tocmat) 部署

将 cas.war 拷贝到服务器的指定目录下。

运行 java -jar -server -noverify -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 cas.war 命令。

在默认配置下,日志的输出可以从 /etc/cas/config/log4j2.xml

登录成功之后,截图如下:

下载 项目。

这时 访问 使用 casuser Mellon 就可以登陆了

这时 访问 使用 casuser Mellon 就可以登陆了

cas overlay template
https://10.0.41.74:8443/cas
https://10.0.41.74:8443/cas
https://stackoverflow.com/questions/59560367/setup-apereo-cas-management-integrated-with-cas-server
https://apereo.github.io/cas-management/6.3.x/installation/Installing-ServicesMgmt-Webapp.html
https://apereo.github.io/cas/6.3.x/
https://github.com/apereo/cas
https://github.com/hdeadman/cas-overlay-template
https://github.com/apereo/cas-management
1. CAS 安装
参考
环境介绍
下载cas
构建CAS Server War
修改配置
部署CAS War
方法一: 使用 tomcat 部署
方法二: 使用内置的 web server (也是tocmat) 部署
登录成功截图