|
WebLogic Server 6.0 Code Examples, BEA Systems, Inc. |
See:
Description
Interface Summary | |
Frobable | A remote interface that illustrates access control on an RMI object. |
Class Summary | |
FrobImpl | Illustrates how to use an ACL to protect the methods of an RMI object's. |
MyCallbackHandler | Implementation of the CallbackHandler Interface |
SampleAction | |
SampleClient | Sample client for JAAS user authentication |
SampleConfig | Sample configuration class for JAAS user authentication. |
SampleLoginModule | Sample login module that performs password authentication. |
This package demonstrates how to access a WebLogic Server resource (in this case, an RMI object) through the use of JAAS authentication. JAAS authentication replaces a JNDI Environment object as the way to pass authentication data from a client to WebLogic Server. The user is prompted for a username and password which is then passed through the JAAS authenticated interface. If authentication is successful the client will attempt to execute the RMI object method using the JAAS authorization doAs interface.
The JAAS code example includes the SampleClient.java class which connects to WebLogic Server using a username and password defined for joeuser User in the Administration Console. Perform the following steps in order to build, compile and run the example:
javac -d %SERVER_CLASSES% Frobable.java FrobImpl.java
java weblogic.rmic -d %SERVER_CLASSES% examples.security.acl.FrobImpl
javac -d %CLIENT_CLASSES% SampleAction.java
javac -d %CLIENT_CLASSES% SampleClient.java
javac -d %CLIENT_CLASSES% SampleConfig.java
javac -d %CLIENT_CLASSES% SampleLoginModule.java
java examples.security.jaas.SampleClient url
url specifies the T3 or HTTP protocol and the default port on which WebLogic Server listens for communications.
For example:
java examples.security.jaas.SampleClient t3://localhost:7001
Read more using the JAAS SPI to authenticate clients in Programming WebLogic Security .
|
Documentation is available at http://e-docs.bea.com/wls/docs60 |