| Back | Next | Contents | Cams Web Agent Guide |
Cams web agents are integrated into web and application servers to protect the resources that they provide. When a user's web browser makes a request to a web or application server, the Cams web agent asks a Cams policy server if access is granted or denied. The Cams web agent enforces the decision, possibly prompting the user for authentication if required.
This document provides instructions on how to install and configure the Cams Sun ONE 6.1 web agent, which is an Sun ONE version 6.1 NSAPI plugin available for the following operating systems and hardware architectures:
If you need support for another operating system or hardware architecture, please contact Cafésoft support.
NOTE: For known issues with the Cams Sun ONE 6.1 web agent, see ReleaseNotes.html found in the root directory of the Cams Sun ONE 6.1 web agent distribution.
The Sun ONE 6.1 web server management environment includes an "Administration Server" and one or more web server instances. Each web server instance is configured and managed independently, providing access to content and web applications for one or more "Virtual Hosts".
From the perspective of the Cams Sun ONE 6.1 web agent, the key characteristics of this environment are:
The Cams Sun ONE 6.1 web agent is designed to install within this environment. The installation script included with the agent distribution can be used to:
Once agent files are installed using the installation script, various web server-specific configuration files will also need to be edited using a text editor. Installation and configuration of the Cams Sun ONE 6.1 web agent is summarized by the following steps:
For each Sun ONE 6.1 web server instance where you'd like to use Cams:
NOTE: Before starting the Cams Sun ONE 6.1 web agent installation, you should install and configure the Cams Policy Server according to the Cams Administrator's Guide.
These instructions guide you through the installation of the Cams Sun ONE 6.1 web agent. Prerequisites for installation include:
To identify your Sun ONE web server version, open a Unix shell, change directories to the location where Sun ONE web server binaries are installed, and use the "webservd -V" command. For example, if your Sun ONE web server is installed in directory tree /opt/SUNWwbsvr :
% cd /opt/SUNWwbsvr/bin/https/bin % ./webservd -v
You should see a line that looks something like this:
Sun ONE Web Server 6.1SP2 B04/07/2004 16:09
NOTE: Please contact Cafésoft support if you have questions on supported Sun ONE web server versions and platforms.
The name of your downloaded Cams Sun ONE 6.1 web agent distribution file will vary by release, so substitute your file name in the instructions that follow.
Copy cams-webagent-sunone61-solaris-sparc-3.0.X.tar.gz to a temporary directory on the target host. You must login as root and navigate to the directory where you copied the cams-webagent-sunone61-solaris-sparc-3.0.X.tar.gz file and unpack it into the temporary directory.
cd /tmp
gunzip cams-webagent-sunone61-solaris-sparc-3.0.X.tar.gz
tar xvf cams-webagent-sunone61-solaris-sparc-3.0.X.tar
Change directories to cams-webagent-sunone61-solaris-sparc-3.0.X. The files shown in Figure 1 should have been extracted from the distribution.
<!-- Cams Sun ONE 6.1 web agent documentation and license --> install-webagent.sh LICENSE README.txt ReleaseNotes.html <!-- Cams web application files --> webapps/cams/camstest.jsp |
Figure 1 - Directory listing of the Cams Sun ONE 6. 1 web agent files after unpacking
The target directories into which agent files will be copied by the installation script depends on where your Sun ONE 6.1 web server environment is installed and the web server instances that have been created. Assuming that your Sun ONE 6.1 web server is installed in a directory tree at /opt/SUNWwbsvr and you have one web server instance named "www.myserver.com", files will be copied to the following locations:
/opt/SUNWwbsvr/bin/https/lib - the agent NSAPI plugin and libraries
/opt/SUNWwbsvr/https-www.myserver.com/config - the agent configuration and resource files
/opt/SUNWwbsvr/https-www.myserver.com/webapps - the 'cams' web application directory tree
To run the installation script, use the following commands:
cd /tmp/cams-webagent-sunone61-solaris-sparc-3.0.X/
./install-webagent.sh
Follow the prompts to provide required information, install the Cams web agent libraries and install a Cams web agent configuration to one or more web server instances. After running the installation script, you'll still need to edit the following files in the config directory for each web server instance where an agent configuration was installed:
More details on how to edit these files is provided below.
The Cams Sun ONE 6.1 web agent is configured using the cams-webagent.conf file. However, you'll also need to edit your Sun ONE 6.1 web server's magnus.conf, obj.conf and server.xml files to register the Cams Sun ONE 6.1 web agent module and integrate Cams login and test pages.
NOTE: To secure resources on your Sun ONE 6.1 server, you'll also need to configure a Cams security domain. See the Cams Policy Server Configuration section in this document for more information.
Open the cams-webagent.conf file in a text editor. The file contains comments to help you understand the property values that you may need to change. You can also reference more detailed information on the properties in the Configuration Properties document.
NOTE: The most important properties are at the top of cams-webagent.conf. In most cases, the default property values will work if the Cams policy server and Cams web agent are on the same host. As you begin to integrate more web and application servers, reference Configuration Properties to understand the properties that will usually be the focus of your attention.
When a Sun ONE Web Server starts up, it reads a file named magnus.conf in its "config" directory to establish a set of global variable settings that affect the server’s behavior and configuration. The Cams Sun ONE 6.1 web agent NSAPI plugin and entry point functions must be registered in this file by using a directive like the one shown in Example 1 below.
NetsiteRoot /opt/SUNWwbsvr ServerName www.myserver.com ServerID https-www.myserver.com # RqThrottle 128 DNS on Security off PidLog /opt/SUNWwbsvr/https-www.myserver.com/logs/pid User webservd StackSize 131072 TempDir /tmp/https-www.myserver.com-9d93b4d6 # Init fn=flex-init access="$accesslog" format.access="%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf-request%\" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length%" Init fn="load-modules" shlib="/opt/SUNWwbsvr/bin/https/lib/libj2eeplugin.so" shlib_flags="(global|now)" Init fn=load-modules shlib=/opt/SUNWwbsvr/bin/https/lib/libcams-webagent-sunone61.so funcs=CamsSunOne61WebAgent-init,CamsSunOne61WebAgent-pathCheck Init fn=CamsSunOne61WebAgent-init CamsWebAgentHome="/opt/SUNWwbsvr/https-www.myserver.com" |
Example 1 - Cams Sun ONE 6.1 web agent directives to be added to the magnus.conf file
When editing magnus.conf be sure to:
The file obj.conf contains instructions that tell the web server how to process HTTP requests received from clients. Each instruction is enacted either during server initialization or during a particular stage of the request-handling process. Each instruction invokes a Server Application Function (SAF). The Cams Sun ONE 6.1 web agent is invoked by the web server via an SAF for every HTTP request.
To register the Cams Sun ONE 6.1 web agent SAF, add the directive shown in Example 2 below:
<Object name="default"> |
Example 2 - Cams Sun ONE 6.1 web agent directives to be added to the obj.conf file
When editing obj.conf be sure to:
Among other web server configuration options, server.xml specifies the web applications available to virtual servers. If you installed the 'cams' web application to provide login and test pages, you'll need to edit this file as shown in Example 3 below.
... <VSCLASS id="vsclass1" objectfile="obj.conf" rootobject="default" acceptlanguage="off"> |
Example 3- cams web application directives to be added to the server.xml file
When editing server.xml be sure to:
The distribution webapps/cams directory is a J2EE compliant webapp that includes four sample Java Server Pages (JSP) for user interaction:
For information on how to customize these pages, see Scripts. For information on how to configure the Cams web agent to redirect to these pages, see Configuration Properties.
NOTE: The camstest.jsp page is extremely useful for integration testing. You use it to quickly confirm correct Cams web agent communications with a Cams policy server, validate authentication configuration and determine if expected user session values are available in the web environment for authenticated users.
If your site makes use of server-parsed HTML (See the Sun ONE Web Server 6.1 Administrator Guide), one client HTTP request can trigger multiple "internal" HTTP requests within your web server. These "internal" HTTP requests can cause the Cams Sun ONE 6.1 web agent to reject "internal" HTTP requests because they already contain Cams HTTP request headers from the original "parent" request.
If you find that server-parsed HTML is not working, set the following value in cams-webagent.conf:
cams.http.headers.accept.proxied=true
This will cause the Cams web agent to accept HTTP request headers that were inserted when the original "parent" resource was processed as long at the appropriate "proxy signature" header is also available.
Before you start a web server with a Cams Sun ONE 6.1 web agent, you'll need to ensure that the Cams policy server knows about it. See the Cams Administrator's Guide - Integration Quick Start to learn more. Pay close attention during integration to steps 4 and 5, which provide information on the settings that must be configured correctly for a Cams web agent to connect to a Cams policy server. You'll need to configure an access control policy corresponding to your site requirements.
That's it, you should now be able to start your Sun ONE web server to test your Cams Sun ONE 6.1 web agent configuration. After you've started both the Sun ONE web server with the Cams Sun ONE 6.1 web agent and the Cams policy server, test the configuration using:
http://[hostname:port]/cams/camstest.jsp
Login to an account in the security domain that you've established. See the test page for more configuration and testing information.
Debugging information is available in the following web server-specific log files:
During Cams web agent integration, it is helpful to set the following values in cams-webagent.conf:
cams.debug=true
cams.cluster.debug=true
If the Cams web agent is successfully loaded and initialized, verbose DEBUG messages will be logged to cams-webagent.log. If the Cams web agent fails to load or initialize, errors will be reported in the https-server_id/logs/errors file. In most cases, errors will be cause by misconfigured values in magnus.conf, obj.conf and/or cams-webagent.conf.
WARNING: Remember to disable all Cams web agent debug flags for production environments. Leaving them enabled will decrease performance and result in very large log files.
The installation script (install-webagent.sh) provides a way to query and remove the installed Cams Sun ONE 6.1 web agent files and configuration directives for a selected Sun ONE 6.1 web server. After starting the installation script (as you would for initial installation) and identifying the Sun ONE 6.1 web server executable you will be prompted by the following menu:
[INFO] - Cams Sun ONE 6.1 Web Agent installation management options
================================================================================
1 - Install Cams Sun ONE 6.1 Web Agent
2 - Uninstall Cams Sun ONE 6.1 Web Agent
3 - Query installed Cams Sun ONE 6.1 Web Agent files and settings
E - Exit
[????] - Choose an option:
Simply choose management option 2 for installation and 3 for a report specific to your installed options or configuration settings will display.
NOTE: During Cams Sun ONE 6.1 web agent removal, the script will give you the opportunity to save (or leave in place) the cams-webagent.conf and the Cams login and test scripts for future use or reference.
WARNING: After the Cams Apache 2.0 web agent files have been removed, you must remove (or comment out) the changes you made to the Sun ONE 6.1 web server's magnus.conf, obj.conf and server.xml files, which register the Cams Sun ONE 6.1 web agent module and integrate Cams login and test pages. See Cams Web Agent Configuration for more information on configuration changes you may have made.
© Copyright 1996-2008 Cafésoft LLC. All rights reserved.