Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## BEA WebLogic Server 9.0 API Reference

## weblogic.security.acl
Class AbstractListableRealm

    java.lang.Object
      weblogic.security.acl.AbstractListableRealm

All Implemented Interfaces:
  BasicRealm, FlatGroup.Source, ListableRealm

Direct Known Subclasses:
  AbstractManageableRealm

Deprecated. Deprecated in WebLogic Server 7.0. Replaced by a Pluggable Security Infrastructure that includes Authentication, Authorization, and Auditing providers.

public abstract class AbstractListableRealm
extends Object
implements ListableRealm, FlatGroup.Source

The Abstract Listable realm class is used to write custom security realms.

To implement a custom realm, you should only override the methods your realm knows about. For example, if your realm does not manage ACLs, you should not provide your own implementations of the ACL methods.

This class maintains a contract with the FlatGroup class for performance and correctness. If your realm provides a group abstraction, we recommend (but do not require) that your Group objects inherit from FlatGroup.

See Also:
  `FlatGroup`

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

Constructor Summary
`protected` | `AbstractListableRealm(String auditName)` Deprecated. Constructor to be called by public constructors in subclasses.

Method Summary
`protected User` | `authCertificates(String userName, Vector certificates)` Deprecated. Attempt authentication based on any X.509 certificates the user has presented.
`User` | `authenticate(UserInfo userInfo)` Deprecated. Check whether some User matches the presented UserInfo and accept its credentials.
`protected User` | `authInternal(UserInfo userInfo)` Deprecated. The authentication dispatcher.
`protected User` | `authSSLCertificates(String userName, Vector certificates)` Deprecated. Attempt authentication based on any SSL certificates the remote client has presented.
`protected User` | `authUserPassword(String userName, String password)` Deprecated. Attempt authentication based on a user name and password.
`Acl` | `getAcl(String name)` Deprecated. Retrieves an Access Control List (Acl) of that name, or null.
`Acl` | `getAcl(String name, char separator)` Deprecated. Retrieves an Access Control List (Acl) with the best matching name, or null.
`Principal` | `getAclOwner(Object credential)` Deprecated. Retrieves the owner of all ACLs in a BasicRealm, or null, depending on the validity of the passed credential.
`Enumeration` | `getAcls()` Deprecated. Gets an Enumeration of the Acls in a ListableRealm.
`Object` | `getDelegator()` Deprecated. Return the object that is delegating to this object.
`Group` | `getGroup(String name)` Deprecated. Retrieves a group of that name or null.
`Hashtable` | `getGroupMembers(String name)` Deprecated. This is not a public method.
`protected Hashtable` | `getGroupMembersInternal(String name)` Deprecated. Obtain the set of members of this group.
`Enumeration` | `getGroups()` Deprecated. Gets an Enumeration of the Groups in a ListableRealm.
`String` | `getName()` Deprecated. Gets the name of a BasicRealm.
`Permission` | `getPermission(String name)` Deprecated. Retrieves a permission object of that name or, if null is passed in, returns null.
`Enumeration` | `getPermissions()` Deprecated. Gets an Enumeration of the Permissions in a ListableRealm.
`User` | `getUser(String name)` Deprecated. Retrieves a User by the specified name, or null.
`User` | `getUser(UserInfo userInfo)` Deprecated. Deprecated in WebLogic Server 7.0.
`Enumeration` | `getUsers()` Deprecated. Gets an Enumeration of the in a ListableRealm.
`void` | `init(String name, Object ownerCredential)` Deprecated. Initializes a realm implementation.
`void` | `load(String name, Object credential)` Deprecated. Loads a BasicRealm from some persistent state identified in the name.
`void` | `save(String name)` Deprecated. Saves the realm to some persistent state identified in the name.
`void` | `setDelegator(Object obj)` Deprecated. Set the object that is delegating to this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractListableRealm

    protected AbstractListableRealm(String auditName)

  Deprecated.
  Constructor to be called by public constructors in subclasses. If you extend this class, you must provide a public no-arg constructor that calls this constructor.

Method Detail

### authCertificates

    protected User authCertificates(String userName,
                                    Vector certificates)

  Deprecated.
  Attempt authentication based on any X.509 certificates the user has presented. Each element in the vector is an X509 object.

  The default implementation of this method calls CertAuthentication.authenticate.

  Parameters:
    `userName` - the name of the user
    `certificates` - a vector containing X509 objects
  Returns:
    authenticated user, or null if authentication failed
  See Also:
    `CertAuthentication.authenticate(java.lang.String, java.util.Vector, boolean)`

