To test a Secure Attribute Exchange we configure and use JavaServer Pages (bundled with the OpenSSO Enterprise Client SDK) to emulate real world applications. saeSPApp.jsp represents the service provider application that will receive the attributes from the identity provider. It will be installed on the sae.sp-example.com host machine. The following procedures will install and configure one instance of Application Server as the web container for the service provider application.
To Install Application Server on the Secure Attribute Exchange Service Provider Host Machine
To Secure Communications from the Service Provider Application
To Modify the Service Provider Web Container domain.xml Configuration File
To Deploy the Client SDK on the Service Provider Host Machine
This procedure assumes you have completed 13.1 Patching the Secure Attribute Exchange Host Machines.
Log in to the sae.sp-example.com host machine as a root user.
Create a directory into which the Application Server bits can be downloaded and change into it.
# mkdir /export/AS91 # cd /export/AS91 |
Download the Sun Java System Application Server 9.1 Update 1 binary from the Sun Microsystems Product Download page to the /export/AS91 directory.
Grant the downloaded binary execute permission using the chmod command.
# chmod +x sjsas-9_1_01-solaris-sparc.bin |
Install the software.
# ./sjsas-9_1_01-solaris-sparc.bin -console |
When prompted, provide the following information.
|
Press Enter to continue. |
|
|
Enter yes. |
|
|
Enter /opt/SUNWappserver91 |
|
|
Enter 1 to create the directory. |
|
|
Press Enter to accept the default value. |
|
|
Press Enter to accept the default value. |
|
|
Enter domain1pwd and then re-enter domain1pwd. |
|
|
Press Enter to accept the default value. |
|
|
Press Enter to accept the three default values. |
|
|
Press Enter to accept the default value. |
|
|
Press Enter to accept the default value. |
|
|
Press Enter to accept the default value and begin the installation process. |
|
|
When installation is complete, an Installation Successful message is displayed: |
|
|
Press Enter to exit the installation program. |
Log out of the sae.sp-example.com host machine.
Create a request for a server certificate and import the certificate authority (CA) root certificate and server certificate to the keystore. This will secure communications initiated by the service provider application.
Backup domain.xml before modifying it.
Log in to the sae.sp-example.com host machine as a root user.
Generate a private/public key pair and reference it with the alias, sae-sp.
sae-sp will be used in a later step to retrieve the public key which is contained in a self-signed certificate.
# cd /opt/SUNWappserver91/domains/domain1/config # keytool -genkey -noprompt -keyalg rsa -keypass changeit -alias sae-sp -keystore keystore.jks -dname "CN=sae.sp-example.com, OU=OpenSSO, O=Sun Microsystems, L=Santa Clara, ST=California, C=US" -storepass changeit |
Verify that the key pair was successfully created and stored in the certificate store using the following command.
# keytool -list -v -keystore keystore.jks -storepass changeit |
The output of this command lists a key entry with the alias sae-sp.
The output of this command may list more than one certificate based on the entries in the keystore.
Generate a server certificate request.
# keytool -certreq -alias sae-sp -keypass changeit -keystore keystore.jks -storepass changeit file sae-sp.csr |
sae-sp.csr is the server certificate request.
(Optional) Verify that sae-sp.csr was created.
# ls -la sae-sp.csr -rw-r--r-- 1 osso80adm staff 715 Apr 4 15:04 sae-sp.csr |
Send sae-sp.csr to the CA of your choice.
The CA issues and returns a certified server certificate named sae-sp.cer.
Import ca.cer, the CA root certificate, into the certificate store.
The root certificate must be imported into two keystores (keystore.jks and cacerts.jks) with Application Server.
# keytool -import -trustcacerts -alias OpenSSLTestCA -file ca.cer -keystore keystore.jks -storepass changeit Owner: EMAILADDRESS=nobody@nowhere.com, CN=openssltestca, OU=am, O=sun, L=santa clara, ST=california, C=us Issuer: EMAILADDRESS=nobody@nowhere.com, CN=openssltestca, OU=am, O=sun, L=santa clara, ST=california, C=us Serial number: f59cd13935f5f498 Valid from: Thu Sep 20 11:41:51 PDT 2007 until: Thu Jun 17 11:41:51 PDT 2010 Certificate fingerprints: MD5: 78:7D:F0:04:8A:5B:5D:63:F5:EC:5B:21:14:9C:8A:B9 SHA1: A4:27:8A:B0:45:7A:EE:16:31:DC:E5:32:46:61:9E:B8:A3:20:8C:BA Trust this certificate? [no]: Yes Certificate was added to keystore |
# keytool -import -trustcacerts -alias OpenSSLTestCA -file ca.cer -keystore cacerts.jks -storepass changeit Owner: EMAILADDRESS=nobody@nowhere.com, CN=openssltestca, OU=am, O=sun, L=santa clara, ST=california, C=us Issuer: EMAILADDRESS=nobody@nowhere.com, CN=openssltestca, OU=am, O=sun, L=santa clara, ST=california, C=us Serial number: f59cd13935f5f498 Valid from: Thu Sep 20 11:41:51 PDT 2007 until: Thu Jun 17 11:41:51 PDT 2010 Certificate fingerprints: MD5: 78:7D:F0:04:8A:5B:5D:63:F5:EC:5B:21:14:9C:8A:B9 SHA1: A4:27:8A:B0:45:7A:EE:16:31:DC:E5:32:46:61:9E:B8:A3:20:8C:BA Trust this certificate? [no]: Yes Certificate was added to keystore |
Replace the self-signed public key certificate (associated with the s1as alias) with the server certificate received from the CA.
# keytool -import -file sae-sp.cer -alias sae-sp -keystore keystore.jks -storepass changeit Certificate reply was installed in keystore |
(Optional) Verify that the self-signed public key certificate has been overwritten by the server certificate received from the CA.
# keytool -list -alias sae-sp -v -keystore keystore.jks -storepass changeit The certificate indicated by the alias "sae-sp" is signed by CA. |
Change the certificate alias from the default s1as to the new sae-sp in the domain.xml file for the domain1 domain.
The Application Server configuration file is domain.xml.
<http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-2" port="1081" security-enabled="true" server-name="" xpowered-by="true"> <ssl cert-nickname="sae-sp" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
Modify the following Java Virtual Machine (JVM) options in the Application Server configuration file, domain.xml to prepare for the installation of the Client SDK.
This procedure assumes you are still logged in as the root user to the sae-sp host machine.
Backup domain.xml before modifying it.
Change to the config directory.
# cd /opt/SUNWappserver91/domains/domain1/config |
Open domain.xml in a text editor and make the following changes:
Replace <jvm-options>-client</jvm-options> with <jvm-options>-server</jvm-options>.
Replace <jvm-options>-Xmx512m</jvm-options> with <jvm-options>-Xmx1024m</jvm-options>.
Save the file and close it.
Restart the domain1 domain.
# cd /opt/SUNWappserver91/bin # ./asadmin stop-domain Server was successfully stopped. ./asadmin start-domain Redirecting output to /opt/SUNWappserver91/domains/domain1/logs/server.log |
Verify that the certificate used for SSL communication is the root CA certificate.
When you deploy the Client SDK, you also deploy the saeSPApp.jsp.
This procedure assumes you are still logged in as the root user to the sae-sp host machine.
Get the Client SDK WAR using the following sub procedure.
Access http://sae.sp-example.com:4848/login.jsf from a web browser.
admin
domain1pwd
Click Web Applications in the left frame of Application Server.
Click Deploy.
The Deploy Enterprise Applications/Modules page is displayed.
Click the radio button next to Packaged file to be uploaded to the server and browse for the opensso-client-jdk15.war WAR in the /export/OSSO_BITS/opensso/samples/war directory.
Enter opensso-client as the Application Name.
Click OK to deploy the Client SDK.
(Optional) List the contents of the j2ee-modules directory to verify that the WAR was successfully deployed.
Log out of the sae.sp-example.com host machine.
Add the IP address and host machine names to the /etc/hosts file on both the sae.idp-example.com and the sae.sp-example.com host machines as well as the host machine on which the browser is located.