Deployment Example: SAML v2 Using Sun OpenSSO Enterprise 8.0

Chapter 13 Testing Secure Attribute Exchange

Secure Attribute Exchange (also referred to as Virtual Federation Proxy) provides a mechanism for one application to communicate identity information to a second application in a different domain. More specifically, it provides a secure gateway that enables legacy applications to communicate authentication attributes without having to deal with federation protocols and processing. Secure Attribute Exchange uses SAML v2 to transfer identity data between the communicating entities. This chapter contains the following sections for setting up and testing Secure Attribute Exchange.


Note –

This chapter assumes you have completed Part II, Building the Identity Provider Environment and Part III, Building the Service Provider Environment; in effect, creating two domains that can communicate using SAML v2. In this test, we use symmetric key encryption (one shared secret is used for both encryption and decryption) between all providers and applications.


13.1 Patching the Secure Attribute Exchange Host Machines

Patch the host machines that will be used to deploy the sample Secure Attribute Exchange JavaServer Pages application (bundled with OpenSSO Enterprise Client SDK). Towards this end, use different web containers from those on which OpenSSO Enterprise is installed. On our lab machines, the required Application Server patch is 117461–08. Results for your machine might be different. Read the latest documentation for your web container to determine if you need to install patches and, if so, what they might be. You can search for patches directly at http://sunsolve.sun.com. Navigate to the PatchFinder page, enter the patch number, click Find Patch, and download the appropriate patch for the Secure Attribute Exchange identity provider application host machine (sae.idp-example.com) and the Secure Attribute Exchange service provider application host machine (sae.sp-example.com).

ProcedureTo Patch the OpenSSO Enterprise Host Machines

  1. Log in to the sae.idp-example.com host machine as a root user.

  2. Run patchadd to see if the patch is already installed.


    # patchadd -p | grep 117461-08
    

    A series of patch numbers are displayed, and patch 117461–08 is present so there is no need to install any patches at this time.

  3. Log out of the sae.idp-example.com host machine.

  4. Log in to the sae.sp-example.com host machine as a root user.

  5. Run patchadd to see if the patch is already installed.


    # patchadd -p | grep 117461-08
    

    A series of patch numbers are displayed, and patch 117461–08 is present so there is no need to install any patches at this time.

  6. Log out of the sae.sp-example.com host machine.

13.2 Installing Application Server on the Secure Attribute Exchange Identity Provider Host Machine

To test a Secure Attribute Exchange we configure and use JavaServer Pages (bundled with the OpenSSO Enterprise Client SDK) to emulate real world applications. saeIDPApp.jsp represents the identity provider application that will invoke a remote service provider application and pass attributes to it. It will be installed on the sae.idp-example.com host machine. The following procedures will install and configure one instance of Application Server as the web container for the identity provider application.

ProcedureTo Install Application Server on the Secure Attribute Exchange Identity Provider Host Machine

Before You Begin

This procedure assumes you have completed 13.1 Patching the Secure Attribute Exchange Host Machines.

  1. Log in to the sae.idp-example.com host machine as a root user.

  2. Create a directory into which the Application Server bits can be downloaded and change into it.


    # mkdir /export/AS91
    # cd /export/AS91
    
  3. Download the Sun Java System Application Server 9.1 Update 1 binary from the Sun Microsystems Product Download page to the /export/AS91 directory.

  4. Grant the downloaded binary execute permission using the chmod command.


    # chmod +x sjsas-9_1_01-solaris-sparc.bin
    
  5. Install the software.


    # ./sjsas-9_1_01-solaris-sparc.bin -console
    
  6. When prompted, provide the following information.


    You are running the installation program 
    for the Sun Java System Application Server. This 
    program asks you to supply configuration preference
    settings that it uses to install the server.
    
    This installation program consists of one or 
    more selections that provide you with information
    and let you enter preferences that determine
    how Sun Java System Application Server is 
    installed and configured. 
    
    When you are presented with the following
    question, the installation process pauses to 
    allow you to read the information that has 
    been presented When you are ready to continue, 
    press Enter.

    Press Enter to continue. 


    Have you read, and do you accept, all of 
    the terms of the preceding Software License 
    Agreement [no] {"<" goes back, "!" exits}?

    Enter yes.


    Installation Directory [/opt/SUNWappserver]
    {"<" goes back, "!" exits}

    Enter /opt/SUNWappserver91


    The specified directory "/opt/SUNWappserver91"
    does not exist. Do you want to create it now or 
    choose another directory?
    
    1. Create Directory
    2. Choose New.
    
    Enter the number corresponding to your choice [1] 
    {"<" goes back, "!" exits}

    Enter 1 to create the directory.


    The Sun Java System Application Server
    requires a Java 2 SDK. Please provide the path to
    a Java 2 SDK 5.0 or greater. [/usr/jdk/instances/jdk1.5.0] 
    {"<" goes back, "!" exits}

    Press Enter to accept the default value. 


    Supply the admin user's password and override
    any of the other initial configuration settings as 
    necessary.
    
    Admin User [admin] {"<" goes back, "!" exits}

    Press Enter to accept the default value. 


    Admin User's Password (8 chars minimum):
    Re-enter Password:

    Enter domain1pwd and then re-enter domain1pwd.


    Do you want to store admin user name and 
    password in .asadminpass file in user's home
    directory [yes] {"<" goes back, "!" exits}?

    Press Enter to accept the default value. 


    Admin Port [4848] {"<" goes back, "!" exits}
    HTTP Port [8080] {"<" goes back, "!" exits}
    HTTPS Port [8181] {"<" goes back, "!" exits}

    Press Enter to accept the three default values. 


    Do you want to enable Updatecenter client 
    [yes] {"<" goes back, "!" exits}?

    Press Enter to accept the default value. 


    Do you want to upgrade from previous 
    Application Server version [no] 
    {"<" goes back, "!" exits}?

    Press Enter to accept the default value. 


    The following items for the product Sun Java 
    System Application Server will be installed:
    
    Product: Sun Java System Application Server
    Location: /opt/SUNWappserver91
    Space Required: 161.61 MB
    -------------------------------------------
    Sun Java System message Queue 4.1
    Application Server
    Startup
    
    Ready To Install
    
    1. Install Now
    2. Start Over
    3. Exit Installation
    
    What would you like to do [1] 
    {"<" goes back, "!" exits}?

    Press Enter to accept the default value and begin the installation process. 


    - Installing Sun Java System Application 
    Server
    
    |-1%-----25%-----50%-----75%-----100%|
    
     - Installation Successful.

    When installation is complete, an Installation Successful message is displayed:


    Next Steps:
    
    1. Access the About Application Server 9.1 welcome 
    page at:
     file:///opt/SUNWappserver91/docs/about.html
    
    2. Start the Application Server by executing:
      /opt/SUNWappserver91/bin/asadmin 
      start-domain domain1
    
    3. Start the Admin Console:
      http://sae.idp-example.com:4848
    
    Please press Enter/Return key to exit the 
    installation program. {"!" exits}

    Press Enter to exit the installation program. 

  7. Log out of the sae.idp-example.com host machine.

ProcedureTo Secure Communications from the Identity Provider 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 identity provider application.

Before You Begin

Backup domain.xml before modifying it.

  1. Log in to the sae.idp-example.com host machine as a root user.

  2. Generate a private/public key pair and reference it with the alias, sae-idp.

    sae-idp 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-idp -keystore keystore.jks -dname "CN=sae.idp-example.com, 
    OU=OpenSSO, O=Sun Microsystems, L=Santa Clara, ST=California, C=US" 
    -storepass changeit
    
  3. 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-idp.


    Note –

    The output of this command may list more than one certificate based on the entries in the keystore.


  4. Generate a server certificate request.


    # keytool -certreq -alias sae-idp -keypass changeit 
    -keystore keystore.jks -storepass changeit file sae-idp.csr
    

    sae-idp.csr is the server certificate request.

  5. (Optional) Verify that sae-idp.csr was created.


    # ls -la sae-idp.csr
    
     -rw-r--r--   1 osso80adm staff        715 Apr  4 15:04 sae-idp.csr
  6. Send sae-idp.csr to the CA of your choice.

    The CA issues and returns a certified server certificate named sae-idp.cer.

  7. 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
  8. Replace the self-signed public key certificate (associated with the s1as alias) with the server certificate received from the CA.


    # keytool -import -file sae-idp.cer -alias sae-idp 
    -keystore keystore.jks -storepass changeit
    
    Certificate reply was installed in keystore
  9. (Optional) Verify that the self-signed public key certificate has been overwritten by the server certificate received from the CA.


    # keytool -list -alias sae-idp -v -keystore keystore.jks 
    -storepass changeit
    
    The certificate indicated by the alias "sae-idp" is signed by CA.
  10. Change the certificate alias from the default s1as to the new sae-idp 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-idp" client-auth-enabled="false" ssl2-enabled="false"
    ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>

ProcedureTo Modify the Identity Provider Web Container domain.xml Configuration File

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.

Before You Begin
  1. Change to the config directory.


    # cd /opt/SUNWappserver91/domains/domain1/config
    
  2. 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>.

  3. Save the file and close it.

  4. 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
  5. Verify that the certificate used for SSL communication is the root CA certificate.

    1. Access https://sae.idp-example.com/index.html from a web browser.

    2. View the details of the certificate in the security warning to ensure that it is Issued by “OpenSSLTestCA”.

      After inspecting and accepting the certificate, you should see the default index.html page.

    3. Close the browser.

ProcedureTo Deploy the Client SDK on the Identity Provider Host Machine

When you deploy the Client SDK, you also deploy the saeIDPApp.jsp.

Before You Begin

This procedure assumes you are still logged in as the root user to the sae-idp host machine.

  1. Get the Client SDK WAR using the following sub procedure.

    1. Log in to the osso1.idp-example.com host machine.

    2. Change to the /export/OSSO_BITS/opensso/samples/war directory.

    3. Copy opensso-client-jdk15.war to the /export/OSSO_BITS/opensso/samples/war directory on the sae.idp-example.com host machine.

    4. Log out of the osso1.idp-example.com host machine.

  2. Access http://sae.idp-example.com:4848/login.jsf from a web browser.

    User Name:

    admin

    Password:

    domain1pwd

  3. Click Web Applications in the left frame of Application Server.

  4. Click Deploy.

    The Deploy Enterprise Applications/Modules page is displayed.

  5. 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.

  6. Enter opensso-client as the Application Name.

  7. Click OK to deploy the Client SDK.

  8. (Optional) List the contents of the j2ee-modules directory to verify that the WAR was successfully deployed.

    1. Change to the /opt/SUNWappserver91/domains/domain1/applications/j2ee-modules directory.

    2. List the contents of the directory.


      # ls -al
      
      total 6
      drwxr-xr-x 3 root staff 512 Aug 15 14:01 .
      drwxr-xr-x 6 root staff 512 Aug 15 14:55 ..
      drwxr-xr-x 21 root staff 1024 Aug 15 14:01 opensso-client
  9. Log out of the sae.idp-example.com host machine.

Next Steps

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.

13.3 Installing Application Server on the Secure Attribute Exchange Service Provider Host Machine

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.

ProcedureTo Install Application Server on the Secure Attribute Exchange Service Provider Host Machine

Before You Begin

This procedure assumes you have completed 13.1 Patching the Secure Attribute Exchange Host Machines.

  1. Log in to the sae.sp-example.com host machine as a root user.

  2. Create a directory into which the Application Server bits can be downloaded and change into it.


    # mkdir /export/AS91
    # cd /export/AS91
    
  3. Download the Sun Java System Application Server 9.1 Update 1 binary from the Sun Microsystems Product Download page to the /export/AS91 directory.

  4. Grant the downloaded binary execute permission using the chmod command.


    # chmod +x sjsas-9_1_01-solaris-sparc.bin
    
  5. Install the software.


    # ./sjsas-9_1_01-solaris-sparc.bin -console
    
  6. When prompted, provide the following information.


    You are running the installation program 
    for the Sun Java System Application Server. This 
    program asks you to supply configuration preference
    settings that it uses to install the server.
    
    This installation program consists of one or 
    more selections that provide you with information
    and let you enter preferences that determine
    how Sun Java System Application Server is 
    installed and configured. 
    
    When you are presented with the following
    question, the installation process pauses to 
    allow you to read the information that has 
    been presented When you are ready to continue, 
    press Enter.

    Press Enter to continue. 


    Have you read, and do you accept, all of 
    the terms of the preceding Software License 
    Agreement [no] {"<" goes back, "!" exits}?

    Enter yes.


    Installation Directory [/opt/SUNWappserver]
    {"<" goes back, "!" exits}

    Enter /opt/SUNWappserver91


    The specified directory "/opt/SUNWappserver91"
    does not exist. Do you want to create it now or 
    choose another directory?
    
    1. Create Directory
    2. Choose New.
    
    Enter the number corresponding to your choice [1] 
    {"<" goes back, "!" exits}

    Enter 1 to create the directory.


    The Sun Java System Application Server
    requires a Java 2 SDK. Please provide the path to
    a Java 2 SDK 5.0 or greater. [/usr/jdk/instances/jdk1.5.0] 
    {"<" goes back, "!" exits}

    Press Enter to accept the default value. 


    Supply the admin user's password and override
    any of the other initial configuration settings as 
    necessary.
    
    Admin User [admin] {"<" goes back, "!" exits}

    Press Enter to accept the default value. 


    Admin User's Password (8 chars minimum):
    Re-enter Password:

    Enter domain1pwd and then re-enter domain1pwd.


    Do you want to store admin user name and 
    password in .asadminpass file in user's home
    directory [yes] {"<" goes back, "!" exits}?

    Press Enter to accept the default value. 


    Admin Port [4848] {"<" goes back, "!" exits}
    HTTP Port [8080] {"<" goes back, "!" exits}
    HTTPS Port [8181] {"<" goes back, "!" exits}

    Press Enter to accept the three default values. 


    Do you want to enable Updatecenter client 
    [yes] {"<" goes back, "!" exits}?

    Press Enter to accept the default value. 


    Do you want to upgrade from previous 
    Application Server version [no] 
    {"<" goes back, "!" exits}?

    Press Enter to accept the default value. 


    The following items for the product Sun Java 
    System Application Server will be installed:
    
    Product: Sun Java System Application Server
    Location: /opt/SUNWappserver91
    Space Required: 161.61 MB
    -------------------------------------------
    Sun Java System message Queue 4.1
    Application Server
    Startup
    
    Ready To Install
    
    1. Install Now
    2. Start Over
    3. Exit Installation
    
    What would you like to do [1] 
    {"<" goes back, "!" exits}?

    Press Enter to accept the default value and begin the installation process. 


    - Installing Sun Java System Application 
    Server
    
    |-1%-----25%-----50%-----75%-----100%|
    
     - Installation Successful.

    When installation is complete, an Installation Successful message is displayed:


    Next Steps:
    
    1. Access the About Application Server 9.1 welcome 
    page at:
     file:///opt/SUNWappserver91/docs/about.html
    
    2. Start the Application Server by executing:
      /opt/SUNWappserver91/bin/asadmin 
      start-domain domain1
    
    3. Start the Admin Console:
      http://sae.sp-example.com:4848
    
    Please press Enter/Return key to exit the 
    installation program. {"!" exits}

    Press Enter to exit the installation program. 

  7. Log out of the sae.sp-example.com host machine.

ProcedureTo Secure Communications from the Service Provider Application

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.

Before You Begin

