Sun Java System Access Manager 6 2005Q1 Administration Guide |
Chapter 3
Configuring Access Manager in SSL ModeUsing Secure Socket Layer (SSL) with simple authentication guarantees confidentiality and data integrity. To enable Access Manager in SSL, mode you would typically:
The following sections describe these steps:
Configuring Access Manager With a Secure Sun Java System Web ServerTo configure Access Manager in SSL mode with Sun Java System Web Server, see the following steps:
Step 2 through Step 25 describe the Sun Java System Web Server.
- Log on to the Web Server console. The default port is 58888.
- Select the Web Server instance on which Access Manager is running, and click Manage.
This displays a pop-up window explaining that the configuration has changed. Click OK.
- Click on the Apply button located top right corner of the screen.
- Click Apply Settings.
The Web Server should automatically restart. Click OK to continue.
- Stop the select Web Server instance.
- Click the Security Tab.
- Click on Create Database.
- Enter the new database password and click OK.
Ensure that you write down the database password for later use.
- Once the Certificate Database has been created, click on Request a Certificate.
- Enter the data in the fields provided in the screen.
The Key Pair Field Password field is the same as you entered in Step 9. In the location field, you will need to spell out the location completely. Abbreviations, such as CA, will not work. All of the fields must be defined. In the Common Name field, provide the hostname of your Web Server.
- Once the form is submitted, you will see a message such as:
--BEGIN CERTIFICATE REQUEST---
afajsdllwqeroisdaoi234rlkqwelkasjlasnvdknbslajowijalsdkjfalsdflasdf
alsfjawoeirjoi2ejowdnlkswnvnwofijwoeijfwiepwerfoiqeroijeprwpfrwl
--END CERTIFICATE REQUEST--
- Copy this text and submit it for the certificate request.
Ensure that you get the Root CA certificate.
- You will receive a certificate response containing the certificate, such as:
--BEGIN CERTIFICATE---
afajsdllwqeroisdaoi234rlkqwelkasjlasnvdknbslajowijalsdkjfalsdflasdf
alsfjawoeirjoi2ejowdnlkswnvnwofijwoeijfwiepwerfoiqeroijeprwpfrwl
--END CERTIFICATE---
- Copy this text into your clipboard, or save the text into a file.
- Go to the Web Server console and click on Install Certificate.
- Click on Certificate for this Server.
- Enter the Certificate Database password in the Key Pair File Password field.
- Paste the certificate into the provided text field, or check the radio button and enter the filename in the text box. Click Submit.
The browser will display the certificate, and provide a button to add the certificate.
- Click Install Certificate.
- Click Certificate for Trusted Certificate Authority.
- Once you have completed installing both certificates, click on the Preferences tab in the Web Server console.
- Select Add Listen Socket if you wish to have SSL enabled on a different port. Then, select Edit Listen Socket.
- Change the security status from Disabled to Enabled, and click OK to submit the changes.
Step 26 through Step 28 describe Access Manager.
- Open the AMConfig.properties file. By default, the location of this file is etc/opt/SUNWam/config.
- Replace all of the protocol occurrences of http:// to https://, except for the Web Server Instance Directory. This is also specified in AMConfig.properties, but must remain the same.
- Save the AMConfig.properties file.
- In the Web Server console, click the ON/OFF button for the Access Manager hosting web server instance.
The Web Server displays a text box in the Start/Stop page.
- Enter the Certificate Database password in the text field and select Start.
Configuring Access Manager with a Secure Sun Java System Application ServerSetting up Access Manager to run on an SSL-enabled Sun Java System Application server is a two-step process. First, secure the Application Server instance to the installed Access Manager, then configure Access Manager itself.
Setting Up Application Server 6.2 With SSL
To Secure the Application Server Instance:
- Log into the Sun Java System Application Server console as an administrator by entering the following address in your browser:
http://fullservername:port
The default port is 4848.
- Enter the username and password you entered during installation.
- Select the Application Server instance on which you installed (or will install) Access Manager. The right frame displays that the configuration has changed.
- Click Apply Changes.
- Click Restart. The Application Server should automatically restart.
- In the left frame, click Security.
- Click the Manage Database tab.
- Click Create Database, if it is not selected.
- Enter the new database password and confirm, then click the OK button. Make sure that you write down the database password for later use.
- Once the Certificate Database has been created, click the Certificate Management tab.
- Click the Request link, if it is not selected.
- Enter the following Request data for the certificate
- Select it if this is a new certificate or a certificate renewal. Many certificates expire after a specific period of time and some certificate authorities (CA) will automatically send you renewal notification.
- Specify the way in which you want to submit the request for the certificate.
If the CA expects to receive the request in an E-mail message, check CA E-mail and enter the E-mail address of the CA. For a list of CAs, click List of Available Certificate Authorities.
If you are requesting the certificate from an internal CA that is using the Sun Java System Certificate Server, click CA URL and enter the URL for the Certificate Server. This URL should point to the certificate server's program that handles certificate requests.
- Enter the password for your key-pair file (this is the password you specified in Step 9).
- Enter the following identification information:
Common Name. The full name of the server including the port number.
Requestor Name. The name of the requestor.
Telephone Number. The telephone number of the requestor
Common Name. The fully qualified name of the Sun Java System Application Server on which the digital certificate will be installed.
E-mail Address. The E-mail address of the administrator.
Organization Name. The name of your organization. The certificate authority may require any host names entered in this attribute belong to a domain registered to this organization.
Organizational Unit Name. The name of your division, department, or other operational unit of your organization.
Locality Name (city). The name of your city or town.
State Name. The name of the state or province in which your organization operates if your organization is in the United States or Canada, respectively. Do not abbreviate.
Country Code. The two-letter ISO code for your country. For example, the code for the United States is US.
- Click the OK button. A message will be displayed, for example:
--BEGIN NEW CERTIFICATE REQUEST---
afajsdllwqeroisdaoi234rlkqwelkasjlasnvdknbslajowijalsdkjfalsdfla
alsfjawoeirjoi2ejowdnlkswnvnwofijwoeijfwiepwerfoiqeroijeprwpfrwl
--END NEW CERTIFICATE REQUEST--
- Copy all of this text to a file and click OK. Make sure that you get the Root CA certificate.
- Select a CA and follow the instructions on that authority's web site to get a digital certificate. You can get the certificate from CMS, Verisign or Entrust.net
- After you receive your digital certificate from the certificate authority, you can copy the text into your clipboard, or save the text into a file.
- Go to the Sun Java System Application Server console and click on the Install link.
- Select Certificate For This Server.
- Enter the Certificate Database password in the Key Pair File Password field. (It is the same password you entered in Step 9).
- Paste the certificate into the provided text field, Message text (with headers), or enter the filename in the Message that is in this file text box. Select the appropriate radio button.
- Click OK button. The browser displays the certificate, and provides a button to add the certificate.
- Click Add Server Certificate.
- Install the Root CA Certificate in the same manner described in Step 10 through Step Step 22. However, in Step 18, select Certificate for Trusted Certificate Authority.
- Once you have completed installing both certificates, expand the HTTP Server node in the left frame
- Select HTTP Listeners under HTTP Server.
- Select http-listener-1. The browser displays the socket information.
- Change the value of the port used by http-listener-1 from the value entered while installing application server, to a more appropriate value such as 443.
- Select SSL/TLS Enabled.
- Select Certificate Nickname.
- Specify the Return server. This should match the common name specified in Step 12.
- Click Save.
- Select the Application Server instance on which you will install the Sun Java System Access Manager software. The right frame shows that the configuration has changed.
- Click Apply Changes.
- Click Restart. The application server should automatically restart.
Setting Up Application Server 8.1 With SSL
To Secure the Application Server Instance:
- Make sure that the Application Server instance is stopped.
- Change the token password by using the asadmin>change-master-password command.
- Go to the Application Server console and select Configuration>HTTP Service>HTTP Listeners.
- Click the listener that you wish to enable and in the right pane, select Security:Enabled.
- Check if certutil is installed.
- Use certutil to check for installed certificates in certdb:
- Go to /var/opt/SUNWappserver/domains/domain1/config
- certutil -L -d
- You will see following output:
Application Server 8.1 installs self signed server certificate (nickname, s1as) in install time and uses it for ssl enabled ports 4848, 8181.
- Generate the certificate request.The syntax to do so is:
certutil -R -s subj -o cert-request-file [-d certdir] [-P dbprefix] [-p phone] [-a]
For example:
certutil -R -s "CN=test.company1.com, O=company1.com, C=US" -o cert.req -d . -a
- Retrieve the certificate from the CA and istall it by using the following command:
certutil -A -n cert-name -t trustargs [-d certdir] [-P dbprefix] [-a] [-i input]
- Save server certificate in a file, for example cert.txt.
- Install the server certificate with the following command:
certutil -A -n “AMTrustCA” -t “CT<CT,CT” -d. -a -i cert.txt
- List the certdb to ensure successful installation. Enter the following command:
/var/opt/SUNWappserver/domains/domain1/config/% certutil -L -d
- Go to the Application Server Admin Console and choose HTTP Listeners.
Under General Settings, configure the HTTP Listener with the new server certificate.
- Restart the Application Server.
Configuring Access Manager in SSL Mode Using JSS
To configure Access Manager in SSL mode using JSS (Network Security Service for Java):
- In the Access Manager console, go to the Service Configuration module and select the Platform service. In the Server List attribute, add the same URL with the HTTPS protocol and an SSL-enabled port number. Click Save.
Note
If a single instance of Access Manager is listening on two ports (one in HTTP and one in HTTPS) and you try to access Access Manager with a stalled cookie, Access Manager will become unresponsive. This is not a supported configuration.
- Open the AMConfig.properties file from the following default location:
/etc/opt/SUNWam/config.
- Replace all of the protocol occurrences of http:// to https:// and change the port number to an SSL-enabled port number.
- Save the AMConfig.properties file.
- Restart the Application Server.
Configuring AMSDK with a Secure BEA WebLogic ServerThe BEA WebLogic Server must first be installed and configured as a web container before you configure it with the AMSDK in SSL. For installation instructions, see the BEA WebLogic server documentation. To configure WebLogic as a web container for Access Manager, see Chapter 1, "Access Manager 2005Q1 Configuration Scripts".
To configure a secure WebLogic instance:
- Create a domain using the quick start menu
- Go to the WebLogic installation directory and generate the certificate request.
- Apply for the server certificate using the vetri_csr.txt CSR to a CA
- Save the approved certificate in to a text file. For example, approvedcert.txt.
- Load the Root CA in cacerts by using the following commands:
cd jdk141_03/jre/lib/security/
jdk141_03/jre/bin/keytool -keystore cacerts -keyalg RSA -import -trustcacerts -alias "Greenday CA" -storepass changeit -file /opt/bea81/cacert.txt
- Load the Server certificate by using the following command:
jdk141_03/jre/bin/keytool -import -keystore keystore -keyalg RSA -import -trustcacerts -file approvedcert.txt -alias "mykey"
- Login to WebLogic console with your username and password.
- Browse to the following location:
yourdomain> Servers> myserver> Configure Keystores
- Select Custom Identity and then Java Standard Trust
- Enter the keystore location. For example, /opt/bea81/keystore.
- Enter Keystore Password and Keystore Pass Phrase. For example:
Keystore Password: JKS/Java Standard Trust (for WL 8.1 it is only JKS)
Key Store Pass Phrase: changeit
- Review the SSL Private Key Settings Private Key alias and password.
- In Access Manager, the following parameters in AmConfig.properties are automatically configured during installation. If they are not, you can edit them appropriately:
com.sun.identity.jss.donotInstallAtHighestPriority=true [ this is not required for AM 6.3 and above]
com.iplanet.security.SecureRandomFactoryImpl=com.iplanet.am.util.Secure RandomFactoryImpl
com.iplanet.security.SSLSocketFactoryImpl=netscape.ldap.factory.JSSESoc ketFactory
com.iplanet.security.encryptor=com.iplanet.services.util.JCEEncryption2
If your JDK path is the following:
com.iplanet.am.jdk.path=/usr/jdk/entsys-j2se
then use the keytool utility to import the root CA in the certificate database. For example:
/usr/jdk/entsys-j2se/jre/lib/security
/usr/jdk/entsys-j2se/jre/bin/keytool -keystore cacerts -keyalg RSA -import -trustcacerts -alias "machinename" -storepass changeit -file
/opt/bea81/cacert.txt
The keytool utility is located in the following directory:
/usr/jdk/entsys-j2se/jre/bin/keytool
- Remove -D"java.protocol.handler.pkgs=com.iplanet.services.comm" from the Access Manager amadmin command line utility.
- Configure Access Manager in SSL Mode. For more information, see Configuring Access Manager in SSL Mode Using JSS.
Configuring AMSDK with a Secure IBM WebSphere Application ServerThe IBM WebShpere Server must first be installed and configured as a web container before you configure it with the AMSDK in SSL. For installation instructions, see the WebSphere server documentation. To configure WebLogic as a web container for Access Manager, see Chapter 1, "Access Manager 2005Q1 Configuration Scripts".
To configure a secure WebSphere instance:
- Start ikeyman.sh, located in the Websphere /bin directory.
- From the Signer menu, import the certification authority’s (CA) certificate.
- From the Personal Certs menu, generate the CSR.
- Retrieve the certificate created in the previous step.
- Select Personal Certificates and import the server certificate.
- From the WebSphere console, change the default SSL settings and select the ciphers.
- Set the default IBMJSSE SSL provider.
- Enter the following command to import the Root CA certificate from the file you just created into application server JVM Keystore:
$ appserver_root-dir/java/bin/ keytool -import -trustcacerts -alias cmscacert -keystore ../jre/lib/security/cacerts -file /full_path_cacert_filename.txt
app-server-root-dir is the root directory for the application server and full_path_cacert_filename.txt is the full path to the file containing the certificate.
- In Access Manager, update the following parameters in AmConfig.properties to use JSSE:
com.sun.identity.jss.donotInstallAtHighestPriority=true
com.iplanet.security.SecureRandomFactoryImpl=com.iplanet.am.util.SecureRan domFactoryImpl
com.iplanet.security.SSLSocketFactorImpl=netscape.ldap.factory.JSSESocketF actory
com.iplanet.security.encyptor=com.iplanet.services.unil.JCEEncryption
- Configure Access Manager in SSL Mode. For more information, see Configuring Access Manager in SSL Mode Using JSS.
Configuring Access Manager to Directory Server in SSL ModeTo provide secure communications over the network, Access Manager includes the LDAPS communications protocol. LDAPS is the standard LDAP protocol, but it runs on top of the Secure Sockets Layer (SSL). In order to enable SSL communication, you must first configure the Directory Server in SSL mode and then connect Access Manager to Directory Server. The basic steps are as follows:
- Obtain and install a certificate for your Directory Server, and configure the Directory Server to trust the certification authority’s (CA) certificate.
- Turn on SSL in your directory.
- Configure the authentication, policy and platform services to connect to an SSL-enabled Directory Server.
- Configure Access Manager to securely connect to the Directory Server backend.
Configuring Directory Server in SSL Mode
In order to configure the Directory Server in SSL mode, you must obtain and install a server certificate, configure the Directory Server to trust the CA’s certificate and enable SSL. Detailed instructions on how to complete these tasks are included in Chapter 11, “Managing Authentication and Encryption” in the Directory Server Administration Guide. This document can be found in the following location:
You can also download a PDF of the manual from the following location:
http://docs.sun.com/coll/DirectoryServer_04q2
If your Directory Server is already SSL-enabled, go to the next section for details on connecting Access Manager to Directory Server.
Connecting Access Manager to the SSL-enabled Directory Server
Once the Directory Server has been configured for SSL mode, you need to securely connect Access Manager to the Directory Server backend. To do so:
- In the Access Manager Console, go to the LDAP Authentication service in the Service Configuration module.
- Go to the Membership Authentication service in the Service Configuration module.
- Go to the Policy Configuration service located in Service Configuration.
- Open the serverconfig.xml in a text editor. The file is in the following location:
/etc/opt/SUNWam/config
- Open the AMConfig.properties file from the following default location:
/etc/opt/SUNWam/config.
Change the following properties:
- Restart the server