Example: Trust association interceptor

If you are using a third party reverse proxy server other than Tivoli WebSEAL product, you must provide an implementation class for the trust association interceptor interface for your proxy server.

Using the TrustAssociation Interceptor interface

WebSphere Application Server - Express provides the interceptor Java interface, com.ibm.websphere.security.TrustAssociationInterceptor Go to API documentation, which defines the following methods:

The isTargetInterceptor method is used to determine whether the request originated with the proxy server associated with the Interceptor. The implementation code must examine the incoming request object and determine if the proxy server forwarding the request is a valid proxy server for this interceptor. The result of this method determines whether the interceptor processes the request or not.

The validateEstablishedTrust method determines if the proxy server from which the request originated is trusted or not. This method is called after the isTargetInterceptor method. The implementation code must authenticate the proxy server. The authentication mechanism is proxy server specific. For example, in the WebSphere provided implementation for the WebSEAL server, this method retrieves the basic authentication from the HTTP header and validates the information against the user registry used by the product. If the credentials are invalid then the code throws the WebTrustAssociationException exception, indicating that the proxy server is not trusted and the request is to be denied.

The getAuthenticatedUsername method is called after trust has been established between the proxy server and the product. WebSphere Application Server - Express has accepted the proxy server's authentication of the request and must now authorize the request. To authorize the request, the name of the original requestor must be subjected to an authorization policy to determine if the requestor has the necessary privilege. The implementation code for this method must extract the user name from the HTTP request header and determine if that user is entitled to the requested resource. For example, in the WebSphere provided implementation for the WebSEAL server, the method looks for an iv-user attribute in the HTTP request header and extracts the user ID associated with it for authorization.

After the interceptor class has been created, WebSphere Application Server - Express must be configured to use it by providing the following properties.

Perform these steps in the WebSphere administrative console:

  1. Start the WebSphere administrative console.
  2. Expand Security --> Authentication Mechanisms, and click LTPA.
  3. Click Trust Association.
  4. Check Enable Trust Association, and then click Interceptors.
  5. If you are using WebSEAL Interceptor, check com.ibm.ws.security.web.WebSEALTrustAssociationInterceptor. Otherwise, click New to add your interceptors. WebSphere Application Server - Express uses the classpath on the server to look for the implementation class. For each interceptor that you add, click Additional Properties to enter the property name and value pairs. Check Required for each property.

The properties and values for intercepters are these (where proxy is the name of your proxy server):

Specific name and value pairs for WebSEAL are as follows:

Note: You may have a different port number depending on your WebSEAL configuration.