https://apereo.github.io/cas/5.3.x/installation/Configuration-Server-Management.html
系统概述
框架
组件
server: 服务端, 通过ticket完成对client用户的授权.
TGT: ticket-granting ticket, sso维度的票据, 作为key用来保护sso的session, 对所有应用有效
ST: service ticket, 服务维度的票据, 对某个特定的应用有效
client: 服务端, 和应用集成, 以通过cas server完成授权.
SSO: single sign on. 多个独立的软件系统, 通过统一个账户登录. 也就是一个token可以在多个软件间通用.
支持的协议
cas
saml
openid
OAuth 2.0
ws federation
分层
Web(Spring MVC/Spring Webflow)
Ticketing
Authentication
协议说明
cas通过桥接的设计模式, 实现了对不同协议的透明接入.
桥接
桥作为client和server沟通的媒介, 将请求翻译, 处理并返回.
client端不需要关心授权请求如何处理. 同时, 桥也不需要关心外部授权系统如何工作, 只需要将请求路由到指定模块.
例子
在上述设计模式下, 每个部署的cas系统都有三个部分:
plugins
bridges
modules
等式的右边总是cas协议. 以OAuth2协议为例:
开启OAuth2插件
接收到OAuth2授权请求
OAuth2插件验证请求, 并将其转换为CAS授权请求
请求被路由到cas登录终端
完成授权并再次返回到OAuth2插件(携带ticket)
OAuth2插件验证ticket, 获取用户信息
OAuth2插件返回用户信息
WAR Overlay部署
overlays是多个网络应用共享资源的方法. 通过overlays可以避免重复造轮子.
配置覆盖
通过
可以接受的字标签包括:
id - the id of the overlay. If none is provided, the WAR Plugin will generate one.
groupId - the groupId of the overlay artifact you want to configure.
artifactId - the artifactId of the overlay artifact you want to configure.
type - the type of the overlay artifact you want to configure. Default value is: war.
classifier - the classifier of the overlay artifact you want to configure if multiple artifacts matches the groupId/artifactId.
includes - the files to include. By default, all files are included.
excludes - the files to exclude. By default, the META-INF/MANIFEST.MF file is excluded.
targetPath - the target relative path in the webapp structure, which is only available for overlays of type war. By default, the content of the overlay is added in the root structure of the webapp.
skip - set to true to skip this overlay. Default value is: false.
filtered - whether to apply filtering to this overlay. Default value is false.