WebLogic Server 6.1 Code Examples, BEA Systems, Inc.

Package examples.security.proxy

This example is a graphical interface that implements the weblogic.common.proxyAuthenticator interface.

See:
          Description

Class Summary
GUIProxyAuthenticator This example class provides a graphical implementation of the weblogic.net.ProxyAuthenticator interface.
 

Package examples.security.proxy Description

This example is a graphical interface that implements the weblogic.common.proxyAuthenticator interface. An implementation of this interface is required to allow an application to provide user authentication information when tunneling WebLogic HTTP and SSL protocols through a proxy server that requires user authentication.

The GUIProxyAuthenticator class prompts for the username and password for the proxy server and returns the values entered, or null if the cancel button is clicked.

Perform the following steps in order to build and run the examples:

  1. Build the example
  2. Run the example

To test the example, you need a running proxy server and a running WebLogic Server. For each of these servers you need the name of the computer, and the port the server is listening on. You can use the weblogic.Admin utility's Ping command as a test for your connections.

Build the Example

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

  2. Compile the example by executing an ant build script or a command.

Run the Example

  1. Test the HTTPS protocol tunnelled through the proxy server:
      java -Dhttps.proxyHost=proxyHost -Dhttps.proxyPort=proxyPort \
        -Dweblogic.net.proxyAuthenticatorClassName=\
        examples.security.proxy.GUIProxyAuthenticator \
        weblogic.Admin -url https://WebLogicHost:WebLogicSSLPort \
        -username username -password password  \
    	PING 10 10
    proxyHost
    The name of the computer running the proxy server.
    proxyPort
    The port number where the proxy server is running on the proxyHost.
    WebLogicHost
    The IP address of the computer running the WebLogic Server.
    WebLogicSSLPort
    The port number where the WebLogic Server listens for SSL connections.
    username password
    Your username and password for the examples server.

    For example:

      java -Dhttps.proxyHost=Blotto -Dhttps.proxyPort=101 \
        -Dweblogic.net.proxyAuthenticatorClassName=\
        examples.security.proxy.GUIProxyAuthenticator \
        weblogic.Admin -url https://206.189.198.30:7002\
    	-username system -password examplesPassword\
    	 PING 10 10

  2. Test the t3s protocol tunnelled through the proxy server:
     java -Dssl.proxyHost=proxyHost -Dssl.proxyPort=proxyPort \
        -Dweblogic.net.proxyAuthenticatorClassName=  \
        examples.security.proxy.GUIProxyAuthenticator \
        weblogic.Admin -url t3s://WebLogicHost:WebLogicSSLPort \
        -username username -password password  \
    	PING 10 10
    proxyHost
    The name of the computer running the proxy server.
    proxyPort
    The port number where the proxy server is running on the proxyHost.
    WebLogicHost
    The IP address of the computer running the WebLogic Server.
    WebLogicSSLPort
    The port number the WebLogic Server listens on for SSL connections.
    username password
    Your username and password for the examples server.

    For example:

     java -Dssl.proxyHost=Blotto -Dssl.proxyPort=101 \
        -Dweblogic.net.proxyAuthenticatorClassName=\
        examples.security.proxy.GUIProxyAuthenticator \
        weblogic.Admin -url t3s://206.189.198.30:7002 \
    	-username system -password examplesPassword \
    	 PING 10 10

  3. Test the HTTP protocol tunnelled through the proxy server:
     java -Dhttp.proxyHost=proxyHost -Dhttp.proxyPort=proxyPort \
        -Dweblogic.net.proxyAuthenticatorClassName=\
        examples.security.proxy.GUIProxyAuthenticator \
        weblogic.Admin -url http://WebLogicHost:WebLogicPort \
        -username username -password password \
    	PING 10 10
    proxyHost
    The name of the computer running the proxy server.
    proxyPort
    The port number where the proxy server is running on the proxyHost.
    WebLogicHost
    The IP address of the computer running the WebLogic Server.
    WebLogicPort
    The port number where the WebLogic Server is listening.
    username password
    Your username and password for the examples server.

    For example:

     java -Dhttp.proxyHost=Blotto -Dhttp.proxyPort=101 \
        -Dweblogic.net.proxyAuthenticatorClassName=\
        examples.security.proxy.GUIProxyAuthenticator \
        weblogic.Admin -url http://206.189.198.30:7001
        -username system -password examplesPassword
    	\ PING 10 10

There's More...

Read more about:


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

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