WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

Package examples.security.net

The weblogic.security.net package provides a way to restrict client connections to WebLogic Server based on the client's origin and protocol.

See:
          Description

Class Summary
FastFilterEntry Fast filter rule.
FilterEntry Abstract filter rule.
SimpleConnectionFilter Simple rules-based connection filter example.
SlowFilterEntry Slow filter rule.
 

Package examples.security.net Description

The weblogic.security.net package provides a way to restrict client connections to WebLogic Server based on the client's origin and protocol. The net code example provides an implementation of the ConnectionFilter interface. The SimpleConnectionFilter class calls the accept() method after gathering information about the client connection including the remote IP address, port number, and the connection protocol (HTTP, HTTPS, T3, T3S, or IIOP). This information is passed to the ConnectionFilter.accept() method in a ConnectionEvent. Based on the information, the ConnectionFilter.accept() method either allows or denies the client connection. If the client connection is denied, a FilterException is thrown.

Perform the following steps in order to build and run the 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 net example by executing the following command or by executing the build script provided in the samples/examples/security/net directory.
       javac -d %SERVER_CLASSES% *.java

  3. Edit the filter file in the samples/examples/security/net directory to set up the filters for the net example. For more information about the filter file format, see examples.security.net.SimpleConnectionFilter.

  4. Copy the filter file to the config/examples/serverclasses/examples/security/net directory.

Configure the Server

  1. Bring up the Administration Console in a browser.

  2. Install SimpleConnectionFilter.
    1. Select the Security node in the left pane.
    2. Enter examples.security.net.SimpleConnectionFilter in the Connection Filter field.
    3. Click Apply.

Run the Example

Restart the server.

Check the WebLogic Server log file located at config/examples/logs/weblogic.log for messages about denied connections.

There's More...

Read more about connection filters 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.