Deploy and Configure OpenSSO on Glassfish from Command Line
Create a Glassfish domain “opensso “which runs on port 18080 and 18443 (SSL). Admin port running on 14848.
Assume that the Glassfish is installed under /opt/glassfish
|
$ cd /opt/glassfish/bin $ ./asadmin create-domain --adminport 14848 --instanceport 18080 --savemasterpassword=true --user admin --savelogin=true --domainproperties http.ssl.port=18443 opensso |
Configure the server policy on Glassfish for OpenSSO
As per the installation procedure of OpenSSO for Glassfish it is required to update the server.policy. I have created a file opensso_policy.txt with required contents.
|
$ cp /opt/glassfish/domains/opensso/config $ cat opensso_policy.txt >> server.policy |
Configure the JVM requirements for OpenSSO
Note: Here I have used GNU sed which allows in place replacement (-i switch). If you are not using GNU sed then you might need to make a copy of the file with change.
|
$ sed -i "s/<jvm-options>-client<\/jvm-options>/<jvm-options>-server<\/jvm-options>/" domain.xml $ sed -i "s/<jvm-options>-Xmx512m<\/jvm-options>/<jvm-options>-Xmx1024m<\/jvm-options>/" domain.xml |
Start OpenSSO
|
$ cd /opt/glassfish/bin $ ./asadmin start-domain opensso |
Deploy OpenSSO war file
Assuming the opensso.war is available under /opt/opensso/deployable-war
|
$./asadmin deploy --port 14848 --user admin /opt/opensso/deployable-war/opensso.war Command deploy executed successfully. |
Run the OpenSSO configurator
I have written a Java code ( download postOpenSSO.class) that performs a http POST to OpenSSO's configurator.jsp. It reads a configuration input file ( openssodeploy.,config) from the same directory from where it is invoked.
Assume that you have downloaded postConfig.class and openssodeploy.config into /opt/openssodeploy directory. If openssodeploy.config is the default, if not, you can pass the file name to postOpenSSO class.
|
$ cd /opt/openssodeploy $ java postOpenSSO |
Hi
Does the postOpenSSO works also for SSL DS connection (config-/user-store) ?
What need to be change in the property file ?
Posted by Mario Nolte on October 15, 2009 at 09:17 AM PDT #