Backup domain.xml before modifying it.

  1. Log in to the sae.sp-example.com host machine as a root user.

  2. 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
    
  3. 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.


    Note –

    The output of this command may list more than one certificate based on the entries in the keystore.


  4. 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.

  5. (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
  6. Send sae-sp.csr to the CA of your choice.

    The CA issues and returns a certified server certificate named sae-sp.cer.

  7. 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
  8. 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
  9. (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.
  10. 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"/>

ProcedureTo Modify the Service Provider Web Container domain.xml Configuration File

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.

Before You Begin
  1. Change to the config directory.


    # cd /opt/SUNWappserver91/domains/domain1/config
    
  2. 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>.

  3. Save the file and close it.

  4. 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
  5. Verify that the certificate used for SSL communication is the root CA certificate.

    1. Access https://sae.sp-example.com/index.html from a web browser.

    2. View the details of the certificate in the security warning to ensure that it is Issued by “OpenSSLTestCA”.

      After inspecting and accepting the certificate, you should see the default index.html page.

    3. Close the browser.

ProcedureTo Deploy the Client SDK on the Service Provider Host Machine

When you deploy the Client SDK, you also deploy the saeSPApp.jsp.

Before You Begin

This procedure assumes you are still logged in as the root user to the sae-sp host machine.

  1. Get the Client SDK WAR using the following sub procedure.

    1. Log in to the osso1.sp-example.com host machine.

    2. Change to the /export/OSSO_BITS/opensso/samples/war directory.

    3. Copy opensso-client-jdk15.war to the /export/OSSO_BITS/opensso/samples/war directory on the sae.sp-example.com host machine.

    4. Log out of the osso1.sp-example.com host machine.

  2. Access http://sae.sp-example.com:4848/login.jsf from a web browser.

    User Name:

    admin

    Password:

    domain1pwd

  3. Click Web Applications in the left frame of Application Server.

  4. Click Deploy.

    The Deploy Enterprise Applications/Modules page is displayed.

  5. 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.

  6. Enter opensso-client as the Application Name.

  7. Click OK to deploy the Client SDK.

  8. (Optional) List the contents of the j2ee-modules directory to verify that the WAR was successfully deployed.

    1. Change to the /opt/SUNWappserver91/domains/domain1/applications/j2ee-modules directory.

    2. List the contents of the directory.


      # ls -al
      
      total 6
      drwxr-xr-x 3 root staff 512 Aug 15 14:01 .
      drwxr-xr-x 6 root staff 512 Aug 15 14:55 ..
      drwxr-xr-x 21 root staff 1024 Aug 15 14:01 opensso-client
  9. Log out of the sae.sp-example.com host machine.

Next Steps

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.

13.4 Establishing Trust Between Communicating Entities

The following procedures will establish trust relationships between the communicating entities (in this case, the included JSP).

ProcedureTo Establish Trust Between OpenSSO Enterprise and the Application on the Identity Provider Side

Set up a trust relationship between saeIDPApp.jsp, the identity provider application, and OpenSSO Enterprise on the identity provider side.

Before You Begin

Choose a shared secret for use between the identity provider application and the instance of OpenSSO Enterprise on the identity provider side; in this procedure, secret12.

  1. Make the following modifications to saeIDPApp.jsp and save the file.

    saeIDPApp.jsp is found in the OpenSSO-Deploy-Base/samples/saml2/sae directory.

    • Change the value of saeServiceURL to https://lb2.idp-example.com:1081/opensso/idpsaehandler/metaAlias/idp.

    • Change the value of secret to secret12.


      Note –

      In a real deployment the application would store this shared secret in an encrypted file.


    • Change the value of spapp to https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp.

  2. Log in to the OpenSSO Enterprise console at https://lb2.idp-example.com:1081/opensso as the administrator.

    User Name:

    amadmin

    Password:

    ossoadmin

  3. Access https://lb2.idp-example.com:1081/opensso/encode.jsp in a different browser window.

    This JSP encodes the shared secret.

  4. Enter secret12 in the test field and click Encode.

    A string representing the identity provider's encoded password is displayed.

  5. Save the string for later use and close the browser window.

    In this case, AQICrLO+CuXkZFna8uAS0/GiUUtwyQltVdw2.

  6. From the OpenSSO Enterprise console, click the Federation tab.

  7. Under Entity Providers, click https://lb2.idp-example.com:1081/opensso, the hosted identity provider.

  8. Click the Advanced tab.

  9. Under SAE Configuration, type the following in the New Value text box of the Per Application Security Configuration property and click Add.

    url=https://sae.idp-example.com:8181/opensso/saml2/sae/
    saeIDPApp.jsp|type=symmetric|secret=AQICrLO+CuXkZFna8uAS0/GiUUtwyQltVdw2
  10. Click Save to save the profile.

  11. Click the Assertion Processing tab.

  12. Click the Attribute Mapper link.

  13. Under the Attribute Map property, type the following New Values and click Add.

    • mail=mail

    • branch=branch

    These attributes will be sent as part of the SAML v2 assertion.

  14. Click Save to save the profile.

  15. Click Back to return to the Federation tab.

  16. Under Entity Providers, click https://lb4.sp-example.com:1081/opensso, the remote service provider.

  17. Click the Advanced tab.

  18. Under SAE Configuration, enter https://lb4.sp-example.com:1081/opensso/spsaehandler/metaAlias/sp in the SP URL field.

  19. Under SAE Configuration again, enter https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp in the SP Logout URL field.

  20. Click Save to save the profile.

  21. Click Back to return to the Federation tab.

  22. Click the Access Control tab.

  23. Under the Access Control tab, click / (Top Level Realm).

  24. Click the Authentication tab.

  25. Under General, click Advanced Properties.

    The Core profile page is displayed.

  26. Under User Profile, select the Ignored radio button and click Save.


    Note –

    This modification is specific to this deployment example only.


  27. Click Save to save the profile.

  28. Click Back to Authentication.

  29. Log out of the OpenSSO Enterprise console.

ProcedureTo Establish Trust Between OpenSSO Enterprise and the Application on the Service Provider Side

Set up a trust relationship between OpenSSO Enterprise on the service provider side and saeSPApp.jsp, the service provider application.

Before You Begin

Choose a shared secret for use between the service provider application and the instance of OpenSSO Enterprise on the service provider side; in this procedure, secret12.

  1. Log in to the OpenSSO Enterprise console at https://lb4.sp-example.com:1081/opensso as the administrator.

    User Name:

    amadmin

    Password:

    ossoadmin

  2. Access https://lb4.sp-example.com:1081/opensso/encode.jsp in a different browser window.

    This JSP encodes the shared secret.

  3. Enter secret12 and click Encode.

    A string representing the identity provider's encoded password is displayed.

  4. Save the string for later use and close the browser window.

    In this case, AQICIbz4afzilWzbmo6QD9lQ9U4kEBrMlvZy.

  5. From the OpenSSO Enterprise console, click the Federation tab.

  6. Under Entity Providers, click https://lb4.sp-example.com:1081/opensso, the hosted service provider.

  7. Click the Assertion Processing tab.

  8. Under Attribute Mapper, add the following new values to the Attribute Map property.

    • mail=mail

    • branch=branch

  9. Under Auto-Federation, check the Enabled box.

  10. Also under Auto-Federation, enter mail in the Attribute field.

    The value of the Attribute property is the attribute previously mapped between the identity provider and the service provider allowing Auto-Federation to work.

  11. Click Save.

  12. Click the Advanced tab.

  13. Under SAE Configuration, type https://lb4.sp-example.com:1081/opensso/spsaehandler/metaAlias/sp as the value for the SP URL.

  14. Type https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp as the value for the SP Logout URL.

  15. Type the following in the New Value field of the Per Application Security Configuration property and click Add.

    url=https://sae.sp-example.com:8181/opensso/saml2/sae/
    saeSPApp.jsp|type=symmetric|secret=AQICIbz4afzilWzbmo6QD9lQ9U4kEBrMlvZy
  16. Click Save to save the profile.

  17. Click Back to return to the Federation tab.

  18. Click the Access Control tab.

  19. Under the Access Control tab, click / (Top Level Realm).

  20. Click the Authentication tab.

  21. Under General, click Advanced Properties.

    The Core profile page is displayed.

  22. Under User Profile, select the Ignored radio button and click Save.


    Note –

    This modification is specific to this deployment example only.


  23. Click Save to save the profile.

  24. Click Back to Authentication.

  25. Log out of the OpenSSO Enterprise console.

13.5 Testing the Secure Attribute Exchange

In this test, saeIDPApp.jsp securely sends user authentication credentials to OpenSSO Enterprise on the identity provider side. The identity provider then uses basic SAML v2 to communicate these attributes to OpenSSO Enterprise on the service provider side. Finally, the service provider securely passes these same attributes to saeSPApp.jsp, the consumer.


Note –

This test for Secure Attribute Exchange does not use the test users created in building the SP and IDP Environment. The values of Userid on local IDP, Authenticated auth level, mail attribute, and branch attribute are hard-coded in saeIDPApp.jsp as the default values for the test. Because we have not created the hard-coded test user on the service provider side, we previously set the User Profile to ignore on the service provider side.


ProcedureTo Test the Secure Attribute Exchange Configurations

  1. Access https://sae.idp-example.com:8181/opensso/saml2/sae/saeIDPApp.jsp from a web browser.

    The Secure Attributes Exchange IDP APP SAMPLE page is displayed.

  2. Type the following values in the appropriate text field.

    Userid on local IDP

    testuser

    Authenticated auth level

    0

    mail attribute

    testuser@foo.com

    branch attribute

    mainbranch

    SP App URL

    https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp

    SAE URL on IDP end

    https://lb2.idp-example.com:1081/opensso/idpsaehandler/metaAlias/idp

    This application's identity (should match Secret below)

    https://sae.idp-example.com:8181/opensso/saml2/sae/saeIDPApp.jsp

    Crypto Type (symmetric | asymmetric)

    Select symmetric from the drop down menu.

    Shared Secret / Private Key alias

    secret12

    Key store path (asymmetric only)

    No value

    Key store password (asymmetric only)

    No value

    Private Key password (asymmetric only)

    No value

  3. Click Generate URL

    The Secure Attributes Exchange IDP APP SAMPLE is generated and the following links are displayed.


    Click here to invoke the remote SP App via 
    http GET to local IDP : https://sae.sp-example.com:8181/
    opensso/samples/saml2/sae/saeSPApp.jsp : ssourl  
    
    Click here to invoke the remote SP App via 
    http POST to IDP : https://sae.sp-example.com:8181/
    opensso/samples/saml2/sae/saeSPApp.jsp : POST
    
    This URL will invoke global Logout : slourl

    ssourl, POST, and slourl are clickable.

  4. Click ssourl.

    The SAE SP APP SAMPLE page is displayed proving that Secure Attribute Exchange single sign-on has succeeded.


    SAE SP APP SAMPLE
    
    
    Secure Attrs :
    sun.authlevel    0
    sun.spentityid    https://lb4.sp-example.com:1081/opensso
    branch    mainbranch
    sun.idpentityid    https://lb2.idp-example.com:1081/opensso
    mail    testuser@foo.com
  5. Enter https://lb2.idp-example.com:1081/opensso/samples/saml2/sae/saeIDPApp.jsp in the browser to regenerate the Secure Attributes Exchange IDP APP SAMPLE page.

    The Secure Attributes Exchange IDP APP SAMPLE is regenerated and the following links are displayed.


    Click here to invoke the remote SP App via 
    http GET to local IDP : https://sae.sp-example.com:8181/
    opensso/samples/saml2/sae/saeSPApp.jsp : ssourl  
    
    Click here to invoke the remote SP App via 
    http POST to IDP : https://sae.sp-example.com:8181/
    opensso/samples/saml2/sae/saeSPApp.jsp : POST
    
    This URL will invoke global Logout : slourl

    ssourl, POST, and slourl are clickable.

  6. Click slourl.

    The Secure Attributes Exchange IDP APP SAMPLE is displayed.

  7. Type the following values in the appropriate text field.

    Userid on local IDP

    testuser

    Authenticated auth level

    0

    mail attribute

    testuser@foo.com

    branch attribute

    mainbranch

    SP App URL

    https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp

    SAE URL on IDP end

    https://lb2.idp-example.com:1081/opensso/idpsaehandler/metaAlias/idp

    This application's identity (should match Secret below)

    https://sae.idp-example.com:8181/opensso/saml2/sae/saeIDPApp.jsp

    Crypto Type (symmetric | asymmetric)

    symmetric

    Shared Secret / Private Key alias

    secret12

    Key store path (asymmetric only)

    No value

    Key store password (asymmetric only)

    No value

    Private Key password (asymmetric only)

    No value

  8. Click Generate URL.

    The Secure Attributes Exchange IDP APP SAMPLE page is displayed.


    Secure Attributes Exchange IDP APP SAMPLE
    
    Setting up the following params:
    branch=mainbranch
    mail=testuser@foo.com
    sun.userid=testuser
    sun.authlevel=0
    sun.spappurl=https://sae.sp-example.com:8181/opensso/
      saml2/sae/saeSPApp.jsp
    sun.idpappurl=https://sae.idp-example.com:8181/opensso/
      saml2/sae/saeIDPApp.jsp
    
    
    Click here to invoke the remote SP App via http GET to local IDP : 
      https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp : ssourl
    
    Click here to invoke the remote SP App via http POST to IDP : 
      https://sae.sp-example.com:8181/opensso/saml2/sae/saeSPApp.jsp
    
    This URL will invoke global Logout : slourl
  9. Click slourl.

    The SAE SP APP SAMPLE page is displayed proving successful logout.


    SAE SP APP SAMPLE
    
    
    Secure Attrs :
    sun.cmd    logout
    sun.returnurl    https://lb4.sp-example.com:1081/opensso/SPSloRedirect/
    metaAlias/sp?SAMLRequest=nZNva9swEMa%2FitHbkliS438iMQTCWErXpvUWxt5
    d7HMqsCVPJ0P27WcnLaSDdlDQq5Oe%2Bz33cFoSdG2v7uzRDv4Jfw9IPghOXWtIna9
    WbHBGWSBNykCHpHylyvW3OyXnXPXOelvZlgXbzYqRrKPDouKQQpOmnIsMRSMhgSgRIuU
    gU55jLEQlWbBHR9qaFRvbjGqiAbeGPBg%2FljjPZjyfyfy7jFSUjOcXCzajNW3An1XP3
    vekwrA9zJI5aWdxXtlOCZ6J0PZoiGxY7srWPmGtHVY%2B7NDDutVAIfUsuLf%2BwTy4d
    ePR%2FQtcXIDFcgpAna25q0g%2BTgSI0E0eWXHlUc7xBF3fXrlsoFuGV4QX3P3Ycbv5B
    C6YlI8DtLrR00z%2FpbOg3L2veS9VFnyxrgP%2Fsa2poutZc36qvANDGo1nhfwqbv78u
    O334tGI26MRxzAWu%2F3NDp5%2FvsRxSeASR69KpGlPtqbG0yf2siC5iMe9SzMeJynK
    KhVCZsAhr6s6y2OIDg1WUSq4uODfEovX4psPUvwF&RelayState=s212b785d4bda31
    faa635552f1233bbbb3a2c5badb&sun.appreturn=true
    
    Logout URL
  10. Click Logout URL on the page displayed in the previous step.

    At the bottom of the displayed page, you will see This proves SLO success.

Troubleshooting

If there are issues running this test, see the OpenSSO Enterprise debug files located in the /export/ossoadm/config/opensso/debug/Federation directory on both the identity provider and the service provider sides.