|
Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.5) Part Number E13941-05 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.security.acl.CachingRealm
public final class CachingRealm
Caching realm.
Nested 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 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 Object |
groupSync
Deprecated. Group sync object. |
protected LogOutputStream |
log
Deprecated. Debugging log. |
protected TTLCache |
permNegCache
Deprecated. Permission negative cache. |
protected TTLCache |
permPosCache
Deprecated. Permission positive cache. |
protected Object |
permSync
Deprecated. Permission sync object. |
protected TTLCache |
userNegCache
Deprecated. User negative cache. |
protected TTLCache |
userPosCache
Deprecated. User positive cache. |
protected 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,
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(Principal owner,
Acl acl)
Deprecated. Delete an ACL from both the delegate and backup realms. |
void |
deleteGroup(Group group)
Deprecated. Delete a group from both the delegate and backup realms. |
void |
deletePermission(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. |
Acl |
getAcl(String name)
Deprecated. |
Acl |
getAcl(String name,
char separator)
Deprecated. |
Principal |
getAclOwner(Object credential)
Deprecated. This is a direct call through to getAclOwner in delegate and/or backup realms. |
Enumeration |
getAcls()
Deprecated. Return all ACLs in both the delegate and backup realms. |
Object |
getCacheValue(Object propId)
Deprecated. |
LogOutputStream |
getDebugLog()
Deprecated. |
Class |
getDelegateClass()
Deprecated. Return the class of the delegate realm. |
Group |
getGroup(String name)
Deprecated. |
Enumeration |
getGroups()
Deprecated. Return all groups in both the delegate and backup realms. |
String |
getName()
Deprecated. Return the name of this realm. |
Permission |
getPermission(String name)
Deprecated. |
Enumeration |
getPermissions()
Deprecated. Return all permissions in both the delegate and backup realms. |
Principal |
getPrincipal(String name)
Deprecated. |
User |
getUser(String name)
Deprecated. Return the User. |
User |
getUser(UserInfo userInfo)
Deprecated. Call through to the authenticate method. |
Enumeration |
getUsers()
Deprecated. Return all users in both the delegate and backup realms. |
void |
init(String name,
Object ownerCredential)
Deprecated. Call through to the init methods in the delegate and backup realms. |
void |
load(String name,
Object credential)
Deprecated. Call through to the load methods in the delegate and backup realms. |
Acl |
lookupAcl(String name)
Deprecated. Look for the given ACL in the cache. |
Acl |
lookupAcl(String name,
char separator)
Deprecated. |
Group |
lookupGroup(String name)
Deprecated. Look for the given group in the cache. |
Permission |
lookupPermission(String name)
Deprecated. Perform a cache lookup for a permission. |
Principal |
lookupPrincipal(String name)
Deprecated. Look for the named principal in the user and group caches. |
User |
lookupUser(String name)
Deprecated. Look for the given user in the cache. |
BasicRealm |
masqueradeAs(String realmName)
Deprecated. Ensure that the given name in the set of realms points to this realm. |
Acl |
newAcl(Principal owner,
String name)
Deprecated. Create a new ACL in a realm-specific way. |
Group |
newGroup(String name)
Deprecated. Create a new group in a realm-specific way. |
Permission |
newPermission(String name)
Deprecated. Create a new permission in a realm-specific way. |
User |
newUser(String name,
Object credential,
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(String name)
Deprecated. Call through to the save methods in the delegate and backup realms. |
void |
setDebug(boolean enable)
Deprecated. |
void |
setPermission(Acl acl,
Principal principal,
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 |
---|
protected boolean caseSensitive
protected TTLCache aclPosCache
CachingRealm.aclNegCache
,
CachingRealm.aclSync
protected TTLCache aclNegCache
CachingRealm.aclPosCache
,
CachingRealm.aclSync
protected final Object aclSync
CachingRealm.aclPosCache
,
CachingRealm.aclNegCache
protected TTLCache groupPosCache
CachingRealm.groupNegCache
,
CachingRealm.groupSync
protected TTLCache groupNegCache
CachingRealm.groupPosCache
,
CachingRealm.groupSync
protected final Object groupSync
CachingRealm.groupPosCache
,
CachingRealm.groupNegCache
protected TTLCache permPosCache
CachingRealm.permNegCache
,
CachingRealm.permSync
protected TTLCache permNegCache
CachingRealm.permPosCache
,
CachingRealm.permSync
protected final Object permSync
CachingRealm.permPosCache
,
CachingRealm.permNegCache
protected TTLCache userPosCache
CachingRealm.userNegCache
,
CachingRealm.authPosCache
,
CachingRealm.authNegCache
,
CachingRealm.userSync
protected TTLCache userNegCache
CachingRealm.userPosCache
,
CachingRealm.authPosCache
,
CachingRealm.authNegCache
,
CachingRealm.userSync
protected TTLCache authPosCache
CachingRealm.userPosCache
,
CachingRealm.userNegCache
,
CachingRealm.authNegCache
,
CachingRealm.userSync
protected TTLCache authNegCache
CachingRealm.userPosCache
,
CachingRealm.userNegCache
,
CachingRealm.authPosCache
,
CachingRealm.userSync
protected final Object userSync
CachingRealm.userPosCache
,
CachingRealm.userNegCache
,
CachingRealm.authPosCache
,
CachingRealm.authNegCache
protected LogOutputStream log
Constructor Detail |
---|
public CachingRealm(ListableRealm delegate)
delegate
- the realm to delegate topublic CachingRealm(ListableRealm delegate, ManageableRealm backup, Object credential)
delegate
- the realm to delegate tobackup
- the backup realm to delegate tocredential
- security credentialMethod Detail |
---|
public BasicRealm masqueradeAs(String realmName)
Realm.getRealm(java.lang.String)
public void init(String name, Object ownerCredential) throws NotOwnerException
NotOwnerException
BasicRealm#init
public String getName()
public User getUser(String name)
name
- String name of user
public Principal lookupPrincipal(String name)
public Principal getPrincipal(String name)
public User lookupUser(String name)
public User getUser(UserInfo userInfo)
CachingRealm.authenticate(UserInfo)
public User authenticate(UserInfo userInfo)
userInfo
- authentication info associated with the user
public Principal getAclOwner(Object credential)
BasicRealm#getAclOwner
public Group lookupGroup(String name)
public Group getGroup(String name)
name
- of the group to get
public Acl lookupAcl(String name)
public Acl getAcl(String name)
name
- of the Acl to retrieve
public Acl lookupAcl(String name, char separator)
name
- of Acl to look upseparator
- character that separates segments in an Acl name, usually '.'
public Acl getAcl(String name, char separator)
name
- of the Acl to lookupseparator
- character that separates segments in an Acl name
public Permission lookupPermission(String name)
name
- of permission to lookup
public Permission getPermission(String name)
name
- Permission to get
public void load(String name, Object credential) throws ClassNotFoundException, IOException, NotOwnerException
ClassNotFoundException
IOException
NotOwnerException
BasicRealm#load
public void save(String name) throws IOException
IOException
BasicRealm#save
public User newUser(String name, Object credential, Object constraints) throws SecurityException
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.
newUser
in interface ManageableRealm
name
- Usernamecredential
- X.509 certificate, token, or password, etc.constraints
- Constraints on this user's access
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.newUser(java.lang.String, java.lang.Object, java.lang.Object)
public Group newGroup(String name) throws SecurityException
newGroup
in interface ManageableRealm
name
- Name for the new Group
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.newGroup(java.lang.String)
public Acl newAcl(Principal owner, String name) throws SecurityException
newAcl
in interface ManageableRealm
owner
- Owner of the access control listname
- Name of the access control list
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.newAcl(java.security.Principal, java.lang.String)
public Permission newPermission(String name) throws SecurityException
newPermission
in interface ManageableRealm
name
- Name for the Permission
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.newPermission(java.lang.String)
public void deleteUser(User user) throws SecurityException
deleteUser
in interface ManageableRealm
user
- User to be removed from the realm
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.deleteUser(User)
public void deleteGroup(Group group) throws SecurityException
deleteGroup
in interface ManageableRealm
group
- Group to be removed from the realm
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.deleteGroup(java.security.acl.Group)
public void deletePermission(Permission perm) throws SecurityException
deletePermission
in interface ManageableRealm
perm
- Permission to be removed from the realm
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.deletePermission(java.security.acl.Permission)
public void deleteAcl(Principal owner, Acl acl) throws SecurityException
deleteAcl
in interface ManageableRealm
owner
- Principal who is an owner of the ACLacl
- Access control list to be deleted
SecurityException
- bad juju
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.deleteAcl(java.security.Principal, java.security.acl.Acl)
public void setPermission(Acl acl, Principal principal, Permission permission, boolean allow)
setPermission
in interface ManageableRealm
acl
- Access control list to be updatedprincipal
- Principal who is an owner of the ACLpermission
- Permission to be updatedallow
- True to set permission to allow
UnsupportedOperationException
- the delegate realm does not support this operationManageableRealm.setPermission(java.security.acl.Acl, java.security.Principal, java.security.acl.Permission, boolean)
public Enumeration getUsers()
getUsers
in interface ListableRealm
UnsupportedOperationException
- the delegate realm does not support this operationListableRealm.getUsers()
public Enumeration getGroups()
getGroups
in interface ListableRealm
UnsupportedOperationException
- the delegate realm does not support this operationListableRealm.getGroups()
public Enumeration getAcls()
getAcls
in interface ListableRealm
UnsupportedOperationException
- the delegate realm does not support this operationListableRealm.getAcls()
public Enumeration getPermissions()
getPermissions
in interface ListableRealm
UnsupportedOperationException
- the delegate realm does not support this operationListableRealm.getPermissions()
public void refresh()
refresh
in interface RefreshableRealm
public void clearCaches()
public void clearUserCaches()
public void clearGroupCaches()
public void clearAclCaches()
public void clearPermCaches()
public void setDebug(boolean enable)
setDebug
in interface DebuggableRealm
public LogOutputStream getDebugLog()
getDebugLog
in interface DebuggableRealm
public Class getDelegateClass()
public Object getCacheValue(Object propId)
|
Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.5) Part Number E13941-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |