By Sidharth Mishra, with contributions from Marina Sum, September 26, 2008
OpenSSO, Sun's open-source project for access management and federation, is a self-contained Java EE application that offers federation, access management, and Web-service security capabilities. Installing and configuring OpenSSO is simple and efficient, with no external dependencies.
OpenSSO contains a product configurator that simplifies common deployments. For example, you can perform the following tasks in the configurator:
GlassFish application server is built by the open-source community on the Java EE 5 platform and is ideal for developing and deploying enterprise applications. The latest production release, GlassFish v2 Update Release 2 (UR2), offers high performance along with many capabilities: clustering, in-memory replication, enhanced administration, self-management.
This article walks you through the procedure for a basic deployment of OpenSSO on GlassFish application server.
First, download OpenSSO:
# mkdir /opensso_bits
# cd /opensso_bits
# unzip opensso.zip
You must install and run GlassFish Server v2 UR2 on the host server. To deploy OpenSSO on an existing GlassFish domain, you must have the administrator password for that domain.
For details on how to install GlassFish application server.
Predeployment Steps
As a predeployment task, configure the GlassFish domain on which you will deploy OpenSSO.
Note: Even though some of the command lines in the following sections wrap to the next line because of page-width constraints, type them all on one line.
bin
directory. Type: # cd
GlassFish-install-dir /bin
where GlassFish-install-dir is the directory in which you have installed GlassFish application server, for example, /Applications/NetBeans/glassfish-v2ur2
.
# ./asadmin start-domain
GlassFish-domain
where GlassFish-domain is the name of domain, for example, mydomain
.
domain.xml
file: -client
to -server
.
-Xmx512m
to -Xmx1024m
.Alternatively, make the same changes on the GlassFish command line, as follows. Input the administrator password when prompted.
# ./asadmin delete-jvm-options --port
GlassFish-admin-port --user admin "\\-client"
where GlassFish-admin-port is the administration port number for the GlassFish domain on which you will deploy OpenSSO, for example, 4848
.
# ./asadmin create-jvm-options --port
GlassFish-admin-port --user admin "\\-server"
# ./asadmin delete-jvm-options --port
GlassFish-admin-port --user admin "\\-Xmx512m"
# ./asadmin create-jvm-options --port
GlassFish-admin-port --user admin "\\-Xmx1G"
Note: If you have configured an administrative user other than admin
, change that parameter accordingly in the above command lines.
Restart the GlassFish domain for the changes to take effect. Type:
# cd
GlassFish-install-dir /bin
# ./asadmin stop-domain
GlassFish-domain
# ./asadmin start-domain
GlassFish-domain
Verify that the server or host on which you will deploy OpenSSO is reachable by means of a Fully Qualified Domain Name (FQDN) typed on the command line on the same host. For a stand-alone UNIX server or system, you can create an entry in the /etc/hosts
file that corresponds to the localhost
entry. For example, make the localhost
entry in that file read like this:
127.0.0.1 localhost sid.opensso.com www.idp.com www.sp.com www.wsc.com
Subsequently, sid.opensso.com
, www.idp.com
, www.sp.com
, and www.wsc.com
all become accessible dummy FQDNs.
To verify that the system is reachable, run the ping
command on one of the FQDNs. For example:
# ping sid.opensso.com
If access is successful, you will see a response from the system.
Option 1: Automatic Deployment
Automatic deployment, also called autodeployment, involves copying an application or module file (JAR [Java archive], WAR [Web archive], RAR [Roshal archive], or EAR [enterprise archive]) into a special directory, where the file is automatically deployed by GlassFish application server.
To automatically deploy OpenSSO on GlassFish application server, drop the OpenSSO WAR file at OpenSSO-staging-dir /opensso/deployable-war/opensso.war
into the GlassFish-install-dir /domains/
GlassFish-domain /autodeploy
directory. To undeploy, simply delete that file from the directory.
This option is particularly useful in a development environment because it enables fast testing of new code. For more details on autodeployment.
Option 2: Command-Line Deployment
The GlassFish command-line option asadmin deploy
deploys WAR files. The OpenSSO WAR file, opensso.war
, resides in the OpenSSO-staging-dir /opensso/deployable-war
directory.
On the Solaris or OpenSolaris Operating System, type the following:
# cd
GlassFish-install-dir /bin
# ./asadmin deploy --user admin --passwordfile /tmp/pwdfile --port
GlassFish-admin-port --context-root opensso --name opensso
OpenSSO-staging-dir /opensso/deployable-war/opensso.war
Note: You can set up a /tmp/pwdfile
file in which you specify the administrative user password in ASCII text, for example, AS_ADMIN_PASSWORD=password
.
Option 3: GUI Deployment
You can deploy OpenSSO from the GlassFish Administration Console. Follow these steps:
http://www.idp.com:7080
. admin
and adminadmin
, respectively. /opensso/deployable-war
. Select opensso.war
. opensso
. To verify that the deployment is successful, go to the deployed OpenSSO instance, for example, http://www.idp.com:7080/opensso
.
Finally, configure the OpenSSO settings:
Figure 1: Configuration Options
amAdmin
in the Password and Confirm text fields. See Figure 2. Click Next.
Figure 2: Setup for Default Administrative User Password
Figure 3: Server Settings
Figure 4: Configuration Store Settings
Figure 5: User Store Settings
Heed the note on the screen regarding embedded user repositories. Optionally, you can select Remote Directory on the screen and specify the pertinent details for a supported directory server.
Figure 6: Site Settings
amldapuser
) in the Password and Confirm text fields. This password must differ from the amAdmin
password in Step 1: General. See Figure 7. Click Next.
Figure 7: Setup for Default Agent Password
Figure 8: Summary of Configurations
The OpenSSO product configurator confirms that configuration is complete (Figure 9).
Figure 9: Confirmation of Configurations
amadmin
as the user name and the corresponding password) set up in step 2. If the deployment is successful, the OpenSSO Administration Console is displayed.OpenSSO and GlassFish application server are robust open-source software for Web development, complete with support plans from Sun. Do check them out!