CAS server setup in 10mts


The Central Authentication Service (CAS) is a single sign-on protocol for the web. Its purpose is to permit a user to access multiple applications while providing their credentials (such as user id and password) only once. It also allows web applications to authenticate users without gaining access to a user’s security credentials, such as a password.

Prerequisite to setup CAS server
* Ubuntu server – (For this I’m using 14.04 LTS version)
* Tomcat 7

Tomcat setup
sudo apt-get install tomcat7

To setup CAS server you need to set up SSL connection (https) for this you can create a folder inside tomcat


mkdir keystore
cd keystore
sudo keytool -keysize 4096 -genkey -alias tomcat -keyalg RSA -keystore cas.keystore

Once key is generated you can provide password in below code in server.xml

Location for server.xml sudo vim /etc/tomcat7/server.xml


Download Jasig Cas

Copy the file to

Restart tomcat with below command
sudo /etc/init.d/tomcat7 restart

Forward port 443 to port 8443
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443

Now the server is up and running

https:// IP or domain name to server]/cas-server-webapp-4.2.7
https:// IP or domain name to server]:8443/cas-server-webapp-4.2.7

Login CAS with default account: casuser/Mellon

You can edit user credentials /var/lib/tomcat7/webapps/cas-server-webapp-4.2.7/WEB-INF/deployerConfigContext.xml


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

Up ↑

%d bloggers like this: