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

## weblogic.security.acl
Class CachingRealm

    java.lang.Object
      |
      +--weblogic.security.acl.CachingRealm

Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the Pluggable Security Infrastructure.

public final class CachingRealm
extends java.lang.Object
implements ManageableRealm, DebuggableRealm, RefreshableRealm

Caching realm.

Author:
  Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.
See Also:
  Serialized Form

Inner Class Summary
`protected static class` | `CachingRealm.CaseInsensitiveUserInfo` Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the Pluggable Security Infrastructure.
`protected static class` | `CachingRealm.Entry` Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the Pluggable Security Infrastructure.
`protected static class` | `CachingRealm.UserEntry` Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the Pluggable Security Infrastructure.

Field Summary
`protected TTLCache` | `aclNegCache` Deprecated. ACL negative cache.
`protected TTLCache` | `aclPosCache` Deprecated. ACL positive cache.
`protected java.lang.Object` | `aclSync` Deprecated. ACL sync object.
`protected TTLCache` | `authNegCache` Deprecated. Authentication negative cache.
`protected TTLCache` | `authPosCache` Deprecated. Authentication positive cache.
`protected boolean` | `caseSensitive` Deprecated. Whether this cache is case-sensitive.
`protected TTLCache` | `groupNegCache` Deprecated. Group negative cache.
`protected TTLCache` | `groupPosCache` Deprecated. Group positive cache.
`protected java.lang.Object` | `groupSync` Deprecated. Group sync object.
`protected weblogic.logging.LogOutputStream` | `log` Deprecated. Debugging log.
`protected TTLCache` | `permNegCache` Deprecated. Permission negative cache.
`protected TTLCache` | `permPosCache` Deprecated. Permission positive cache.
`protected java.lang.Object` | `permSync` Deprecated. Permission sync object.
`protected TTLCache` | `userNegCache` Deprecated. User negative cache.
`protected TTLCache` | `userPosCache` Deprecated. User positive cache.
`protected java.lang.Object` | `userSync` Deprecated. User and authentication sync object.

Constructor Summary
`CachingRealm(ListableRealm delegate)` Deprecated. Create a new caching realm instance.
`CachingRealm(ListableRealm delegate, ManageableRealm backup, java.lang.Object credential)` Deprecated. Create a new caching realm instance.

Method Summary
`User` | `authenticate(UserInfo userInfo)` Deprecated. Attempt to authenticate the given user.
`void` | `clearAclCaches()` Deprecated. Clear the ACL positive and negative caches.
`void` | `clearCaches()` Deprecated. Clear all caches.
`void` | `clearGroupCaches()` Deprecated. Clear the group positive and negative caches.
`void` | `clearPermCaches()` Deprecated. Clear the permission positive and negative caches.
`void` | `clearUserCaches()` Deprecated. Clear all user-related caches.
`void` | `deleteAcl(java.security.Principal owner, java.security.acl.Acl acl)` Deprecated. Delete an ACL from both the delegate and backup realms.
`void` | `deleteGroup(java.security.acl.Group group)` Deprecated. Delete a group from both the delegate and backup realms.
`void` | `deletePermission(java.security.acl.Permission perm)` Deprecated. Delete a permission from both the delegate and backup realms.
`void` | `deleteUser(User user)` Deprecated. Delete a user from both the delegate and backup realms.
`java.security.acl.Acl` | `getAcl(java.lang.String name)` Deprecated.
`java.security.acl.Acl` | `getAcl(java.lang.String name, char separator)` Deprecated.
`java.security.Principal` | `getAclOwner(java.lang.Object credential)` Deprecated. This is a direct call through to getAclOwner in delegate and/or backup realms.
`java.util.Enumeration` | `getAcls()` Deprecated. Return all ACLs in both the delegate and backup realms.
`java.lang.Object` | `getCacheValue(java.lang.Object propId)` Deprecated.
`weblogic.logging.LogOutputStream` | `getDebugLog()` Deprecated.
`java.lang.Class` | `getDelegateClass()` Deprecated. Return the class of the delegate realm.
`java.security.acl.Group` | `getGroup(java.lang.String name)` Deprecated.
`java.util.Enumeration` | `getGroups()` Deprecated. Return all groups in both the delegate and backup realms.
`java.lang.String` | `getName()` Deprecated. Return the name of this realm.
`java.security.acl.Permission` | `getPermission(java.lang.String name)` Deprecated.
`java.util.Enumeration` | `getPermissions()` Deprecated. Return all permissions in both the delegate and backup realms.
`java.security.Principal` | `getPrincipal(java.lang.String name)` Deprecated.
`User` | `getUser(java.lang.String name)` Deprecated. Return the User.
`User` | `getUser(UserInfo userInfo)` Deprecated. Call through to the authenticate method.
`java.util.Enumeration` | `getUsers()` Deprecated. Return all users in both the delegate and backup realms.
`void` | `init(java.lang.String name, java.lang.Object ownerCredential)` Deprecated. Call through to the init methods in the delegate and backup realms.
`void` | `load(java.lang.String name, java.lang.Object credential)` Deprecated. Call through to the load methods in the delegate and backup realms.
`java.security.acl.Acl` | `lookupAcl(java.lang.String name)` Deprecated. Look for the given ACL in the cache.
`java.security.acl.Acl` | `lookupAcl(java.lang.String name, char separator)` Deprecated.
`java.security.acl.Group` | `lookupGroup(java.lang.String name)` Deprecated. Look for the given group in the cache.
`java.security.acl.Permission` | `lookupPermission(java.lang.String name)` Deprecated. Perform a cache lookup for a permission.
`java.security.Principal` | `lookupPrincipal(java.lang.String name)` Deprecated. Look for the named principal in the user and group caches.
`User` | `lookupUser(java.lang.String name)` Deprecated. Look for the given user in the cache.
`BasicRealm` | `masqueradeAs(java.lang.String realmName)` Deprecated. Ensure that the given name in the set of realms points to this realm.
`java.security.acl.Acl` | `newAcl(java.security.Principal owner, java.lang.String name)` Deprecated. Create a new ACL in a realm-specific way.
`java.security.acl.Group` | `newGroup(java.lang.String name)` Deprecated. Create a new group in a realm-specific way.
`java.security.acl.Permission` | `newPermission(java.lang.String name)` Deprecated. Create a new permission in a realm-specific way.
`User` | `newUser(java.lang.String name, java.lang.Object credential, java.lang.Object constraints)` Deprecated. Create a new user in a realm-specific way.
`void` | `refresh()` Deprecated. Refresh by emptying the caches, refreshing the delegate & backup - the CachingRealm will auto-refresh as users/groups/acls are looked up after the caches have been emptied
`void` | `save(java.lang.String name)` Deprecated. Call through to the save methods in the delegate and backup realms.
`void` | `setDebug(boolean enable)` Deprecated.
`void` | `setPermission(java.security.acl.Acl acl, java.security.Principal principal, java.security.acl.Permission permission, boolean allow)` Deprecated. Sets or unsets a permission for a principal in an ACL.

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

Field Detail

### caseSensitive

    protected boolean caseSensitive

  Deprecated.
  Whether this cache is case-sensitive.

### aclPosCache

    protected TTLCache aclPosCache

  Deprecated.
  ACL positive cache. You must synchronize on aclSync if you wish to perform any action on either ACL cache.
  See Also:
    `aclNegCache`, `aclSync`

### aclNegCache

    protected TTLCache aclNegCache

  Deprecated.
  ACL negative cache. You must synchronize on aclSync if you wish to perform any action on either ACL cache.
  See Also:
    `aclPosCache`, `aclSync`

### aclSync

    protected final java.lang.Object aclSync

  Deprecated.
  ACL sync object. You must synchronize on this if you wish to perform any action on either ACL cache.
  See Also:
    `aclPosCache`, `aclNegCache`

### groupPosCache

    protected TTLCache groupPosCache

  Deprecated.
  Group positive cache. You must synchronize on groupSync if you wish to perform any action on either group cache.
  See Also:
    `groupNegCache`, `groupSync`

### groupNegCache

    protected TTLCache groupNegCache

  Deprecated.
  Group negative cache. You must synchronize on groupSync if you wish to perform any action on either group cache.
  See Also:
    `groupPosCache`, `groupSync`

### groupSync

    protected final java.lang.Object groupSync

  Deprecated.
  Group sync object. You must synchronize on this if you wish to perform any action on either group cache.
  See Also:
    `groupPosCache`, `groupNegCache`

### permPosCache

    protected TTLCache permPosCache

  Deprecated.
  Permission positive cache. You must synchronize on permSync if you wish to perform any action on either permission cache.
  See Also:
    `permNegCache`, `permSync`

### permNegCache

    protected TTLCache permNegCache

  Deprecated.
  Permission negative cache. You must synchronize on permSync if you wish to perform any action on either permission cache.
  See Also:
    `permPosCache`, `permSync`

