This document is a step by step guide for installing CAS server with SAML 2.0
capabilities.
CAS in deployment is basically a .war
or web .jar
file. The final goal is to compile one such deployment and set up the corresponding configuration files.
-
Install JDK 8
-
Set up JAVA_HOME and (Optinoally) JRE_HOME
This variable is used by the Gradle build system.
In a commandline prompt, execute
set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_121"
git clone https://github.com/apereo/cas-gradle-overlay-template.git
Gradle overlay is a build file that will pull everything (including gradle itself) from designated sources.
Replace the cas/build.gradle
file with the file attached. This file pulls from the original Apereo cas server repositories.
It also contains the required jdbc
driver and shibboleth
dependencies.
Line #27, cas-server-support-generic
, is for authenticating with a text file for test purposes. and can be removed if not needed.
In a commandline prompt, type
gradlew.bat clean build
This will pull all the required dependencies.
Before running the compiled cas.war
, set up the configs.
To run CAS under https
, a key file is needed. The keyfile is called thekeystore
and has to be placed under C:\etc\thekeystore
as defined in the compiled file. Use the java keytool under $JAVA_HOME\bin
to generate an unsigned RSA private key and certificate. This is required for CAS.
Note
For Windows Server 2002, the config file has to be under directory C:\etc\cas\config\cas.properties
. Sample config is attached.
This path is defined during build time so it cannot be changed.
Alternatively, supply an argument when executing the jar file. For example, --spring.cloud.config.server.native.searchLocations=file:///C:/www/cas-gradle-overlay-template/etc/cas/config
Use the same version of java during compile time, in this case use:
C:\Program Files\Java\jdk1.8.0_121\bin\java.exe" -jar cas\build\libs\cas.war
to start a webserver. The webserver is a local installation of Tomcat.
https://apereo.github.io/cas/5.0.x/installation/Configuring-SAML2-Authentication.html