This document details how to protect a Tomcat web application using Siteminder.
The document assumes the reader is already experienced in the setup and configuration of webagents.
The method described in this document involves using an Apache Web server and Tomcat connector to serve as a proxy for tomcat.
- Install the Apache Web Server 2.0 (or other supported version)
Apache web server will act as a proxy for Tomcat protecting the tomcat application.
- Download the Tomcat connector.
This can be downloaded from http://tomcat.apache.org/connectors-doc/
Ensure you download the correct version for your webserver
- Install the Tomcat connector.
Copy the DLL (or .so) file downloaded as the connector to your Apache modules folder.
On a windows system this is often C:\Program Files\Apache Group\Apache2\modules
Create a mod_jk.conf file file
In Tomcat 6.0\conf folder create (or edit) a mod_jk.conf file.
Enter the following information into the file
LoadModule jk_module " [Full path and name of the tomcat connector] "
JkWorkersFile "[Root folder of tomcat installation] /conf/workers.properties"
JkLogFile " [Full path and name of the logfile you wish to use] "
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
Finally add the line:
JkMount / [your application name] smworker
JkMount / [your application name] /* smworker
This will redirect everything sent to the application name you specify to tomcat, For example:
JkMount /example smworker
JkMount /example/* smworker
will send all requests received by apache on http://myserver.ca.com/example to be redirected to tomcat.
Edit the webservers httpd.conf file.
On a windows system this is commonly located in C:\Program Files\Apache Group\Apache2\conf
Create a worker.properties file in [Tomcat root folder] /conf
At the end of this file add the line:
include " [tomcat install folder] /conf/mod_jk.conf"
Where [tomcat install folder] is the location of your tomcat installation.
In the server.xml file (located in [Tomcat root folder] /conf) ensure the have the following line uncommented.
Paste the following information into this file:
# Define 1 real worker named smworker
# Set properties for worker named smworker to use ajp13 protocol,
# and run on port 8009
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Start apache with the new module using these commands:
Finally start the tomcat server.
apache -k install
apache -k start
- Install the Siteminder Apache Webagent.
Install the Siteminder Apache webagent using the installation wizard as you would normally.
- Protect the application.
using the Siteminder administrative interface create a realm with the appropriate resource filter to protect the application mounted with the jkmount command earlier.
Then create rules. policies and responses to protect the application as you would normally.
- Configure the Siteminder Apache Webagent.
Use the webagent configuration wizard to configure the Apache2 agent as you would normally.
- Restart the Apache HTTP server.
- Test the install.
The tomcat application is now protected using Apache webserver webagent.
You should be prompted by Siteminder to provide credentials when accessing the application.