|
Oracle9iAS JAAS 9.0.2.0.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface RoleManager defines the APIs for managing roles in a realm.
The following table shows the predefined properties applicable for a LDAP-based
Role Manager. (Note: the property names are tentative and thus are subject
to change).
Property names | Descriptions |
---|---|
jazn.realm.roles.ldap.isExternal | A flag, true or false, to specify whether the roles are external to JAZN or not. |
jazn.realm.roles.ldap.searchBase# | Set the search base to point to the directory subtree where roles will be searched. JAZN locates roles with a specified name by searching in the subtree, jazn.realm.roles.ldap.searchBase, all the objects defined using the role object class if specified, jazn.realm.roles.ldap.objectClass, with attribute, jazn.realm.roles.ldap.nameAttribute, matching the search value provided by the client. |
jazn.realm.roles.ldap.nameAttribute# | Set this property to the attribute that uniquely identifies the name of the role. |
jazn.realm.roles.ldap.objectClass## | Set this property to the name of schema object class that is used to represent a role. This property is optional. |
azn.realm.roles.ldap.memberAttribute## | Set this property to the name of the attribute that contains a role member in a role entry. Default value is "unqiuemember" |
#these properties should be defined for external roles (i.e. when jazn.realm.roles.ldap.isExternal
is "true")
##optional property, it is useful for further restricting the search of users.
Method Summary |
Type | Method |
---|---|
RealmRole |
createRole(String name)
Create a RealmRole in this realm. |
void |
dropRole(RealmRole role)
Drop the role given the role instance |
void |
dropRole(String name)
Drop the role with the specifed name. |
Set |
getGrantedRoles(RealmPrincipal principal,
boolean direct_grant)
Returns a set of RealmRole which are directly or indirectly granted to the specified principal. |
Set |
getGrantees(RealmRole role,
boolean direct_grant)
Returns the Grantees that are directly or indirectly granted the specified role. |
Realm |
getRealm()
Returns the Realm reference that this RoleManager belongs to. |
RealmRole |
getRole(String name)
Returns the RealmRole with the specified name |
int |
getRoleCount()
Returns the number of roles in this RoleManager |
Set |
getRoles()
Returns a Set of roles in this RoleManager |
void |
grantRole(RealmPrincipal principal,
RealmRole role)
Grants a role to a RealmPrincipal. |
void |
initialize(Hashtable attributes)
Initialize the RoleManager if it's not yet intialized. |
void |
refresh()
Gives the RoleManager a chance to refresh its cache, so updated data will be visible |
void |
revokeRole(RealmPrincipal principal,
RealmRole role)
Revokes a role from a RealmPrincipal |
void |
setRealm(Realm realm)
Set the realm that this RoleManager is associated with. |
Method Detail |
public void setRealm(Realm realm) throws JAZNException
realm
- an instance of RealmJAZNException
- is an exception is encountered.public void initialize(Hashtable attributes) throws JAZNException
attributes
- a possibly null table of attributes and configuration
parameters for initialization.public void refresh()
public Realm getRealm()
public Set getRoles() throws JAZNException
JAZNNamingException
- if a naming Exception is encountered.JAZNException
- is exception is encountered.public int getRoleCount() throws JAZNException
JAZNNamingException
- if a naming Exception is encountered.JAZNException
- is exception is encountered.public RealmRole getRole(String name) throws JAZNException
name
- name of the roleJAZNException
- is exception is encountered.public Set getGrantees(RealmRole role, boolean direct_grant) throws JAZNException
role
- the role whose grantees are to be retrieved.direct_grant
- true for retrieving only direct granted principals,
false for retriving direct and indirect granted principals.JAZNNamingException
- if a naming Exception is encountered.JAZNException
- is exception is encountered.public Set getGrantedRoles(RealmPrincipal principal, boolean direct_grant) throws JAZNException
principal
- the principal whose granted roles are to be retrieveddirect_grant
- true for retrieving only direct granted roles,
false for retriving direct and indirect granted roles.JAZNNamingException
- if a naming Exception is encountered.JAZNException
- if an exception is encountered.public RealmRole createRole(String name) throws JAZNException
realm
- nameUnsupportedOperationException
- if roles are not modifiable.JAZNObjectExistsException
- if object of the same name already existsJAZNNamingException
- if NamingException is encountered.JAZNExeption
- if an exception is encountered.SecurityException
- if the caller does
not have permission to invoke this methodpublic void dropRole(String name) throws JAZNException
realm
- nameUnsupportedOperationException
- if dropRole operation not supported.JAZNObjectNotFoundException
- if the role to be dropped is not found.JAZNNamingException
- if a naming Exception is encountered.JAZNException
- if an exception is encountered.SecurityException
- if the caller does
not have permission to invoke this methodpublic void dropRole(RealmRole role) throws JAZNException
role
- the role instance to be dropped.
This operation will search for all the granted roles from the specified role.
It will revoke the granted roles from the specified role first before dropping
the specified role.UnsupportedOperationException
- if dropRole operation not supported.JAZNObjectNotFoundException
- if the
role to be dropped is not found.JAZNNamingException
- if a naming Exception is encountered.JAZNException
- if an exception is encountered.SecurityException
- if the caller does
not have permission to invoke this methodpublic void grantRole(RealmPrincipal principal, RealmRole role) throws JAZNException
principal
- - the RealmPrincipal to be granted the specified rolerole
- - the RealmRole to be grantedUnsupportedOperationException
- if dropRole operation is not supported.JAZNInvalidAttributesException
- if InvalidAttributesException is encountered.JAZNNamingException
- if a naming Exception is encountered.JAZNException
- if an exception is encountered.SecurityException
- if the caller does
not have permission to invoke this methodpublic void revokeRole(RealmPrincipal principal, RealmRole role) throws JAZNException
principal
- - the RealmPrincipal to be revoked the specified rolerole
- - the RealmRole to be revokedUnsupportedOperationException
- if revokeRole operation not supported.JAZNInvalidAttributesException
- if InvalidAttributesException is encountered.JAZNNamingException
- if a naming Exception is encountered.JAZNException
- if an Exception is encountered.SecurityException
- if the caller does
not have permission to invoke this method
|
Oracle9iAS JAAS 9.0.2.0.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |