Fork me on GitHub

JDK

You will install the latest JDK from SUN: download it from here.
It will be used by the Apache Tomcat server who will host the CAS server.

Certificates

To generate certificates for each server we will use the JDK tool : keytool.
The following command will create a keystore in c:/Java/keystore.jks :

keytool -genkey -keystore c:\Java\keystore.jks -alias tomcat -keypass changeit -keyalg RSA

Use the password changeit.
Enter all the requested informations. Note that you must enter the name of the server as the 'first and last name'.
So for the CAS server it should be ServerA.

Now we need to repeat this operation for ServerB.

Trusting each others

Once the server are running, you can use our utility : Certificat Importer to add the certificate to the trustore.

java -jar CertificateImporter.jar serverB:8443 changeit c:\Java\keystore.jks

Now we need to repeat this operation for ServerB.