Setup and Configure CAS(Client Access Server) Server

By | December 10, 2018

Installation Requirement

  • Java >=1.7
  • Apache Tomcat >=3.0
  • Apache Maven >=3.3
  • Familiarity with the Spring Framework
  • Internet connectivity

JAVA

APACHE MAVEN

Update the PATH environment variable for JAVA and MAVEN

update-path-environment-variable

Generate Keystore file

  • Create following folders: C:/etc/cas/config
  • Generate Keystore file
    • keytool -genkey -alias cas -validity 7000 -keyalg RSA -keypass changeit -storepass changeit -keystore C:/etc/cas/cas.keystore
  • Export the certificate into a file
    • keytool -export -alias cas -keypass changeit -file C:/etc/cas/config/cas.crt -keystore C:/etc/cas/cas.keystore -storepass changeit
  • Import the certificate into the global keystore
    • keytool -import -file C:/etc/cas/config/cas.crt -alias cas -keypass changeit -keystore ../lib/security/cacerts -storepass changeit

APACHE TOMCAT

There is no officially supported servelet container for CAS, but Apache Tomcat is the most commonly used.

Other servelet containers that can be used are:

  • JBoss
  • Jetty
  • GlassFish
  • WebSphere

Download, Unzip and Configure Apache Tomcat

Configure Tomcat for SSL/TLS

Update Apache Tomcat C:\tomcat\conf\server.xml configuration

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"   scheme="https" secure="true"  keystoreFile="C:\etc\cas\cas.keystore" keystorePass="changeit" clientAuth="false"  sslProtocol="TLS" />

After completing these configuration changes, you must restart Tomcat. You should be able to access any web application supported by Tomcat via SSL. For example, try:

https://localhost:8443/

and you should see the usual Tomcat splash page.

apache.-tomcat-splas-pageJPG

Download, Unzip and Configure CAS server

  • Please resolve firewall issues first(if exists)
  • Download and unzip CAS server on any location (say C:/cas) : https://github.com/apereo/cas-overlay-template/tree/4.2
  • Run the below commands step wise
    • > cd c:/cas
      > build package
      > build run
    • Build
    • After successful build run, you can find the find cas.WAR file at the location C:\cas\build\libs

Deploy cas.war file in Apache Tomcat 

Start the Tomcat Server:

cas-screen

cas-ready

Finally you can deploy the cas.war using Tomcat Apache Web Application Manager. Now you can access the CAS server application using URL https://localhost:8443/cas

local-cas-server-loging-page

 

local-cas-server-post-loging-page

local-cas-server-post-logout-page

NOTE:

  • Use static user credentials casuser/Mellon to login in CAS server.
  • Click on the logout link to get logout from CAS server.

 

Leave a Reply

Your email address will not be published. Required fields are marked *