这篇文章主要讲的是使用CAS Service Management 对使用cas的应用进行管理。

CAS Service Management的部署在这里有详细的步骤。

一、配置CAS Service Management与已有CAS关联

部署成功之后,前往

/etc/cas/config/

目录下

vim user.properties

这里写上需要具有访问Service Manager权限的账号,例如

username=notused,ROLE_admin

然后编辑配置文件

vim management.properties

cas.server.name: https://yourcasdomain.com

cas.server.prefix: https://yourcasdomain.com/cas

cas.mgmt.adminRoles=ROLE_ADMIN

cas.mgmt.userPropertiesFile=file:/etc/cas/config/users.properties

cas.mgmt.serverName=https://yourdomain.com:8443

server.context-path=/cas-management

server.port=8443

cas.authn.attributeRepository.jdbc.sql=

cas.authn.attributeRepository.jdbc.username=zjh

cas.authn.attributeRepository.jdbc.healthQuery=

cas.authn.attributeRepository.jdbc.isolateInternalQueries=false

cas.authn.attributeRepository.jdbc.url=

cas.authn.attributeRepository.jdbc.failFast=true

cas.authn.attributeRepository.jdbc.isolationLevelName=ISOLATION_READ_COMMITTED

cas.authn.attributeRepository.jdbc.dialect=org.hibernate.dialect.OracleDialect

cas.authn.attributeRepository.jdbc.leakThreshold=10

cas.authn.attributeRepository.jdbc.propagationBehaviorName=PROPAGATION_REQUIRED

cas.authn.attributeRepository.jdbc.batchSize=1

cas.authn.attributeRepository.jdbc.user=

cas.authn.attributeRepository.jdbc.ddlAuto=update

cas.authn.attributeRepository.jdbc.password=

cas.authn.attributeRepository.jdbc.autocommit=false

cas.authn.attributeRepository.jdbc.driverClass=

cas.authn.attributeRepository.jdbc.idleTimeout=5000

cas.authn.attributeRepository.jdbc.pool.suspension=false

cas.authn.attributeRepository.jdbc.pool.minSize=6

cas.authn.attributeRepository.jdbc.pool.maxSize=18

cas.authn.attributeRepository.jdbc.pool.maxIdleTime=1000

cas.authn.attributeRepository.jdbc.pool.maxWait=2000

cas.authn.attributeRepository.attributes.zjh=zjh

cas.serviceRegistry.watcherEnabled=true

cas.serviceRegistry.repeatInterval=120000

cas.serviceRegistry.startDelay=15000

cas.serviceRegistry.initFromJson=true

cas.serviceRegistry.config.location=file:/etc/cas/services

spring.thymeleaf.mode=HTML

应用的信息将以json的形式存在

/etc/cas/services

目录下

其余配置与上一篇文章的要求基本相同。

二、Service Management 应用信息配置

添加一个Service

Service ID为目标应用的URL,支持正则表达式。

Service Name为自己定义的应用名称。

Description为应用的说明。

Attribute Policy Options 区域可以选择提供给该应用哪些用户信息。