OpenSSO Enterprise provides a command-line logging sample to show log writing from a client using the OpenSSO client SDK. This sample (and other samples) are in the opensso-client.zip file, which is part of the opensso_enterprise_80.zip file.
After you unzip opensso-client.zip, the command-line logging sample is:
Solaris and Linux systems: opensso-client-zip-root/sdk/scripts/CommandLineLogging.sh
Windows systems: opensso-client-zip-root\sdk\scripts\CommandLineLogging.bat
opensso-client-zip-root is where you unzipped the opensso-client.zip file.
The command-line logging sample runs in a stand alone JVM and does not require a web container.
To run the command-line logging sample, OpenSSO Enterprise server must be running and accessible from the client server. You will also need to know this information:
Protocol (http or https) used by the OpenSSO Enterprise server web container instance.
Fully qualified domain name (FQDN) of the OpenSSO Enterprise server host.
Port for the OpenSSO Enterprise server.
Deployment URI for the OpenSSO Enterprise server (default is opensso).
Default agent user (UrlAccessAgent) password that you entered when you ran the OpenSSO Enterprise Configurator.
OpenSSO Enterprise server amadminpassword, if amadmin is the logging requestor in the sample.
If necessary, unzip opensso_enterprise_80.zip and then unzip zip-root/opensso/samples/opensso-client.zip.
Make sure that your JAVA_HOME environment variable points to a JDK 1.5 or 1.4 installation.
Change to the opensso-client-zip-root/sdk directory.
Note: You can invoke the sample scripts only from the /sdk parent directory and not directly from the /scripts directory.
Follow the instructions in the README file to configure the AMConfig.properties file and to setup and compile the sample applications.
Note: You need to setup and compile the sample command-line applications only once. If the sample applications are already compiled, continue with the next step.
Run the sample command-line logging sample script from the /sdk directory. For example:
Solaris and Linux systems: scripts/CommandLineLogging.sh
The logging sample program prompts you for the subject user's identifier and password, log file to use, message to log, logging user's identifier and password, and the realm (both users must be in the same realm).
Either accept the default values for the prompts or specify your preferred values. For example:
Subject Userid [user1]: accepted default Subject Userid user1 password [user1password]: user1-password Log file [TestLog]: accepted default Log message [Test Log Record]: accepted default LoggedBy Userid [amadmin]: accepted default LoggedBy Userid's password [amadminpswd]: amadmin-password Realm [/]: accepted default ==>Authentication SUCCESSFUL for user user1 ==>Authentication SUCCESSFUL for user amadmin LogSample: Logging Successful !!!
Check the TestLog created in the OpenSSO Enterprise server log directory.
The default log directory is ConfigurationDirectory/depoly-uri/log.
For example: /opensso/opensso/log