C.4 Configuring Cert Mode Communication for Access Manager

Configure Cert mode communication for Access Manager with at least one OAM Server instance running in the same mode as the agent.

This topic describes how to configure Cert mode communication for Access Manager. The following tasks apply to Cert mode only.

Note:

In Simple mode, the bundled Access Manager-CA-signed certificates are used and most of the following tasks are not needed.

Prerequisites

During agent registration, at least one OAM Server instance must be running in the same mode as the agent. Otherwise, registration fails. After agent registration, however, you could change the communication mode of the OAM Server.

Task overview: Adding certificates for the OAM Server includes

  1. Reviewing:

  2. Generating a Certificate Request and Private Key for OAM Server

  3. Retrieving the OAM Keystore Alias and Password

  4. Importing the Trusted, Signed Certificate Chain Into the Keystore

  5. Adding Certificate Details to Access Manager Settings

  6. Generating a Private Key and Certificate Request for WebGates

  7. Updating WebGate to Use Certificates

C.4.1 About Cert Mode Encryption and Files

The certificate request for WebGate generates the request file aaa_req.pem, which you must send to a root CA that is trusted by the OAM Sever. The root CA returns the certificates, which can then be installed either during or after 10g WebGate installation (for 11g WebGate these must be copied to the WebGate instance area manually after WebGate installation and configuration).

  • aaa_key.pem (reserved name for WebGate key file, which cannot be changed)

  • aaa_cert.pem (reserved name for WebGate certificate file, which cannot be changed)

  • aaa_chain.pem (reserved name for CA Cert for WebGate side)

During component installation in Cert mode, you are asked to present a certificate obtained from an external CA. If you do not yet have a certificate you can request one. Until you receive the certificate, you can configure the WebGate in Simple mode. However, you cannot complete OAM deployment until the certificates are issued and installed.

If you choose Cert mode when registering WebGate as an OAM Agent, a field appears where you can enter the Agent Key Password. When editing an 11g WebGate registration, password.xml is updated only when the mode is changed from Open to Cert or Simple to Cert. In cert mode, once generated, password.xml cannot be updated. Editing the agent Key Password does not result in creation of a new password.xml.

You must create a Cert request and send that to the CA. When the certificate is returned you must import it to the OAM Server (or copy it to the WebGate).

C.4.2 Generating a Certificate Request and Private Key for OAM Server

Use the following procedure to retrieve the private key, certificate, and CA certificate for the OAM Server.

Note:

The certified tool is openSSL. Oracle recommends that you use openSSL rather than other tools to generate certificates and keys in PEM format.

To retrieve the private key and certificates for OAM Server

  1. Generate both the certificate request (aaa_req.pem) and Private Key (aaa_key.pem) as follows:
    –OpenSSL req –new –keyout aaa_key.pem –out aaa_req.pem –utf8
     -nodes -config openssl_silent_ohs11g.cnf
    
  2. Submit the certificate request (aaa_req.pem) to a trusted CA.
  3. Download the CA Certificate in base64 as aaa_chain.pem.
  4. Download the Certificate in both base64 and DER format as aaa_cert.pem and aaa_cert.der.
  5. Encrypt the private key (aaa_key.pem) using a password as follows:
    openssl rsa -in aaa_key.pem -passin pass: -out aaa_key.pem -passout pass: 
    ******** -des 
    

    Tip:

    The common name for generating a certificate request for OAM server could be the host name of the OAM cluster's load balancer (global load balancer in case of MDC configuration) for clustered environments and the name of the host where OAM server is deployed for the non-clustered environments.

C.4.3 Retrieving the OAM Keystore Alias and Password

Users with valid Administrator credentials can perform the following task to retrieve the alias of the certificate in the specified keystore to be used for authentication, and the password that is required to import a certificate.

