How to protect a Tomcat web application using SiteMinder Web Agent
searchcancel
How to protect a Tomcat web application using SiteMinder Web Agent
book
Article ID: 53831
calendar_today
Updated On: 08-19-2024
Products
CA Single Sign-OnCA Single Sign On Agents (SiteMinder)SITEMINDER
Issue/Introduction
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 SiteMinder Web Agents.
The method described in this document involves using an Apache Web server and Tomcat connector to serve as a proxy for Tomcat.
Resolution
Install the Apache Web Server 2.0 (or other supported version).
The Apache Web Server will act as a proxy for Tomcat protecting the Tomcat application.
Download the Tomcat connector (1).
Ensure to download the correct version for the target Web Server.
Install the Tomcat connector.
Copy the DLL (or .so) file downloaded as the connector to the Apache modules folder. On a Windows system, this is often C:\Program Files\Apache Group\Apache2\modules. Create a mod_jk.conf 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 to use] " JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T"
This will send all requests received by apache on http://server.example.com/example to be redirected to Tomcat. Edit the Web Servers httpd.conf file. On a Windows system, this is commonly located in C:\Program Files\Apache Group\Apache2\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 the Tomcat installation. Create a worker.properties file in [Tomcat root folder] /conf
Paste the following information into this file:
# Define 1 real worker named smworker worker.list=smworker # Set properties for worker named smworker to use ajp13 protocol, # and run on port 8009 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 worker.ajp13.lbfactor=50 worker.ajp13.cachesize=10 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=300
In the server.xml file (located in [Tomcat root folder] /conf) ensure the have the following line without comment mark:
Start Apache with the new module using these commands:
apache -k install apache -k start
Finally, start the Tomcat server.
Install the SiteMinder Apache Web Agent.
Install the SiteMinder Apache Web Agent using the installation wizard as usual.
Protect the application.
Use the SiteMinder Administrative Interface (AdminUI) to create a realm with the appropriate resource filter to protect the application mounted with the jkmount command earlier. Then create the rules, the policies and the responses to protect the application as usual.
Configure the SiteMinder Apache Web Agent.
Use the Web Agent Configuration Wizard to configure the Apache2 Agent as usual.
Restart the Apache HTTP server.
Test the installation.
The Tomcat application is now protected using Apache Web Agent. The browser should be prompted by SiteMinder to provide credentials when accessing the application.