CAS5.3.X 配置

##
# 普通MD5用户jdbc验证
##
#配置数据库连接
cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.query[0].url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.query[0].user=root
cas.authn.jdbc.query[0].password=123456
#添加jdbc认证
cas.authn.jdbc.query[0].sql=SELECT * FROM user_info WHERE username =?
#哪个字段作为密码字段
cas.authn.jdbc.query[0].fieldPassword=password
#哪个字段作为过期字段 0:未过期  1:已过期
cas.authn.jdbc.query[0].fieldExpired=expired
#哪个字段作为是否可用字段 0:未禁用  1:已禁用
cas.authn.jdbc.query[0].fieldDisabled=disabled
#MD5设置
cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5
##
# 加盐MD5用户jdbc验证
##
#配置数据库连接
cas.authn.jdbc.encode[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.encode[0].url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.encode[0].user=root
cas.authn.jdbc.encode[0].password=123456
#加密迭代次数
cas.authn.jdbc.encode[0].numberOfIterations=2
#该列名的值可替代上面的值,但对密码加密时必须取该值进行处理
cas.authn.jdbc.encode[0].numberOfIterationsFieldName=
#动态盐值用的字段
cas.authn.jdbc.encode[0].saltFieldName=username
#静态盐值
cas.authn.jdbc.encode[0].staticSalt=654321
cas.authn.jdbc.encode[0].sql=SELECT * FROM user_info WHERE username =?
#对处理盐值后的算法
cas.authn.jdbc.encode[0].algorithmName=MD5
#哪个字段作为密码字段
cas.authn.jdbc.encode[0].passwordFieldName=password
#哪个字段作为过期字段 0:未过期  1:已过期
cas.authn.jdbc.encode[0].expiredFieldName=expired
#哪个字段作为是否可用字段 0:未禁用  1:已禁用
cas.authn.jdbc.encode[0].disabledFieldName=disabled
##
# 动态services,用存持久化登录后的SSO ticket 等信息
##
#配置数据库连接
cas.serviceRegistry.jpa.driverClass=com.mysql.cj.jdbc.Driver
cas.serviceRegistry.jpa.url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.serviceRegistry.jpa.dialect=org.hibernate.dialect.MySQL5Dialect
cas.serviceRegistry.jpa.user=root
cas.serviceRegistry.jpa.password=123456
#连接池配置
cas.serviceRegistry.jpa.pool.suspension=false
cas.serviceRegistry.jpa.pool.minSize=6
cas.serviceRegistry.jpa.pool.maxSize=18
#下面两项的配置不要超过mysql数据库的wait_timeout和interactive_timeout两项配置
cas.serviceRegistry.jpa.pool.maxWait=30
cas.serviceRegistry.jpa.pool.timeoutMillis=30
#默认为create-drop,表示每次启动服务都会清除你之前注册的cas服务
cas.serviceRegistry.jpa.ddlAuto=update

高级配置

# 连接池配置
cas.authn.jdbc.query[0].pool.suspension=false
cas.authn.jdbc.query[0].pool.timeout=5000
cas.authn.jdbc.query[0].pool.maxSize=20
cas.authn.jdbc.query[0].pool.minSize=5

# 其他配置
cas.authn.jdbc.query[0].healthQuery=SELECT 1
cas.authn.jdbc.query[0].isolateInternalQueries=false
cas.authn.jdbc.query[0].autocommit=false

CAS Endpoints属性列表

cas.monitor.endpoints
#终结点dashboard对应uri为/cas/status/dashboard
#这是一个快捷方式页面,里面有很多按钮可以进入到其他节点
cas.monitor.endpoints.dashboard
cas.monitor.endpoints.discovery
cas.monitor.endpoints.auditEvents
#管理身份验证事件,终结点/cas/status/authnEvents
cas.monitor.endpoints.authenticationEvents
#配置页,终结点/cas/status/config
cas.monitor.endpoints.configurationState
cas.monitor.endpoints.healthCheck
#查看日志,终结点/cas/status/logging
cas.monitor.endpoints.loggingConfig
#度量指标,终结点/cas/status/metrics
cas.monitor.endpoints.metrics
#属性配置列表,终结点/cas/status/attrresolution
cas.monitor.endpoints.attributeResolution
cas.monitor.endpoints.singleSignOnReport
#ticket凭证统计,终结点/cas/status/stats
cas.monitor.endpoints.statistics
cas.monitor.endpoints.trustedDevices
#cas状态,终结点/cas/status
#注:该终结点不会影响子级终结点。例如
#-------------------------------------------------
#cas.monitor.endpoints.status.enabled=false
#cas.monitor.endpoints.dashboard.enabled=true
#-------------------------------------------------
#如上配置/cas/status不能访问,但是/cas/status/dashboard仍能访问
cas.monitor.endpoints.status
#单点登录,终结点/cas/status/sso
cas.monitor.endpoints.singleSignOnStatus
#springWebflow,终结点/cas/status/swf
#注此配置.enabled只能控制dashboard面板是否显示模块入口,即使.enabled=false浏览器输入网址仍能访问
cas.monitor.endpoints.springWebflowReport
#服务注册,终结点/cas/status/services
cas.monitor.endpoints.registeredServicesReport
#配置元数据,终结点/cas/status/configmetadata
cas.monitor.endpoints.configurationMetadata


#安全管理页访问时要校验的IP地址。例如设置成127.0.0.1那么在浏览器中只能用127.0.0.1来访问,即使用localhost也是无权限访问的。
#这样做的用意是保护安全管理页的访问权限。此项默认是注释掉的,默认值为127\.0\.0\.1,这里需要将其打开,否则是访问不到的。
 cas.adminPagesSecurity.ip=127.0.0.1
#管理上下文路径,默认为/status。
management.contextPath=/status
#是否开启管理安全,默认为true
management.security.enabled=true
#管理安全用户角色,默认为ACTUATOR,ADMIN
management.security.roles=ACTUATOR,ADMIN
#是否管理安全会话,默认为if_required
management.security.sessions=if_required

#节点开关配置(全局)
#cas.monitor.endpoints.enabled=true
#cas.monitor.endpoints.sensitive=false

#节点开关配置(明细)。每项后面指定enabled和sensitive
cas.monitor.endpoints.dashboard.enabled=true
cas.monitor.endpoints.dashboard.sensitive=false

cas.monitor.endpoints.discovery.enabled=true
cas.monitor.endpoints.discovery.sensitive=false

cas.monitor.endpoints.auditEvents.enabled=true
cas.monitor.endpoints.auditEvents.sensitive=false

cas.monitor.endpoints.authenticationEvents.enabled=true
cas.monitor.endpoints.authenticationEvents.sensitive=false

cas.monitor.endpoints.configurationState.enabled=true
cas.monitor.endpoints.configurationState.sensitive=false

cas.monitor.endpoints.healthCheck.enabled=true
cas.monitor.endpoints.healthCheck.sensitive=false

cas.monitor.endpoints.loggingConfig.enabled=true
cas.monitor.endpoints.loggingConfig.sensitive=false

cas.monitor.endpoints.metrics.enabled=true
cas.monitor.endpoints.metrics.sensitive=false

cas.monitor.endpoints.attributeResolution.enabled=true
cas.monitor.endpoints.attributeResolution.sensitive=false

cas.monitor.endpoints.singleSignOnReport.enabled=true
cas.monitor.endpoints.singleSignOnReport.sensitive=false

#关闭/status/stats
cas.monitor.endpoints.statistics.enabled=false
cas.monitor.endpoints.statistics.sensitive=false

cas.monitor.endpoints.trustedDevices.enabled=true
cas.monitor.endpoints.trustedDevices.sensitive=false

cas.monitor.endpoints.status.enabled=true
cas.monitor.endpoints.status.sensitive=false

cas.monitor.endpoints.singleSignOnStatus.enabled=true
cas.monitor.endpoints.singleSignOnStatus.sensitive=false

cas.monitor.endpoints.springWebflowReport.enabled=true
cas.monitor.endpoints.springWebflowReport.sensitive=false

cas.monitor.endpoints.registeredServicesReport.enabled=true
cas.monitor.endpoints.registeredServicesReport.sensitive=false

cas.monitor.endpoints.configurationMetadata.enabled=true
cas.monitor.endpoints.configurationMetadata.sensitive=false


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

梁晓山(ben)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值