To retrieve the OAM Keystore password:

  1. Confirm the Oracle Access Management Console is running.

  2. On the computer hosting the Oracle Access Management Console, locate the WebLogic Scripting Tool in the OAM Installation path to use when retrieving the keystore password. For example:

    $ORACLE_IDM_HOME/common/bin/

    Here, $ORACLE_IDM_HOME is the base installation directory; /common/bin is the path in which the scripting tool is located.

  3. Start the WebLogic Scripting Tool:

    ·/ wlst.sh
    
  4. In the WLST shell, enter the command to connect and then enter the requested information. For example:

    wls:/offline> connect() 
    Please enter your username [weblogic] :  
    Please enter your password [welcome1] :
    Please enter your server URL [t3://localhost:7001] :
    wls:/base_domain/serverConfig>
    
  5. Enter the following command to change the location to the read-only domainRuntime tree (For help, use help(domainRuntime)). For example:

    wls:/OAM_AC> domainRuntime() 
    
  6. Use the Oracle Enterprise Manager Console to retrieve the credentials for the OAM keystore.

    1. Login to the Oracle Enterprise Manager Console.

    2. Navigate to Farm_base_domain -> WebLogic Domain -> <domain name>

    3. Right click and select 'System mbean browser'.

    4. Search for JpsCredentialStore.

      Alternatively, navigate to application defined mbeans ->com.oracle.jps -> Domain: <domain name> -> JpsCredentialStore ->JpsCredentialStore

    5. Click the 'operations' tab in the right hand window.

    6. Click getPortableCredential.

    7. Enter OAM_STORE for or Parameter 1 and jks for or Parameter 2.

    8. Click Invoke.

      The returned value is the keystore password.

  7. Pay close attention to the password of the OAM Keystore that is displayed because this is required to import the certificates.

  8. Proceed to the following topic:

    See Importing the Trusted, Signed Certificate Chain Into the Keystore.

C.4.4 Importing the Trusted, Signed Certificate Chain Into the Keystore

The Oracle-provided importcert tool is used to import existing private key, signed certificate (public key) files into the specified keystore format: JKS (client keystore format) or JCEKS (OAM Server keystore format; .oamkeystore for instance.).

The keystores associated with Access Manager accepts only PKCS8 DER format certificates:

  • If you have PEM format certificates signed by your certificate authority (CA), the following procedure describes how to convert and then import these using the importcert shipped with Access Manager.

  • If PEM format certificates are not available, create a certificate request and have it signed by your CA before beginning the following procedure.

Following are the steps for using the JDK version 8 keytool. If you have a different version of keytool, refer the documentation for your JDK version.

Note:

When you use the keytool utility, the default key pair generation algorithm is Digital Signature Algorithm (DSA). However, Oracle Access Management and WebLogic Server do not support DSA and you must specify another key pair generation and signature algorithm.

Prerequisites

Retrieving the OAM Keystore Alias and Password

To import the trusted certificate chain into the keystore:

  1. For setting up OAM Server in CERT mode, before making any changes to .oamkeystore, download the artifacts using offline WLST command:

    downloadAccessArtifacts(domainHome="/new/path/base_domain", propsFile="/path/dbschema.properties")
    
    ---- contents of dbschema.properties ----
    oam.entityStore.schemaUser=MYPREFIX_OAM
    oam.entityStore.schemaPassword=Secret
    oam.entityStore.ConnectString=jdbc:oracle:thin:@dbhost.us.oracle.com:1521/servicename.us.oracle.com
    

    Note:

    At every restart of Admin servers , changes are pulled in from DB . Hence we need to downloadAccessArtifacts and saveAccessArtifacts , to save the cert mode changes .
  2. Locate the keytool in the following path:

    $MW_HOME/jdk8/bin/keytool
    
  3. Unzip importcert.zip and locate the Readme file in the following location:

    $ORACLE_IDM_HOME/oam/server/tools/importcert/README 
    
  4. aaa_chain.pem: Using a text editor, modify the aaa_chain.pem file to remove all data except that which is contained within the CERTIFICATE blocks, then save the file.

      ----BEGIN CERTIFICATE-----
          ...
          CERTIFICATE
          ...
       -----END CERTIFICATE-----
    
  5. Import the trusted certificate chain using the following command with details for your environment. For example:

    keytool -importcert -file aaa_chain.pem -trustcacerts -storepass <password>
    -keystore $ORACLE_HOME\user_projects\domains\$DOMAIN\config\fmwconfig\ 
    .oamkeystore -storetype JCEKS 
    
  6. When prompted to trust this certificate, type yes.

  7. aaa_cert.pem:

    1. Edit aaa_certn.pem using TextPad to remove all data except that which is contained within the CERTIFICATE blocks, and save the file in a new location to retain the original. For example:

        ----BEGIN CERTIFICATE-----
            ...
            CERTIFICATE
            ...
         -----END CERTIFICATE-----
      
    2. Enter the following command to convert the signed certificate (aaa_cert.pem) to DER format using openSSL or any other tool. For example:

      openssl x509 -in aaa_cert.pem -inform PEM -out aaa_cert.der -outform DER
      
  8. aaa_key.pem:

    1. Edit aaa_key.pem to remove all data except that which is contained within the CERTIFICATE blocks, and save the file in a new location to retain the original. For example:

        ----BEGIN CERTIFICATE-----
            ...
            CERTIFICATE
            ...
         -----END CERTIFICATE-----
      
    2. Enter the following command to convert the private key (aaa_key.pem) to DER format using openSSL or any other tool. For example:

      openssl pkcs8 -topk8 -nocrypt -in aaa_key.pem -inform PEM -out aaa_key.der  
      -outform DER
      
  9. Import signed DER format certificates into the keystore. For example:

    1. Import aaa_key.der using the following command line arguments and details for your environment. For example:

      c:\Middleware\idm_home\oam\server\tools\importcert

      - java -cp importcert.jar
      oracle.security.am.common.tools.importcerts.CertificateImport  
      -keystore <> -privatekeyfile <path> -signedcertfile  <path> 
      -alias [ -storetype <> genkeystore <> -help]
      

      Note:

      Enter the key store password and alias password when prompted. On a Windows system, use a semicolon (;) instead of a colon (:) in the command line.

  10. After making changes, please upload the changes to db using the following offline WLST command: saveAccessArtifacts(domainHome="/mwhome/user_projects/domains/base_domain", propsFile="/path/dbschema.properties").

  11. Proceed to Adding Certificate Details to Access Manager Settings.

C.4.5 Adding Certificate Details to Access Manager Settings

After importing the certificates into the keystore, add the alias and password that you specified earlier into Access Manager settings configuration in Oracle Access Management Console.

Note:

No explicit configuration is needed for Simple mode, which is provided out of the box.

To add certificate details to Access Manager Settings

  1. In the Oracle Access Management Console, click Configuration at the top of the window.
  2. In the Launch Pad tab, select Access Manager from the View drop-down menu in the Settings section.
  3. In the Access Protocol section, fill in the alias and alias password details acquired in the previous procedure. For example:

    Cert Mode Configuration

    PEM keystore Alias: my_keystore_alias

    PEM keystore Alias Password: my_keystore_alias_pw

  4. Click Apply to save the configuration.
  5. Close the page.
  6. Open the OAM Server registration page, click the Proxy tab, change the Proxy mode to Cert, and click Apply.
  7. Restart the OAM Server.
  8. Proceed to the following topic:

C.4.6 Generating a Private Key and Certificate Request for WebGates

Retrieve the private key, certificate, and CA certificate for the WebGate using openSSL.

The certified tool is openSSL. Oracle recommends that you use openSSL rather than other tools to generate certificates and keys in PEM format.

To retrieve the private key and certificates for WebGates

  1. Generate both the certificate request (aaa_req.pem) and Private Key (aaa_key.pem) as follows:
    openssl req -new -keyout aaa_key.pem -out aaa_req.pem -utf8 -nodes -sha256
    
  2. Submit the certificate request (aaa_req.pem) to a trusted CA.
  3. Download the CA Certificate in base64 as aaa_chain.pem.
  4. Download the Certificate in base64 format as aaa_cert.pem.
  5. Encrypt the private key (aaa_key.pem) using a password as follows:
    openssl rsa -in aaa_key.pem -passin pass: -out aaa_key.pem -passout pass: 
    ******** -des -sha256
    

    Tip:

    The common name for generating a certificate request for WebGates could be the host name of the Web Server where the agent is deployed.

  6. Proceed to Updating WebGate to Use Certificates.

C.4.7 Updating WebGate to Use Certificates

For all communication modes (Open, Simple, or Cert), the Agent registration should be updated from the Oracle Access Management Console:

  • Registering an Agent: If you choose Cert mode when registering an OAM Agent, a field appears where you can enter the Agent Key Password.

  • Editing/Updating an Agent: When editing an 11g WebGate registration, password.xml is updated only when the mode is changed from Open to Cert or Simple to Cert.

    Editing the agent Key Password does not result in creation of a new password.xml. In Cert mode, once generated, password.xml cannot be updated.

Prerequisites

Adding Certificate Details to Access Manager Settings

To update the communication mode in the WebGate Agent registration

  1. In the Oracle Access Management Console, click Application Security at the top of the window.
  2. In the Launch Pad tab, click Agents.
  3. On the Search page, define your criteria and open the desired agent registration, as described in "WebGate Search Controls".
  4. On the agent's registration page, locate the Security options and click Cert (or Simple).
  5. Cert Mode: Enter the Agent key Password as specified in Step 5 of "Generating a Private Key and Certificate Request for WebGates".
  6. Click Apply to submit the changes.
  7. Copy your updated WebGate files as follows:

    11g WebGate:

    • ObAccessClient.xml
    • cwallet.sso (11g WebGate only)
    • password.xml
    • From: $IDM_DOMAIN_HOME/output/AGENT_NAME

    • To: $OHS_INSTANCE_HOME/config/OHS/ohs2/webgate/config

    10g WebGate: ObAccessClient.xml

    • From: $WLS_DOMAIN_HOME/output/AGENT_NAME

    • To: $WebGate_install_dir/oblix/lib

    10g WebGate: password.xml

    • From: $WLS_DOMAIN_HOME/output/AGENT_NAME

    • To: $WebGate_install_dir/oblix/config

  8. Copy the following files that were created when "Generating a Certificate Request and Private Key for OAM Server":

    11g WebGate:

    • From:

      • aaa_key.pem: WebGate11g_home/webgate/ohs/tools/openssl
      • aaa_cert.pem: The location where this was saved after receiving from CA
      • aaa_chain.pem: The location where this was saved after receiving from CA
    • To: OHS_INSTANCE_HOME/config/OHS/ohs2/webgate/config

    10g WebGate:

    • From:

      • aaa_key.pem: The location where the private key file was generated
      • aaa_cert.pem: The location where this was saved after receiving from CA
      • aaa_chain.pem: The location where this was saved after receiving from CA
    • To: $WebGate_install_dir/oblix/config

  9. Restart the OAM Server and the Oracle HTTP Server instance.