Download the Sun Java System Web Server bits to the pr-1 host machine and install it. Additionally, download, install and configure the appropriate web policy agent. Use the following list of procedures as a checklist for completing the task.
To Install and Configure Sun Java System Web Server as Web Container 1 on Protected Resource 1
To Import the Certificate Authority Root Certificate into Web Server 1
To Install and Configure Web Policy Agent 1 on Protected Resource 1
To Configure Policy for Web Policy Agent 1 on Protected Resource 1
Sun Java System Web Server is the web container used on the pr-1 host machine.
Read the latest version of the Web Server 7.0 Release Notes to determine if you need to install patches on your host machine. In this case, the Release Notes indicate that based on the hardware and operating system being used, patch 119963–08, patch 120011–14, and patch 117461–08 are required.
As a root user, log into the pr-1 host machine.
Install the required patches if necessary.
Patch results for your machines might be different.
Run patchadd to see if the patch is installed.
# patchadd -p | grep 117461–08 |
A list of patch numbers is displayed. On our lab machine, the required patch 117461–08 is present so there is no need to install it.
# patchadd -p | grep 119963–08 |
No results are returned which indicates that the patch is not yet installed on the system.
# patchadd -p | grep 120011-14 |
No results are returned which indicates that the patch is not yet installed on the system.
Make a directory for downloading the patch you need and change into it.
# mkdir /export/patches # cd /export/patches |
Download the patches.
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.
Signed patches are downloaded as JAR files. Unsigned patches are downloaded as ZIP files.
Unzip the patch file.
# unzip 119963–08.zip # unzip 120011–14.zip |
Run patchadd to install the patches.
# patchadd /export/patches/119963–08 # patchadd /export/patches/120011–14 |
After installation is complete, run patchadd to verify that the patch was added successfully.
# patchadd -p | grep 119963–08 |
In this example, a series of patch numbers are displayed, and the patch 119963–08 is present.
# patchadd -p | grep 120011-14 |
In this example, a series of patch numbers are displayed, and the patch 120011–14 is present.
Create a directory into which you can download the Web Server bits and change into it.
# mkdir /export/WS7 # cd /export/WS7 |
Download the Sun Java System Web Server 7.0 Update 3 software from http://www.sun.com/download/products.xml?id=45ad781d.
Follow the instructions on the Sun Microsystems Product Downloads web site for downloading the software.
Unpack the Web Server package.
# gunzip sjsws-7_0u3-solaris-sparc.tar.gz # tar xvf sjsws-7_0u3-solaris-sparc.tar |
Run setup.
# cd /export/WS7 # ./setup --console |
When prompted, provide the following information.
|
Press Enter. Continue to press Enter when prompted. |
|
|
Enter yes. |
|
|
Enter /opt/SUNWwbsvr |
|
|
Enter yes. |
|
|
Enter 2. |
|
|
Enter 1,3,5. |
|
|
Enter 1. |
|
|
Enter 1. |
|
|
Accept the default value. |
|
|
Accept the default value. |
|
|
Accept the default value. |
|
|
Enter no. |
|
|
Accept the default value (for the administration server). |
|
|
Accept the default value. |
|
|
Enter web4dmin. |
|
|
Enter web4dmin. |
|
|
Accept the default value. |
|
|
Enter 1080. |
|
|
Enter root (for the instance). |
|
|
Accept the default value. |
|
|
Enter no. |
|
|
Enter1. |
When installation is complete, the following message is displayed:
Installation Successful. |
Start the Web Server administration server.
# cd /opt/SUNWwbsvr/admin-server/bin # ./startserv |
Run netstat to verify that the port is open and listening.
# netstat -an | grep 8989 *.8989 *.* 0 0 49152 0 LISTEN |
(Optional) Login to the Web Server administration console at https://pr-1.example.com:8989 as the administrator.
admin
web4dmin
You should see the Web Server administration console.
(Optional) Log out of the Web Server console and close the browser.
Start the Protected Resource 1 Web Server instance.
# cd /opt/SUNWwbsvr/https-pr-1.example.com/bin # ./startserv Sun Java System Web Server 7.0U3 B06/16/2008 12:00 info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_15] from [Sun Microsystems Inc.] info: HTTP3072: http-listener-1: http://pr-1.example.com:1080 ready to accept requests info: CORE3274: successful server startup |
Run netstat to verify that the port is open and listening.
# netstat -an | grep 1080 *.1080 *.* 0 0 49152 0 LISTEN |
(Optional) Access the Protected Resource 1 instance at http://pr-1.example.com:1080 using a web browser.
You should see the default Web Server index page.
Log out of the pr–1 host machine.
The Certificate Authority (CA) root certificate enables the web policy agent to trust the certificate from the OpenSSO Enterprise Load Balancer 2, and to trust the certificate chain that is formed from the CA to the server certificate.
Copy the same CA root certificate used in To Install a CA Root Certificate to the OpenSSO Enterprise Load Balancer to the pr-1 host machine. In this example, the file is /export/software/ca.cer.
Backup cacerts before modifying it.
As a root user, log into the pr-1 host machine.
Import the CA root certificate into cacerts, the certificate store.
# /opt/SUNWwbsvr/jdk/jre/bin/keytool -import -trustcacerts -alias OpenSSLTestCA -file /export/software/ca.cer -keystore /opt/SUNWwbsvr/jdk/jre/lib/security/cacerts -storepass changeit Owner: EMAILADDRESS=nobody@nowhere.com, CN=OpenSSLTestCA, OU=Sun, O=Sun,L=Santa Clara, ST=California C=US Issuer: EMAILADDRESS=nobody@nowhere.com, CN=OpenSSLTestCA, OU=Sun, O=Sun,L=Santa Clara, ST=California C=US Serial number: f59cd13935f5f498 Valid from: Thu Sep 20 11:14:51 PDT 2008 18 07:66:19 PDT 2006 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. |
Verify that the CA root certificate was imported.
# /opt/SUNWwbsvr/jdk/jre/bin/keytool -list -keystore /opt/SUNWwbsvr/jdk/jre/lib/security/cacerts -storepass changeit | grep -i open openSSLTestCA, Sep 20, 2008, trustedCertEntry, |
Log out of the pr-1 host machine.
The JAVA_HOME environment variable should be set to /opt/SUNWwbsvr/jdk/jre.
As a root user, log into the pr–1 host machine.
Create a directory into which you can download the Web Server agent bits and change into it.
# mkdir /export/WebPA1 # cd /export/WebPA1 |
Create a text file that contains the Agent Profile password.
The Web Policy Agent installer requires this for installation.
# cat > agent.pwd webagent1 Hit Control D to terminate the command ^D |
Create a text file that contains the Agent Administrator password.
This text file should contain the OpenSSO Enterprise administrator (by default, amadmin) password. The Web policy agent installer requires this to create the agent profile on the server.
# cat > agentadm.pwd ossoadmin Hit Control D to terminate the command ^D |
Download the web policy agent for Web Server from http://www.sun.com/download/.
# ls -al total 7512 drwxr-xr-x 2 root root 512 Jul 24 14:48 . drwxr-xr-x 11 root root 512 Jul 24 14:41 .. -rw-r--r-- 1 root root 10 Jul 24 14:42 agent.pwd -rw-r--r-- 1 root root 9 Jul 24 14:42 agentadm.pwd -rw-r--r-- 1 root root 3826794 Jul 24 14:48 sjsws_v70_SunOS_sparc_agent_3.zip |
Unzip the downloaded file.
# unzip sjsws_v70_SunOS_sparc_agent_3.zip |
Run the agent installer.
# cd /export/WebPA1/web_agents/sjsws_agent/bin # ./agentadmin --custom-install |
When prompted, do the following.
|
Press Enter and continue to press Enter until you have reached the end of the License Agreement. |
|
|
Type yes and press Enter. |
|
|
Type /opt/SUNWwbsvr/https-pr-1.example.com/config and press Enter. |
|
|
Type https://lb-2.example.com:1081/opensso and press Enter. |
|
|
Type http://pr-1.example.com:1080 and press Enter. |
|
|
Accept the default value. |
|
|
Type webagent-1 and press Enter. |
|
|
Type /export/WebPA1/agent.pwd and press Enter. Note – A warning message is displayed regarding the existence of the agent profile. |
|
|
Press Enter to accept the default and have the installer create the Agent Profile. |
|
|
Type amadmin and press Enter. |
|
|
Type /export/WebPA1/agentadm.pwd and press Enter. |
|
|
Type 1 and press Enter. |
Restart the Web Server 1 instance.
# cd /opt/SUNWwbsvr/https-pr-1.example.com/bin # ./stopserv; ./startserv server has been shutdown Sun Java System Web Server 7.0U3 B06/16/2008 12:00 info: CORE3016: daemon is running as super-user info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_15] from [Sun Microsystems Inc.] info: HTTP3072: http-listener-1: http://pr-1.example.com:1080 ready to accept requests info: CORE3274: successful server startup |
Use the following sub-procedure to verify that the Web Policy Agent 1 was successfully created.
Access https://osso-1.example.com:1081/opensso/console from a web browser.
Log in to the OpenSSO Enterprise console as the administrator.
amadmin
ossoadmin
Under the Access Control tab, click / (Top Level Realm).
Click the Agents tab.
By default, the Web tab is displayed. You should see webagent-1 under the Agent table.
Click webagent-1.
The webagent-1 properties page is displayed.
Log out of the console and close the browser.
Remove the password files.
# cd /export/WebPA1 # rm agent.pwd # rm agentadm.pwd |
Log out of the pr-2 host machine.
Use the OpenSSO Enterprise console to configure policy for Web Policy Agent 1 that will be used to verify that the agent is working properly.
You will add additional policies later when we add a load balancer in front of the Protected Resource 1 host machine.
Access https://osso-1.example.com:1081/opensso/console from a web browser.
Log in to the OpenSSO Enterprise console as the administrator.
amadmin
ossoadmin
Under the Access Control tab, click / (Top Level Realm).
Click the Policies tab.
Click New Policy.
Enter URL Policy for Protected Resource 1 in the Name field.
Under Rules, click New.
The Rules properties page is displayed.
Select URL Policy Agent (with resource name) and click Next.
Provide the following information on the resulting page and click Finish.
URL Rule for Protected Resource 1
http://pr-1.example.com:1080/*
Mark this check box and verify that Allow is selected.
Mark this check box and verify that Allow is selected.
The rule URL Rule for Protected Resource 1 is added to the list of Rules.
Under Subjects, click New.
The Subjects properties page is displayed.
Select Access Manager Identity Subject and click Next.
On the resulting page, provide the following information and click Search.
Test Subject
Choose User and click Search to display a list of available users.
From the available users, select testuser1 and click Add.
Click Finish.
Click OK.
The new policy is included in the list of Policies.
Click Back to Access Control.
Log out of the console.
Access http://pr-1.example.com:1080/index.html from a web browser.
Log in to OpenSSO Enterprise as testuser1.
testuser1
password
You should see the default index page for Web Server 1 as testuser1 was configured in the test policy to be allowed to access Protected Resource 1.
Log out and close the browser.
Once again, access http://pr-1.example.com:1080/index.html from a web browser.
If you are not redirected to the OpenSSO Enterprise login page for authentication, clear your browser's cache and cookies and try again.
Log in to OpenSSO Enterprise as testuser2.
testuser2
password
You should see the message, You're not authorized to view this page, (or Your client is not allowed to access the requested object) as testuser2 was not included in the test policy that allows access to Protected Resource 1.