WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

Package examples.security.audit

The weblogic.security.audit package provides a way for you to audit security events that occur in your WebLogic Server environment.

See:
          Description

Class Summary
LogAuditProvider Simple implementation of the audit SPI.
 

Package examples.security.audit Description

The weblogic.security.audit package provides a way for you to audit security events that occur in your WebLogic Server environment. The audit example provides an implementation of the AuditProvider interface. The implementation, LogAuditProvider, writes all security events it receives to the WebLogic Server log file. It also defines filter methods for each security event type which it calls to decide whether to log a particular event. In the audit code example all security events are logged. If you extend the audit code example, you can override the filter methods that that select the events you want to log.

Perform the following steps in order to build and run the audit code example:

  1. Build the example
  2. Configure the server
  3. Run the example

Build the Example

  1. Set up your development shell as described in Setting up your environment.

  2. Compile the example by executing the following command or by executing the build script in the samples/examples/security/audit directory.

     javac -d %SERVER_CLASSES% LogAuditProvider.java

Configure the Server

  1. Bring up the Administration Console in a browser.

  2. Install LogAuditProvider.
    1. Click to expand the Security node in the left pane.
    2. Select the Audit Provider node in the left pane.
    3. Click the Create a New Audit Provider link and create a new Audit Provider with the name LogAuditProvider and Provider Class Name examples.security.audit.LogAuditProvider.

  3. Click the Security node in the left pane.

  4. Click the Auditing tab and activate LogAuditProvider by moving the class into the Chosen list box on the Configuration window.

Run the Example

Restart WebLogic Server

You can identify the messages LogAuditProvider writes in the WebLogic Server by searching for the string Audit.

There's More...

Read more about audit providers and security in Programming WebLogic Security and Managing Security.


Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.