### permSync

    protected final java.lang.Object permSync

  Deprecated.
  Permission sync object. You must synchronize on this if you wish to perform any action on either permission cache.
  See Also:
    `permPosCache`, `permNegCache`

### userPosCache

    protected TTLCache userPosCache

  Deprecated.
  User positive cache. You must synchronize on userSync if you wish to perform any action on any of the user or authentication caches.
  See Also:
    `userNegCache`, `authPosCache`, `authNegCache`, `userSync`

### userNegCache

    protected TTLCache userNegCache

  Deprecated.
  User negative cache. You must synchronize on userSync if you wish to perform any action on any of the user or authentication caches.
  See Also:
    `userPosCache`, `authPosCache`, `authNegCache`, `userSync`

### authPosCache

    protected TTLCache authPosCache

  Deprecated.
  Authentication positive cache. You must synchronize on userSync if you wish to perform any action on any of the user or authentication caches.
  See Also:
    `userPosCache`, `userNegCache`, `authNegCache`, `userSync`

### authNegCache

    protected TTLCache authNegCache

  Deprecated.
  Authentication negative cache. You must synchronize on userSync if you wish to perform any action on any of the user or authentication caches.
  See Also:
    `userPosCache`, `userNegCache`, `authPosCache`, `userSync`

### userSync

    protected final java.lang.Object userSync

  Deprecated.
  User and authentication sync object. You must synchronize on this if you wish to perform any action on any of the user or authentication caches.
  See Also:
    `userPosCache`, `userNegCache`, `authPosCache`, `authNegCache`

### log

    protected weblogic.logging.LogOutputStream log

  Deprecated.
  Debugging log. May be null.

Constructor Detail

### CachingRealm

    public CachingRealm(ListableRealm delegate)

  Deprecated.
  Create a new caching realm instance. We delegate to the given realm, and use no backup.

  Parameters:
    `delegate` - the realm to delegate to

### CachingRealm

    public CachingRealm(ListableRealm delegate,
                        ManageableRealm backup,
                        java.lang.Object credential)

  Deprecated.
  Create a new caching realm instance. We delegate to the given primary and backup realms.

  Parameters:
    `delegate` - the realm to delegate to
    `backup` - the backup realm to delegate to
    `credential` - security credential

Method Detail

### masqueradeAs

    public BasicRealm masqueradeAs(java.lang.String realmName)

  Deprecated.
  Ensure that the given name in the set of realms points to this realm. This is useful for making sure that Realm.getRealm() will return this object for a particular name.

  Returns:
    the previous realm with this name, or null if there was none
  See Also:
    `Realm.getRealm(java.lang.String)`

### init

    public void init(java.lang.String name,
                     java.lang.Object ownerCredential)
              throws java.security.acl.NotOwnerException

  Deprecated.
  Call through to the init methods in the delegate and backup realms.

  See Also:
    `BasicRealm.init(java.lang.String, java.lang.Object)`

### getName

    public java.lang.String getName()

  Deprecated.
  Return the name of this realm.

  Returns:
    the name of this realm

### getUser

    public User getUser(java.lang.String name)

  Deprecated.
  Return the User.

  Parameters:
    `name` - String name of user
  Returns:
    the User

### lookupPrincipal

    public java.security.Principal lookupPrincipal(java.lang.String name)

  Deprecated.
  Look for the named principal in the user and group caches. If the principal is not in the cache, null is returned.

### getPrincipal

    public java.security.Principal getPrincipal(java.lang.String name)

  Deprecated.

### lookupUser

    public User lookupUser(java.lang.String name)

  Deprecated.
  Look for the given user in the cache. If the user is not currently cached, null is returned.

### getUser

    public User getUser(UserInfo userInfo)

  Deprecated.
  Call through to the authenticate method.

  See Also:
    `authenticate(weblogic.security.acl.UserInfo)`

### authenticate

    public User authenticate(UserInfo userInfo)

  Deprecated.
  Attempt to authenticate the given user.

  Parameters:
    `userInfo` - authentication info associated with the user
  Returns:
    a User object, if authentication succeeded, otherwise null

### getAclOwner

    public java.security.Principal getAclOwner(java.lang.Object credential)

  Deprecated.
  This is a direct call through to getAclOwner in delegate and/or backup realms. Its result is not cached.

  See Also:
    `BasicRealm.getAclOwner(java.lang.Object)`

### lookupGroup

    public java.security.acl.Group lookupGroup(java.lang.String name)

  Deprecated.
  Look for the given group in the cache. If the group is not currently cached, null is returned.

### getGroup

    public java.security.acl.Group getGroup(java.lang.String name)

  Deprecated.

  Parameters:
    `name` - of the group to get
  Returns:
    Group or null if not found

### lookupAcl

    public java.security.acl.Acl lookupAcl(java.lang.String name)

  Deprecated.
  Look for the given ACL in the cache. If the ACL is not currently cached, null is returned.

### getAcl

    public java.security.acl.Acl getAcl(java.lang.String name)

  Deprecated.

  Parameters:
    `name` - of the Acl to retrieve
  Returns:
    Acl requested or null

### lookupAcl

    public java.security.acl.Acl lookupAcl(java.lang.String name,
                                           char separator)

  Deprecated.

  Parameters:
    `name` - of Acl to look up
    `separator` - character that separates segments in an Acl name, usually '.'
  Returns:
    Acl that is the best match

### getAcl

    public java.security.acl.Acl getAcl(java.lang.String name,
                                        char separator)

  Deprecated.

  Parameters:
    `name` - of the Acl to lookup
    `separator` - character that separates segments in an Acl name
  Returns:
    Acl that is the best match

### lookupPermission

    public java.security.acl.Permission lookupPermission(java.lang.String name)

  Deprecated.
  Perform a cache lookup for a permission. If the given permission is not in the cache, null is returned.

  Parameters:
    `name` - of permission to lookup
  Returns:
    Permission requested, or null if not cached

### getPermission

    public java.security.acl.Permission getPermission(java.lang.String name)

  Deprecated.

  Parameters:
    `name` - Permission to get
  Returns:
    Permission requested or null

### load

    public void load(java.lang.String name,
                     java.lang.Object credential)
              throws java.lang.ClassNotFoundException,
                     java.io.IOException,
                     java.security.acl.NotOwnerException

  Deprecated.
  Call through to the load methods in the delegate and backup realms.

  See Also:
    `BasicRealm.load(java.lang.String, java.lang.Object)`

### save

    public void save(java.lang.String name)
              throws java.io.IOException

  Deprecated.
  Call through to the save methods in the delegate and backup realms.

  See Also:
    `BasicRealm.save(java.lang.String)`

### newUser

    public User newUser(java.lang.String name,
                        java.lang.Object credential,
                        java.lang.Object constraints)
                 throws java.lang.SecurityException

  Deprecated.
  Create a new user in a realm-specific way. If the user could not be created in the delegate realm, it is created in the backup realm. If the create succeeds, any existing user negative cache entry is cleared to ensure that the new user appears immediately.

  Note: we do not currently attempt to clear the negative authentication cache when a new user is created, because there may be several negative hits associated with a given user and keeping track of them is not practicable.

  For this reason, you should keep the time-to-live value on the negative authentication cache low if you intend to add users to a realm, otherwise you risk denying them access because of negative cache entries that have not yet expired.

  If you must ensure that the negative authentication cache is cleared when a user is created, simply extend this class and make sure that your implementation of this method traverses the negative authentication cache, clearing any entries whose names match the name of the new user. This may be an expensive operation, depending on cache size and frequency of user creation.

  Specified by:
    newUser in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.newUser(java.lang.String, java.lang.Object, java.lang.Object)`

### newGroup

    public java.security.acl.Group newGroup(java.lang.String name)
                                     throws java.lang.SecurityException

  Deprecated.
  Create a new group in a realm-specific way. If the group could not be created in the delegate realm, it is created in the backup realm. If the create succeeds, any existing group negative cache entry is cleared to ensure that the new group appears immediately.

  Specified by:
    newGroup in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.newGroup(java.lang.String)`

### newAcl

    public java.security.acl.Acl newAcl(java.security.Principal owner,
                                        java.lang.String name)
                                 throws java.lang.SecurityException

  Deprecated.
  Create a new ACL in a realm-specific way. If the ACL could not be created in the delegate realm, it is created in the backup realm. If the create succeeds, any existing ACL negative cache entry is cleared to ensure that the new ACL appears immediately.

  Specified by:
    newAcl in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.newAcl(java.security.Principal, java.lang.String)`

### newPermission

    public java.security.acl.Permission newPermission(java.lang.String name)
                                               throws java.lang.SecurityException

  Deprecated.
  Create a new permission in a realm-specific way. If the permission could not be created in the delegate realm, it is created in the backup realm. If the create succeeds, any existing permission negative cache entry is cleared to ensure that the new permission appears immediately.

  Specified by:
    newPermission in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.newPermission(java.lang.String)`

### deleteUser

    public void deleteUser(User user)
                    throws java.lang.SecurityException

  Deprecated.
  Delete a user from both the delegate and backup realms. If entries exist in either the user or auth positive caches, they are cleared so that the user disappears immediately.
  Specified by:
    deleteUser in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.deleteUser(weblogic.security.acl.User)`

### deleteGroup

    public void deleteGroup(java.security.acl.Group group)
                     throws java.lang.SecurityException

  Deprecated.
  Delete a group from both the delegate and backup realms. If an entry exists in the group positive cache, it is cleared so that the group disappears immediately.
  Specified by:
    deleteGroup in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.deleteGroup(java.security.acl.Group)`

### deletePermission

    public void deletePermission(java.security.acl.Permission perm)
                          throws java.lang.SecurityException

  Deprecated.
  Delete a permission from both the delegate and backup realms. If an entry exists in the permission positive cache, it is cleared so that the permission disappears immediately.
  Specified by:
    deletePermission in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.deletePermission(java.security.acl.Permission)`

### deleteAcl

    public void deleteAcl(java.security.Principal owner,
                          java.security.acl.Acl acl)
                   throws java.lang.SecurityException

  Deprecated.
  Delete an ACL from both the delegate and backup realms. If an entry exists in the ACL positive cache, it is cleared so that the ACL disappears immediately.
  Specified by:
    deleteAcl in interface ManageableRealm

  Throws:
    java.lang.SecurityException - bad juju
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.deleteAcl(java.security.Principal, java.security.acl.Acl)`

### setPermission

    public void setPermission(java.security.acl.Acl acl,
                              java.security.Principal principal,
                              java.security.acl.Permission permission,
                              boolean allow)

  Deprecated.
  Sets or unsets a permission for a principal in an ACL. If the call succeeds in either the delegate or backup realm, the ACL negative or positive cache is cleared, depending on whether or not the permission is to be allowed.
  Specified by:
    setPermission in interface ManageableRealm

  Throws:
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ManageableRealm.setPermission(java.security.acl.Acl, java.security.Principal, java.security.acl.Permission, boolean)`

### getUsers

    public java.util.Enumeration getUsers()

  Deprecated.
  Return all users in both the delegate and backup realms.

  Throws:
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ListableRealm.getUsers()`

### getGroups

    public java.util.Enumeration getGroups()

  Deprecated.
  Return all groups in both the delegate and backup realms.

  Throws:
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ListableRealm.getGroups()`

### getAcls

    public java.util.Enumeration getAcls()

  Deprecated.
  Return all ACLs in both the delegate and backup realms.

  Throws:
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ListableRealm.getAcls()`

### getPermissions

    public java.util.Enumeration getPermissions()

  Deprecated.
  Return all permissions in both the delegate and backup realms.

  Throws:
    java.lang.UnsupportedOperationException - the delegate realm does not support this operation
  See Also:
    `ListableRealm.getPermissions()`

### refresh

    public void refresh()

  Deprecated.
  Refresh by emptying the caches, refreshing the delegate & backup - the CachingRealm will auto-refresh as users/groups/acls are looked up after the caches have been emptied
  Specified by:
    refresh in interface RefreshableRealm

### clearCaches

    public void clearCaches()

  Deprecated.
  Clear all caches.

### clearUserCaches

    public void clearUserCaches()

  Deprecated.
  Clear all user-related caches. This method clears both the user and authentication positive and negative caches.

### clearGroupCaches

    public void clearGroupCaches()

  Deprecated.
  Clear the group positive and negative caches.

### clearAclCaches

    public void clearAclCaches()

  Deprecated.
  Clear the ACL positive and negative caches.

### clearPermCaches

    public void clearPermCaches()

  Deprecated.
  Clear the permission positive and negative caches.

### setDebug

    public void setDebug(boolean enable)

  Deprecated.
  Specified by:
    setDebug in interface DebuggableRealm

### getDebugLog

    public weblogic.logging.LogOutputStream getDebugLog()

  Deprecated.
  Specified by:
    getDebugLog in interface DebuggableRealm

### getDelegateClass

    public java.lang.Class getDelegateClass()

  Deprecated.
  Return the class of the delegate realm. You can use this for runtime type checking, to see what kind of realm this CachingRealm instance delegates to.

### getCacheValue

    public java.lang.Object getCacheValue(java.lang.Object propId)

  Deprecated.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference