© 2002 BEA Systems, Inc.


com.bea.p13n.usermgmt
Class RealmHelper

java.lang.Object
  |
  +--com.bea.p13n.usermgmt.RealmHelper

public class RealmHelper
extends java.lang.Object

Utility methods for migrating from 6.x realm to 7.0 mbeans.


Method Summary
static weblogic.management.security.authentication.AuthenticationProviderMBean getProviderMBean()
          Gets the AuthenticationProviderMBean to use for User and Group management.
static boolean isInMigrationMode()
           
static boolean isWritableNewRealm()
          Finds out if new 70sspi realm is "writable."
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isInMigrationMode

public static boolean isInMigrationMode()

Returns:
true if the system is using a 6.x realm in migration mode

getProviderMBean

public static weblogic.management.security.authentication.AuthenticationProviderMBean getProviderMBean()
Gets the AuthenticationProviderMBean to use for User and Group management. Searches all the providers for the realm, looking for the "most useful" AuthenticationProviderMBean. Several search criteria are applied to the set of configured providers, and the first provider that matches is returned.

The returned provider is the first match from the following list:

  1. The first configured provider that is an instance of the class named by the system property com.bea.p13n.usermgmt.ProviderClassName, if that system property is set. If the system property is set and the class is not found or a matching provider is not configured, a UserManagementException is thrown.
  2. If a property file named usermgmt-provider.properties is found (using the thread's context classloader, so it could be in APP-INF/classes/, for example), and that file contains the property com.bea.p13n.usermgmt.AuthenticationProviderName, then the provider with that name is used. If the named provider is not found, a UserManagementException is thrown.
  3. The first configured provider that is an instance of RealmAdapterAuthenticatorMBean (this is 6.x migration mode).
  4. The first configured provider that is an instance of UserEditorMBean and GroupEditorMBean and GroupMemberListerMBean.
  5. The first configured provider that is an instance of UserReaderMBean and GroupReaderMBean and GroupMemberListerMBean.
  6. The first configured provider that is an instance of UserReaderMBean and GroupReaderMBean.
  7. If all those fail, throw UserManagementException
It is up to the client code to make sure that the returned mbean can be cast to the appropriate interface (i.e., check that it is a valid UserEditor).

Returns:
the AuthenticationProviderMBean to use

isWritableNewRealm

public static boolean isWritableNewRealm()
Finds out if new 70sspi realm is "writable."

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved