All Examples  All Security Examples

package examples.security.acl

Interface Index

  • Frobable
  • Class Index

    about this package

    This package demonstrates how to restrict access to a WebLogic object -- in this case, an RMI object -- with an access control list (ACL). The user-defined ACL is added to the default WebLogic realm, and the RMI object checks the list for authorization before allowing a user to execute it.

    how to use this package

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

    2. Edit the weblogic.properties file and make the following changes:

    3. Compile the Frobable interface in this directory with a command like this:
        $ javac -d  %SERVER_CLASSES% Frobable.java

    4. Compile the FrobImpl class in this directory with a command like this:
        $ javac -d  %SERVER_CLASSES% FrobImpl.java

    5. Compile the Client.java class in this directory with a command like this:
        $ javac -d %CLIENT_CLASSES% Client.java

    6. Run the WebLogic RMI compiler to generate a stub and skeleton for the FrobImpl interface with a command like this:
       $ java weblogic.rmic -d %SERVER_CLASSES% examples.security.acl.FrobImpl

      Note for Microsoft SDK for Java users
      If you're running Microsoft SDK for Java, you must specify JVC as the Java compiler on the weblogic.rmic command line. Use this command to execute the WebLogic RMI compiler under JView:
        $ jview weblogic.rmic -d %SERVER_CLASSES% -compiler jvc examples.security.acl.FrobImpl

    7. Start WebLogic Server in your server shell.

    8. Run the client with a command like:
       $ java examples.security.acl.Client URL USER PASSWORD

      For example,

       $ java examples.security.acl.Client t3://localhost:7001 joeuser joespass

    there's more . . .

    For more information on ACLs and security, read the Developers Guides, Using WebLogic SSL and Using WebLogic ACLs.