Sun OpenSSO Enterprise 8.0 Developer's Guide

Running the Command-Line Logging Sample (

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 file, which is part of the file.

After you unzip, the command-line logging sample is:

opensso-client-zip-root is where you unzipped the 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:

ProcedureTo Run the Command-Line Logging Sample

  1. If necessary, unzip and then unzip zip-root/opensso/samples/

  2. Make sure that your JAVA_HOME environment variable points to a JDK 1.5 or 1.4 installation.

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

  4. Follow the instructions in the README file to configure the 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.

  5. Run the sample command-line logging sample script from the /sdk directory. For example:

    • Solaris and Linux systems: scripts/

    • Windows: scripts\CommandLineLogging.bat

  6. 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 !!! 
  7. 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