### authenticate

    public User authenticate(UserInfo userInfo)

  Deprecated.
  Check whether some User matches the presented UserInfo and accept its credentials.

  By default, this implementation calls the authInternal method, and performs an audit log of the result.

  Parameters:
    `userInfo` - Credentials to check against
  Returns:
    Authenticated User or null
  See Also:
    `authInternal(UserInfo userInfo)`

### authInternal

    protected User authInternal(UserInfo userInfo)

  Deprecated.
  The authentication dispatcher. This method is provided to allow realm implementors to change the order in which authentication steps take place. The default order is as follows:

  - Check to see if the provided userInfo is an instance of DefaultUserInfoImpl. If it is not, return null immediately.
  - If any certificates are presented, call the authCertificates method. If it succeeds, return the authenticated user object.
  - If a password is presented, call the authUserPassword method. If it succeeds, return the authenticated user object.
  - If the client's connection was authenticated via SSL, call the authSSLCertificates method. If it succeeds, return the authenticated user object.
  - If none of the above steps has caused authentication to succeed, return null.
  For example, to give precedence to an SSL client's certificates, you can simply reimplement this method and change the order in which it calls the above methods.

  Parameters:
    `userInfo` - authentication information
  Returns:
    authenticated user, or null if authentication failed
  See Also:
    `authCertificates(java.lang.String, java.util.Vector)`, `authUserPassword(java.lang.String, java.lang.String)`, `authSSLCertificates(java.lang.String, java.util.Vector)`

### authSSLCertificates

    protected User authSSLCertificates(String userName,
                                       Vector certificates)

  Deprecated.
  Attempt authentication based on any SSL certificates the remote client has presented. Each element in the vector is an X509 object. If the connection was not established using two-way SSL authentication, this method will not be called.

  The default implementation of this method calls CertAuthentication.authenticate.

  Parameters:
    `userName` - the name of the user
    `certificates` - a vector containing X509 objects
  Returns:
    authenticated user, or null if authentication failed
  See Also:
    `authCertificates(java.lang.String, java.util.Vector)`

### authUserPassword

    protected User authUserPassword(String userName,
                                    String password)

  Deprecated.
  Attempt authentication based on a user name and password. The password is usually presented as plain text.

  The default implementation of this method always returns null.

  Parameters:
    `userName` - the name of the user
    `password` - the user's plain text password
  Returns:
    authenticated user, or null if authentication failed

### getAcl

    public Acl getAcl(String name)

  Deprecated.
  Retrieves an Access Control List (Acl) of that name, or null.

  Specified by:
    `getAcl` in interface `BasicRealm`
  Parameters:
    `name` - Name of ACL associated with a BasicRealm
  Returns:
    Acl object

### getAcl

    public Acl getAcl(String name,
                      char separator)

  Deprecated.
  Retrieves an Access Control List (Acl) with the best matching name, or null. A name matches if it is a prefix. The longer the prefix, the better the match. The only prefixes considered are up to, but excluding the separator character. For example: `getAcl("/files/personal/bill", '.')` looks for Acls named files.personal.bill, files.personal, and files and returns the one with the longest name.

  Specified by:
    `getAcl` in interface `BasicRealm`
  Parameters:
    `name` - Name of the Acl to retrieve
    `separator` - Character separator
  Returns:
    Acl object

### getAclOwner

    public Principal getAclOwner(Object credential)

  Deprecated.
  Retrieves the owner of all ACLs in a BasicRealm, or null, depending on the validity of the passed credential.

  Specified by:
    `getAclOwner` in interface `BasicRealm`
  Parameters:
    `credential` - Credentials of an owner
  Returns:
    Principal that is a BasicRealm owner

### getAcls

    public Enumeration getAcls()

  Deprecated.
  Gets an Enumeration of the Acls in a ListableRealm. The enumerated objects are of instance Acl.

  Specified by:
    `getAcls` in interface `ListableRealm`
  Returns:
    Enumeration of Acl objects

### getDelegator

    public Object getDelegator()

  Deprecated.
  Return the object that is delegating to this object. If there is no delegator, null is returned.

### getGroup

    public Group getGroup(String name)

  Deprecated.
  Retrieves a group of that name or null.

  Specified by:
    `getGroup` in interface `BasicRealm`
  Parameters:
    `name` - Name of group
  Returns:
    Group that matches name

