chenxing 4e325c3f2c
deploy-cassso-service / build-deploy (push) Successful in 25s
fix: 在后端对 service 参数做 URL 解码,移除前端解码依赖
前端 bschlogin.js 的 getQueryVariable 未对 query value 做 decodeURIComponent,
会把浏览器地址栏里百分号编码态的 service(http%3A%2F%2F...) 原样 POST 给后端,
导致 WebApplicationServiceFactory.createService 拿到的仍是编码串,CAS 服务注册表
正则 ^(https|imaps|http)://.* 匹配不到而抛 UnauthorizedServiceException
(带 service 登录报"建立会话失败")。改为在后端 login() 入口统一解码,方便后续扩展。
2026-08-06 20:56:27 +08:00

CAS Overlay Template

Generic CAS WAR overlay to exercise the latest versions of CAS. This overlay could be freely used as a starting template for local CAS war overlays. The CAS services management overlay is available here.

Versions

<cas.version>5.3.x</cas.version>

Requirements

  • JDK 1.8+

Configuration

The etc directory contains the configuration files and directories that need to be copied to /etc/cas/config.

Build

To see what commands are available to the build script, run:

./build.sh help

To package the final web application, run:

./build.sh package

To update SNAPSHOT versions run:

./build.sh package -U

Deployment

  • Create a keystore file thekeystore under /etc/cas. Use the password changeit for both the keystore and the key/certificate entries.
  • Ensure the keystore is loaded up with keys and certificates of the server.

On a successful deployment via the following methods, CAS will be available at:

  • http://cas.server.name:8080/cas
  • https://cas.server.name:8443/cas

Executable WAR

Run the CAS web application as an executable WAR.

./build.sh run

Spring Boot

Run the CAS web application as an executable WAR via Spring Boot. This is most useful during development and testing.

./build.sh bootrun

Warning!

Be careful with this method of deployment. bootRun is not designed to work with already executable WAR artifacts such that CAS server web application. YMMV. Today, uses of this mode ONLY work when there is NO OTHER dependency added to the build script and the cas-server-webapp is the only present module. See this issue for more info.

Spring Boot App Server Selection

There is an app.server property in the pom.xml that can be used to select a spring boot application server. It defaults to -tomcat but -jetty and -undertow are supported.

It can also be set to an empty value (nothing) if you want to deploy CAS to an external application server of your choice.

<app.server>-tomcat<app.server>

Windows Build

If you are building on windows, try build.cmd instead of build.sh. Arguments are similar but for usage, run:

build.cmd help

External

Deploy resultant target/cas.war to a servlet container of choice.

Command Line Shell

Invokes the CAS Command Line Shell. For a list of commands either use no arguments or use -h. To enter the interactive shell use -sh.

./build.sh cli
S
Description
No description provided
Readme
1.1 GiB
Languages
CSS 57.8%
HTML 17.5%
JavaScript 15.3%
Java 4.1%
SCSS 3.2%
Other 2.1%