Class RoleManagementRules
roleName is role's unique identification which is used in the configuration file perun-roles.yml primaryObject serves to determine with which object is the role primarily connected. Other objects are just complementary. privilegedRolesToManage serves to determine which roles (in relation to which objects) a user/group has to have, to have rights to set/unset the role to other users/groups. It is a list of maps where each map entry consists from a role name as a key and a role object as a value. Relation between each map in the list is logical OR and relation between each entry in the map is logical AND. Example list - (Map1, Map2...) Example map - key: VOADMIN ; value: Vo key: GROUPADMIN ; value: Group privilegedRolesToRead is same as the privilegedRolesToManage, but its purpose is to determine which roles have rights to read the roleName. entitiesToManage is a map of entities which can be set to the role. Key is a entity name and value is mapping to the database. Example entry: key: User; value: user_id assignedObjects is a map of objects which can be assigned with the role. Key is a object name and value is mapping to the database. Example entry: key: Resource; value: resource_id assignmentCheck is a list of maps defining which of the assigned objects should be checked for being critical (requiring MFA) when setting the role. Example entry: key: MFA; value: Resource invalid input: '<'- If resource is critical, MFA is required Example entry: {} invalid input: '<'- No MFA is required to set this role Example entry: Key: MFA; value: invalid input: '<'- No value means MFA is always required to set this role associatedReadRoles is a list of related roles which are authorized to read attribute value if the main role is authorized. Example list for groupadmin role - value: [GROUPOBSERVER] assignableToAttributes is a flag that determines whether the role can appear in attribute policies. skipMFA is a flag that whether the role should skip MFA check. mfaCriticalRole is a flag marking roles always requiring MFA from users having that role displayName is a more user-friendly name receiveNotifications contains names of objects for which the role should get notifications Example value: Vo ; meaning: will receive notifications when vo application is created/failed
-
Constructor Summary
ConstructorsConstructorDescriptionRoleManagementRules
(String roleName, String primaryObject, List<Map<String, String>> privilegedRolesToManage, List<Map<String, String>> privilegedRolesToRead, Map<String, String> entitiesToManage, Map<String, String> assignedObjects, List<Map<String, String>> assignmentCheck, List<String> associatedReadRoles, boolean assignableToAttributes, boolean skipMFA, boolean mfaCriticalRole, String displayName, List<String> receiveNotifications) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
int
hashCode()
boolean
boolean
void
setAssignableToAttributes
(boolean assignableToAttributes) void
setAssignedObjects
(Map<String, String> assignedObjects) void
setAssignmentCheck
(List<Map<String, String>> assignmentCheck) void
setAssociatedReadRoles
(List<String> associatedReadRoles) void
setDisplayName
(String displayName) void
setEntitiesToManage
(Map<String, String> entitiesToManage) void
setMfaCriticalRole
(boolean mfaCriticalRole) void
setPrimaryObject
(String primaryObject) void
setPrivilegedRolesToManage
(List<Map<String, String>> privilegedRolesToManage) void
setPrivilegedRolesToRead
(List<Map<String, String>> privilegedRolesToRead) void
setReceiveNotifications
(List<String> receiveNotifications) void
setRoleName
(String roleName) void
setSkipMFA
(boolean skipMFA) toString()
-
Constructor Details
-
RoleManagementRules
public RoleManagementRules(String roleName, String primaryObject, List<Map<String, String>> privilegedRolesToManage, List<Map<String, String>> privilegedRolesToRead, Map<String, String> entitiesToManage, Map<String, String> assignedObjects, List<Map<String, String>> assignmentCheck, List<String> associatedReadRoles, boolean assignableToAttributes, boolean skipMFA, boolean mfaCriticalRole, String displayName, List<String> receiveNotifications)
-
-
Method Details
-
equals
-
getAssignedObjects
-
setAssignedObjects
-
getAssignmentCheck
-
setAssignmentCheck
-
getAssociatedReadRoles
-
setAssociatedReadRoles
-
getDisplayName
-
setDisplayName
-
getEntitiesToManage
-
setEntitiesToManage
-
getPrimaryObject
-
setPrimaryObject
-
getPrivilegedRolesToManage
-
setPrivilegedRolesToManage
-
getPrivilegedRolesToRead
-
setPrivilegedRolesToRead
-
getReceiveNotifications
-
setReceiveNotifications
-
getRoleName
-
setRoleName
-
hashCode
public int hashCode() -
isAssignableToAttributes
public boolean isAssignableToAttributes() -
setAssignableToAttributes
public void setAssignableToAttributes(boolean assignableToAttributes) -
isMfaCriticalRole
public boolean isMfaCriticalRole() -
setMfaCriticalRole
public void setMfaCriticalRole(boolean mfaCriticalRole) -
setSkipMFA
public void setSkipMFA(boolean skipMFA) -
getSkipMFA
public boolean getSkipMFA() -
toString
-