Sun Java System Access Manager Policy Agent 2.2 Guide for Apache HTTP Server 2.2

Using SSL With the Apache HTTP Server 2.2 Agent

During installation, if you choose the HTTPS protocol, theApache HTTP Server 2.2 agent is automatically configured and ready to communicate over Secure Sockets Layer (SSL). Before proceeding with tasks in this section, ensure that the Apache HTTP Server 2.2 instance is configured for SSL.


Caution – Caution –

You should have an understanding of SSL concepts and the security certificates required to enable communication over the HTTPS protocol. For information. see the Apache HTTP Server 2.2 documentation: http://httpd.apache.org/docs/2.2/


ProcedureTo Configure Notifications on the Apache HTTP Server 2.2 Agent for SSL

If Apache HTTP Server 2.2 is running in SSL mode and is receiving notifications, first perform the following broadly defined steps:

  1. Add the Apache HTTP Server 2.2 certificate’s root CA certificate to the Access Manager certificate database.

  2. Mark the CA root certificate as trusted to enable Access Manager to successfully send notifications to Agent for Apache HTTP Server 2.2.

Default Trust Behavior of Agent for Apache HTTP Server 2.2

This section applies only when Access Manager itself is using SSL. By default, the web agent installed on a remote Apache HTTP Server 2.2 instance trusts any server certificate presented over SSL by the Access Manager host. The web agent does not check the root Certificate Authority (CA) certificate. If the Access Manager host is SSL-enabled and you want the agent to perform certificate checking, adhere to the guidelines as described in the following subsections:

Disabling the Default Trust Behavior of Agent for Apache HTTP Server 2.2

The following property in the web agent AMAgent.properties configuration file controls the agent’s trust behavior, and by default it is set to true:

com.sun.am.trust_server_certs

ProcedureTo Disable the Default Trust Behavior of Agent for Apache HTTP Server 2.2

With the property com.sun.am.trust_server_certs set to true, the web agent does not perform certificate checking. Setting this property to false is one of the steps involved in enabling the web agent to perform certificate checking as illustrated in the following task.

  1. Set the following property in the web agent AMAgent.properties configuration file to false as follows:

    com.sun.am.trust_server_certs = false
  2. Set the directory Cert DB as described in the substeps that follow:

    1. Create a directory named cert.

      The best practice is to create this folder in the following directory:

      PolicyAgent-base/AgentInstance-Dir/

      The following is a feasible example of the full path to the cert directory:

      /usr/local/webagents/apache22_agent/Agent_001/cert

      For more information about the directory structure, see Inside the Web Agent Base Directory.

    2. In the web agent AMAgent.properties configuration file, set the path to the cert directory.

      The following example, includes the property, com.sun.am.sslcert.dir, and the value:

      com.sun.am.sslcert.dir = PolicyAgent-base/AgentInstance-Dir/cert
  3. Set the Cert DB Prefix, if required.

    In cases where the specified Cert DB directory has multiple certificate databases, the following property must be set to the prefix of the certificate database to be used:

    com.sun.am.certdb.prefix

    Set the property as follows:


    com.sun.am.certdb.prefix = https-host.domain.com.host-
  4. Save and close the web agent AMAgent.properties configuration file.

Installing the Access Manager Root CA Certificate for a Remote Apache HTTP Server 2.2 Instance

The root CA certificate that you install on the remote instance of Apache HTTP Server 2.2 must be the same one that is installed on the Access Manager host.

ProcedureTo Install the Access Manager Root CA Certificate on Apache HTTP Server 2.2

  1. Change to the cert directory.

    The following example illustrates the location of the cert directory:

    PolicyAgent-base/AgentInstance-Dir/cert

    The following is a feasible example of the full path to the cert directory without the PolicyAgent-base placeholder:

    /usr/local/webagents/apache22_agent/Agent_001/cert
  2. Set the proper environment by issuing the following command:

    setenv LD_LIBRARY_PATH PolicyAgent-base/lib:/usr/lib/mps
  3. (Conditional) If you have not already created the necessary certificate database, create that database now by issuing the following command:

    PolicyAgent-base/bin/certutil -N -d .

    The following is a feasible example of how this command might look without the PolicyAgent-base placeholder:

    /usr/local/webagents/apache22_agent/bin/certutil -N -d .

    For more information about the directory structure, see Inside the Web Agent Base Directory.

  4. Install root CA certificate by issuing the following command:

    PolicyAgent-base/bin/certutil -A -n cert-name -t
    "C,C,C" -d cert-dir -i cert-file
    
    cert-name

    The name for this root CA certificate

    cert-dir

    The directory where the certificate and key stores are located

    cert-file

    The base-64 encoded root CA certificate file

    For example, if the Root CA certificate of the Access Manager host is present in the directory PolicyAgent-base/Agent_001/cert and if the name of this certificate file is root_ca.crt, then the following command would be appropriate:

    PolicyAgent-base/bin/certutil -A -n am_root_ca_cert
    -t "C,C,C" -d . -i root_ca.crt

    The following is a feasible example of how this command might look without the PolicyAgent-base placeholder:

    /usr/local/webagents/apache22_agent/bin/certutil -A -n
    am_root_ca_cert -t "C,C,C" -d . -i root_ca.crt
  5. To verify that the certificate is properly installed, using the command line, issue the following command:

    PolicyAgent-base/bin/certutil -L -d .

    The root CA certificate is then listed in the output of the certutil -L command as illustrated in the following code example:


    Certificate Name                             Trust Attrubutes
    
    
    cert-name                                      C,C,C
    
    p    Valid peer
    P    Trusted peer (implies c)
    c    Valid CA
    T    Trusted CA to issue client certs (implies c)
    C    Trusted CA to certs(only server certs for ssl) (implies c)
    u    User cert
    w    Send warning
    
    
                      
  6. Restart Apache HTTP Server.