|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RoleMappingConfiguration
Interface for adding user / group to role mappings to policy.
Usage examples for manipulating users / groups to role mappings:
rc.addUsersToRole( "role-1", userList ); rc.addGroupsToRole( "role-2", groupList ); rc.addRoleToRole( "role-2", "role-3" ); rc.setAuthenticatedUsersToRole( "role-4" ); rc.setEveryoneToRole( "role-5" );
RoleMappingConfigurationFactory
Method Summary | |
---|---|
void |
addGroupsToRole(java.lang.String role,
java.util.List<java.lang.String> groups)
This method is used to add one or more groups to a given role. |
void |
addRoleToRole(java.lang.String role,
java.lang.String mappedRole)
This method is used to map a role to a specified role. |
void |
addUsersToRole(java.lang.String role,
java.util.List<java.lang.String> users)
This method is used to add one or more users to a given role. |
void |
commit()
This method is used to commit all changes to the underlying policy. |
void |
delete()
This method is used to delete the currently configured user/group to role mappings. |
java.lang.String |
getContextID()
This method is used to get the context identifier that we are configuring policy for. |
java.util.List<java.lang.String> |
getGroupsInRole(java.lang.String role)
This method is used to get a list of groups that are currently in the specified role. |
java.util.Set<java.lang.String> |
getRoles()
This method is used to get a Set of all currently configured roles |
java.util.List<java.lang.String> |
getRolesInRole(java.lang.String role)
This method is used to get a list of roles that are currently mapped to the specified role. |
java.util.List<java.lang.String> |
getUsersInRole(java.lang.String role)
This method is used to get a list of users that are currently in the specified role. |
boolean |
isAuthenticatedUsersInRole(java.lang.String role)
This method is used to check if all authenticated users have access to the specified role. |
boolean |
isEveryoneInRole(java.lang.String role)
This method is used to check if all users have access to the specified role. |
boolean |
isRequiredRole(java.lang.String role)
This method is used to determine if a given role is required by other modules (such as in a J2EE application) and therefore cannot be removed using the removeRole method. |
void |
removeAuthenticatedUsersFromRole(java.lang.String role)
This method is used to remove the all authenticated meta-user from a given role. |
void |
removeEveryoneFromRole(java.lang.String role)
This method is to remove the everyone meta-user from a given role. |
void |
removeGroupsFromRole(java.lang.String role,
java.util.List<java.lang.String> groups)
This method is used to remove one or more groups from a given role. |
boolean |
removeRole(java.lang.String role)
This method is used to remove a role. |
void |
removeRoleFromRole(java.lang.String role,
java.lang.String mappedRole)
This method is used to remove a mapped role from the specified role. |
void |
removeUsersFromRole(java.lang.String role,
java.util.List<java.lang.String> users)
This method is used to remove one or more users from a given role. |
void |
setAuthenticatedUsersToRole(java.lang.String role)
This method is used to add all users that have been authenticated to a given role. |
void |
setEveryoneToRole(java.lang.String role)
This method is used to add all users, authenticated or not, to a given role. |
Method Detail |
---|
java.lang.String getContextID()
void setAuthenticatedUsersToRole(java.lang.String role) throws javax.security.jacc.PolicyContextException
role
- The role to add all authenticated users to.
javax.security.jacc.PolicyContextException
void setEveryoneToRole(java.lang.String role) throws javax.security.jacc.PolicyContextException
role
- The role to add everyone to.
javax.security.jacc.PolicyContextException
void addGroupsToRole(java.lang.String role, java.util.List<java.lang.String> groups) throws javax.security.jacc.PolicyContextException
role
- The role to add groups to.groups
- A list containing the String names of groups to be added to the
specified role.
javax.security.jacc.PolicyContextException
void addUsersToRole(java.lang.String role, java.util.List<java.lang.String> users) throws javax.security.jacc.PolicyContextException
role
- The role to add users to.users
- A list containing the String names of users to be added to the
specified role.
javax.security.jacc.PolicyContextException
void addRoleToRole(java.lang.String role, java.lang.String mappedRole) throws javax.security.jacc.PolicyContextException
For example, using two roles 'manager' and 'employee', calling addRoleToRole( 'employee', 'manager' ) will ensure that managers can do anything employees can do since they will have all the permissions associated with employees.
role
- The role whose permissions we want to map to.mappedRole
- This is the role to be mapped to the specified role.
javax.security.jacc.PolicyContextException
void removeAuthenticatedUsersFromRole(java.lang.String role) throws javax.security.jacc.PolicyContextException
role
- The specified role from which to remove the all authenticated meta-user.
javax.security.jacc.PolicyContextException
void removeEveryoneFromRole(java.lang.String role) throws javax.security.jacc.PolicyContextException
role
- The specified role from which to remove the everyone meta-user.
javax.security.jacc.PolicyContextException
void removeGroupsFromRole(java.lang.String role, java.util.List<java.lang.String> groups) throws javax.security.jacc.PolicyContextException
role
- The role from which to remove groups from.groups
- A list containing the String names of groups to be removed from
the specified role.
javax.security.jacc.PolicyContextException
void removeUsersFromRole(java.lang.String role, java.util.List<java.lang.String> users) throws javax.security.jacc.PolicyContextException
role
- The role from which to remove users from.users
- A list containing the String names of users to be removed
from the specified role.
javax.security.jacc.PolicyContextException
void removeRoleFromRole(java.lang.String role, java.lang.String mappedRole) throws javax.security.jacc.PolicyContextException
role
- The role to remove a mapped role from.mappedRole
- The mapped role to remove from the specified role.
javax.security.jacc.PolicyContextException
boolean isAuthenticatedUsersInRole(java.lang.String role)
role
- The role to check if all authenticated users have access to.
boolean isEveryoneInRole(java.lang.String role)
role
- The role to check if everyone has access to.
java.util.List<java.lang.String> getUsersInRole(java.lang.String role)
role
- The role to look up to return a list of users for.
java.util.List<java.lang.String> getGroupsInRole(java.lang.String role)
role
- The role to return a list of groups for.
void commit() throws javax.security.jacc.PolicyContextException
javax.security.jacc.PolicyContextException
void delete() throws javax.security.jacc.PolicyContextException
javax.security.jacc.PolicyContextException
java.util.Set<java.lang.String> getRoles()
java.util.List<java.lang.String> getRolesInRole(java.lang.String role)
role
- The role to look up to return a list of roles for.
boolean removeRole(java.lang.String role) throws javax.security.jacc.PolicyContextException
role
- The role to remove
javax.security.jacc.PolicyContextException
- If the role is a J2EE deployed and therefore required roleboolean isRequiredRole(java.lang.String role)
role
- The role to check
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |