|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.security.acl.AbstractListableRealm | +--weblogic.security.acl.AbstractManageableRealm | +--com.bea.p13n.security.realm.RDBMSRealm
ManageableRealm implementation that goes against the WLPS database tables as a backing store. This realm can be made active by using an <RDBMSRealm> element in the application's config.xml file, with the appropriate parameters (see the WLS docs for more information). This implementation uses a pool of delegate class instances to do the actual database work. Each method will retry in the case of a sql exception, for the number of times it takes to cycle through the pool. If the entire pool is cycled through with failures this means that it won't do any good to make new connections, so an exception will be thrown. NOTE: this implementation does not use the SchemaProperties parameter, instead, the SQL is externalized in a properties file.
Field Summary | |
protected com.bea.p13n.security.realm.internal.Pool |
delegatePool
We maintain a pool of delegates, each with its own connection to the database. |
protected int |
maxDelegateTries
when retrying for delegates, let it cycle through the pool two times |
protected int |
poolSize
the real number of delegates in the pool |
protected java.lang.String |
realmName
|
protected static com.bea.p13n.i18n.RealmExceptionTextFormatter |
textFormatter
Exception class |
Constructor Summary | |
RDBMSRealm()
|
|
RDBMSRealm(java.lang.String realmName)
Creates a new RDBMS realm object. |
Method Summary | |
protected weblogic.security.acl.User |
authUserPassword(java.lang.String name,
java.lang.String passwd)
Authenticates the given user. |
protected com.bea.p13n.security.realm.internal.Pool |
createPool(int size)
Creates a pool of delegates. |
void |
deleteGroup(java.security.acl.Group group)
Deletes a group. |
void |
deleteUser(weblogic.security.acl.User user)
Deletes a user. |
protected RDBMSDelegate |
getDelegate()
|
java.security.acl.Group |
getGroup(java.lang.String name)
Returns the group with the given name. |
java.util.Map |
getGroupGroups(RDBMSGroup pGroup)
Returns a thread-safe Map of all groups in the database for a particular group. |
java.util.Hashtable |
getGroupMembers(java.lang.String name)
Implementation of getGroupMembers as specified by the FlatGroup.Source interface. |
protected java.util.Hashtable |
getGroupMembersInternal(java.lang.String name)
Called by getGroupMembers to retrieve group information if the group's cache has expired. |
java.util.Enumeration |
getGroups()
Returns an enumeration of all groups in the database. |
java.util.Map |
getGroupUsers(RDBMSGroup pGroup)
Returns a thread-safe Map of all users in the database for a particular group. |
protected java.security.Principal |
getPrincipal(java.lang.String name)
Returns the principal with the given name. |
protected java.lang.String |
getPropertyBundleName()
|
protected java.lang.String |
getRealmName()
|
weblogic.security.acl.User |
getUser(java.lang.String name)
Returns the user with the given name. |
java.util.Map |
getUserGroups(java.lang.String pUserName)
Returns a thread-safe Map of all groups in the database for a particular user. |
java.util.Enumeration |
getUsers()
Returns an enumeration of all users in the database. |
java.security.acl.Group |
newGroup(java.lang.String name)
Creates a new Group |
weblogic.security.acl.User |
newUser(java.lang.String name,
java.lang.Object credential,
java.lang.Object constraints)
Creates a new User. |
protected void |
removeDelegate(RDBMSDelegate delegate)
|
protected void |
returnDelegate(RDBMSDelegate delegate)
Returns a delegate to the pool. |
Methods inherited from class weblogic.security.acl.AbstractManageableRealm |
deleteAcl,
deletePermission,
newAcl,
newPermission,
setPermission |
Methods inherited from class weblogic.security.acl.AbstractListableRealm |
authCertificates,
authenticate,
authInternal,
authSSLCertificates,
getAcl,
getAcl,
getAclOwner,
getAcls,
getDelegator,
getName,
getPermission,
getPermissions,
getUser,
init,
load,
save,
setDelegator |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final com.bea.p13n.i18n.RealmExceptionTextFormatter textFormatter
protected int poolSize
protected int maxDelegateTries
protected java.lang.String realmName
protected com.bea.p13n.security.realm.internal.Pool delegatePool
returnDelegate(com.bea.p13n.security.realm.RDBMSDelegate)
,
RDBMSDelegate$DFactory
Constructor Detail |
public RDBMSRealm()
public RDBMSRealm(java.lang.String realmName)
Method Detail |
protected java.lang.String getPropertyBundleName()
protected java.lang.String getRealmName()
protected com.bea.p13n.security.realm.internal.Pool createPool(int size)
size
- the number of pool instances to maintainprotected RDBMSDelegate getDelegate()
protected void returnDelegate(RDBMSDelegate delegate)
getDelegate()
protected void removeDelegate(RDBMSDelegate delegate)
public weblogic.security.acl.User getUser(java.lang.String name)
name
- the name to obtainprotected java.security.Principal getPrincipal(java.lang.String name)
name
- the name to obtainpublic java.util.Hashtable getGroupMembers(java.lang.String name)
name
- the group nameprotected java.util.Hashtable getGroupMembersInternal(java.lang.String name)
public java.security.acl.Group getGroup(java.lang.String name)
name
- the name to obtainpublic java.util.Enumeration getUsers()
User
public java.util.Enumeration getGroups()
Group
public java.util.Map getUserGroups(java.lang.String pUserName)
Group
public java.util.Map getGroupUsers(RDBMSGroup pGroup)
Group
public java.util.Map getGroupGroups(RDBMSGroup pGroup)
Group
protected weblogic.security.acl.User authUserPassword(java.lang.String name, java.lang.String passwd)
public weblogic.security.acl.User newUser(java.lang.String name, java.lang.Object credential, java.lang.Object constraints) throws java.lang.SecurityException
name
- the name of the new usercredential
- the credential for the user (must be a plaintext password)constraints
- null, for this realmpublic java.security.acl.Group newGroup(java.lang.String name) throws java.lang.SecurityException
name
- the name of the new usercredential
- the credential for the user (must be a plaintext password)constraints
- null, for this realmpublic void deleteUser(weblogic.security.acl.User user) throws java.lang.SecurityException
user
- the user to deletepublic void deleteGroup(java.security.acl.Group group) throws java.lang.SecurityException
group
- the group to delete
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |