In this article, I want to describe a very simple test environment that will allow you to configure and check how CAS and JasperReports Server work togeter to authenticate users. To configure this test environment, I used the information from the article on our community wiki, Integrating CAS with JasperReports Server, and the JasperReports Server v4.0 (4.0.0) External Authentication Cookbook. | [toc] |
List of the software used to create the test environment:
Operating system Ubuntu Linux 10.04 x64. You can download it by navigating the link: http://releases.ubuntu.com/lucid/
Application container apache-tomcat-6.0.36.tar.gz. You can download in by navigating the link: http://apache-mirror.telesys.org.ua/tomcat/tomcat-6/v6.0.36/src/apache-tomcat-6.0.36-src.tar.gz
CAS Server 3.4.5 Release. You can download it by navigating the link: http://www.jasig.org/cas_server_3_4_5
Java SE Development Kit 7. You can download it by navigating the link: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
CAS authentication was tested with war file installers that listed below:
- jasperreports-server-4.5.1-bin
- jasperreports-server-4.7.1-bin
- jasperreports-server-5.0.1-bin
Let's start and configure our test environment.
Download JDK and extract it into the /opt folder. For simplicity create the symbolic link from jdk1.7.0_17 to java
Define the JAVA_HOME variable and add java binaries to the system PATH variable
Use keytool utility to self-author a server certificate
The keytool command has been called under the root account, so .keystore file has been placed in the /root/ folder (/root/.keystore)
Rename cas from cas-server-webapp-3.4.5.war to cas.war
Enable apache-tomcat gui administrator account.
Deploy and configure CAS:
Below I quote the properties from the cas.properties file that should be changed from their default values:
cas.securityContext.serviceProperties.service=https://castest:8443/cas/services/j_acegi_cas_security_check cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://castest:8443/cas/login cas.securityContext.casProxyTicketValidator.casValidate=https://castest:8443/cas/proxyValidate cas.securityContext.ticketValidator.casServerUrlPrefix=https://castest:8443/cas host.name=castest
As I said above, you can reload CAS application from the apache-tomcat GUI manager by navigating to it's page and clicking the Reload link related to the CAS application
Enable ssl support in apache-tomcat
Configure Java trust to CAS certificate. This should be done in the setenv.sh(bat) file
Below is shown a very simple default_master.properties file that has been used to deploy JasperReports Server into apache-tomcat.
The files for v4.7.1 and v5.0.1 versions have the same settings that in this one.
Deploy the pre-configured war-file installation of JasperReports Server by executing:
./js-install
from the buildomatic folder
Restart apache-tomcat to apply the changes that have been done.
If you want to use 2 hosts to test JasperReports Server and CAS please follow the instruction on the picture below
On the picture below is shown contents of the archive that has been attached to this article:
Thats all. Thank you for your attention to this article :)
Recommended Comments
There are no comments to display.