All Examples  All Security Examples

package examples.security.defaultrealm

Class Index

about this example

DefaultRealmExtender helps other realm implementations replace the WebLogic realm. It implements some WebLogic defaults:

Note that this realm does not create any ACLs based on the weblogic.properties file. Using this realm as a replacement for the WebLogic realm will result in ignoring "allow" clauses of servlets and JDBC connection pools.

If you use this class to convert a working realm based on the weblogic.properties files, you must add certain ACLs to the realm you write to extend this one:

how to use this example

Note: The DefaultRealmExtender Realm is dependent on the RdbmsRealm. You must have first built RdbmsRealm before you can build DefaultRealm with these instructions.

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

  2. In your development shell, compile this class using a command like this example for Windows NT:
    $ javac -d %SERVER_CLASSES% *.java

  3. Write a realm that implements one of the Realm interfaces. A good example is the CachingRealm used by the RdbmsRealm example, and the DefaultRealmExtender is set up by default to use the CachingRealm as its underlying realm implementation. You can alter this by editing the static String "delegateClassName" in the constructor of DefaultRealmExtender, or changing the constructor to pass in the name of the underlying realm implementation. You can also use a Java class resource in a properties file (a text file with the extension ".properties") that includes this entry
      delegate.class=name of underlying realm implementation
    to set the name of the underlying realm implementation.

  4. Compile your underlying realm into the %SERVER_CLASSES% directory.

  5. Add users, groups, ACLs, and permissions to your realm and set up server-side resources in the WebLogic Server that use your ACLs, etc.

  6. Start the WebLogic Server.

there's more . . .

For more information on ACLs, read the Developers Guide, Using WebLogic ACLs.