### getGroupMembers

    public Hashtable getGroupMembers(String name)

  Deprecated.
  This is not a public method. It is provided to manage the contract between FlatGroup and classes that inherit from AbstractListableRealm. It is called if the membership cache of a FlatGroup object expires.

  This method tries to look for a cached Group object that has the given name. If it finds it and the object has a set of members, it returns those members. Otherwise, it calls the getGroupMembersInternal method.

  Specified by:
    `getGroupMembers` in interface `FlatGroup.Source`
  Parameters:
    `name` - the group for which to obtain membership information
  Returns:
    table mapping principal names to Principal objects
  See Also:
    `FlatGroup`, `getGroupMembersInternal(String name)`

### getGroupMembersInternal

    protected Hashtable getGroupMembersInternal(String name)

  Deprecated.
  Obtain the set of members of this group. This method is called if the membership cache of a FlatGroup object expires. It should return a Hashtable mapping from principal names to Principal objects. If the group being requested no longer exists, it should return null.

  See Also:
    `Principal`

### getGroups

    public Enumeration getGroups()

  Deprecated.
  Gets an Enumeration of the Groups in a ListableRealm. The enumerated objects are of instance Group.

  Specified by:
    `getGroups` in interface `ListableRealm`
  Returns:
    Enumeration of Group objects

### getName

    public String getName()

  Deprecated.
  Gets the name of a BasicRealm.

  Specified by:
    `getName` in interface `BasicRealm`
  Returns:
    Name

### getPermission

    public Permission getPermission(String name)

  Deprecated.
  Retrieves a permission object of that name or, if null is passed in, returns null. If the named permission does not exist, then it will be created and put in the list of permissions. If you pass in null, null will be returned.

  Specified by:
    `getPermission` in interface `BasicRealm`
  Parameters:
    `name` - Name of permission to retrieve
  Returns:
    Permission object

### getPermissions

    public Enumeration getPermissions()

  Deprecated.
  Gets an Enumeration of the Permissions in a ListableRealm. The enumerated objects are of instance Permission.

  Specified by:
    `getPermissions` in interface `ListableRealm`
  Returns:
    Enumeration of Permission objects

### getUser

    public User getUser(String name)

  Deprecated.
  Retrieves a User by the specified name, or null.

  Specified by:
    `getUser` in interface `BasicRealm`
  Parameters:
    `name` - User name
  Returns:
    User object

### getUser

    public User getUser(UserInfo userInfo)

  Deprecated. Deprecated in WebLogic Server 7.0.

  Checks whether some User matches the presented UserInfo and accepts its credentials.

  Specified by:
    `getUser` in interface `BasicRealm`
  Parameters:
    `userInfo` - Credentials to check against
  Returns:
    Authenticated User or null

### getUsers

    public Enumeration getUsers()

  Deprecated.
  Gets an Enumeration of the in a ListableRealm. The enumerated objects are of instance User.

  Specified by:
    `getUsers` in interface `ListableRealm`
  Returns:
    Enumeration of User objects

### init

    public void init(String name,
                     Object ownerCredential)
              throws NotOwnerException

  Deprecated.
  Initializes a realm implementation. Throws NotOwnerException on reinitialization if the owner credential is invalid.

  Specified by:
    `init` in interface `BasicRealm`
  Parameters:
    `name` - Name of Realm
    `ownerCredential` - Credentialed owner of a BasicRealm
  Throws:
    `NotOwnerException` - if the owner credential is invalid

### load

    public void load(String name,
                     Object credential)
              throws ClassNotFoundException,
                     IOException,
                     NotOwnerException

  Deprecated.
  Loads a BasicRealm from some persistent state identified in the name. Different implementations differ in how they are stored persistently and how they interpret the name.

  Specified by:
    `load` in interface `BasicRealm`
  Parameters:
    `name` - Name of BasicRealm to load
    `credential` - Credentialed owner of a BasicRealm
  Throws:
    `ClassNotFoundException` - if the BasicRealm cannot be found
    `IOException` - if there is an I/O error
    `NotOwnerException` - if the credential does not match an owner

### save

    public void save(String name)
              throws IOException

  Deprecated.
  Saves the realm to some persistent state identified in the name. Different implementations differ in how they are stored persistently and how they interpret the name.

  Specified by:
    `save` in interface `BasicRealm`
  Parameters:
    `name` - Name to save under
  Throws:
    `IOException` - if there is an I/O error

### setDelegator

    public void setDelegator(Object obj)

  Deprecated.
  Set the object that is delegating to this object. A realm that delegates to this realm for some functions should call this method so that this realm knows it is being delegated to.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs90 Copyright 2005 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD