Validation for RBAC rule creation and update
The system validates RBAC rule requests during rule creation and update operations to ensure data integrity and consistency. These validations are performed:
- Permission validation
The system requires at least one permission entry in the request. Each referenced category must exist within the use case definition, and each permission value must be a recognized permission supported by the system.
- Attribute condition validation
The system validates attribute conditions against the document entity schema defined for the use case. Each attribute key must exist in the schema. For attributes that use a dropdown data type, the system validates condition values against the allowed options configured for that attribute. A rule succeeds only when at least one attribute condition is defined. The absence of attribute conditions results in no documents being returned.
- Operator validation
The system verifies that each condition uses a supported operator. Valid operators include EQUALS, NOT_EQUALS, IN, and NOT_IN. For IN and NOT_IN operators, the system requires the condition value to be defined as an array.
- Logical operator validation
The system requires a logical operator (AND or OR) between consecutive conditions. The last condition in the sequence does not require a logical operator.
- Duplicate handling
The system removes duplicate permissions within a category. The system also removes duplicate conditions that use the same source and attribute key.
- Rule uniqueness validation
The system enforces a uniqueness constraint for each combination of use case, principal type, and principal value. The system rejects attempts to create a rule that duplicates an existing combination and returns an error response.
Permission enforcement by operation
The system enforces permissions based on the operation performed on a document. The system checks the user's effective permissions against the specific operation being performed:
- Document read operation
The system requires the user to have at least one permission defined for the document’s current category to allow the document read operation.
- Full update operation
The system requires the submit permission for the document’s current category when processing a full update request (PUT).
- Partial update operation
The system enforces permissions based on the type of update performed during a partial update request (PATCH). The system requires edit_document_fields or update_fields when the request modifies entity fields. The system requires edit_table_data or update_fields when the request modifies table data. The system requires the archive permission when the request sets the archive flag to true.
- Category move operation
The system requires the move permission for the source category of the document. The system also requires at least one permission for the destination category. The system denies the operation when either condition is not satisfied.
- Bulk update operation
The system evaluates each document independently during a bulk update request. The system requires the archive permission for archiving operations, the move permission for category change operations, and the update_fields permission for field-level updates, including reprocessing, visibility updates, and user assignment changes.
Rule update behavior
The system supports two methods for updating RBAC rules: full update using the PUT operation and partial update using the PATCH operation. Each method follows a defined behavior for handling rule data, including permissions, conditions, and concurrency.
- Full update behavior (PUT)
The system treats a PUT request as a complete replacement of the RBAC rule. The request must include all rule fields, including permissions and conditions. The system removes existing conditions when the request does not include condition data.
- Partial update behavior (PATCH)
The system updates only the fields provided in a PATCH request. However, when the request includes permissions or conditions, the system replaces the entire existing set for the corresponding field. The system does not merge permissions or conditions during a PATCH operation. The system retains existing permissions and conditions only when the request does not include those fields
- Permissions and condition replacement
The system never merges permission or condition arrays during updates. When a rule contains permissions for multiple categories and the update request includes permissions for a subset of categories, the system replaces the entire existing permission set with the provided values. The same behavior applies to condition arrays. To prevent unintended data removal, the client application must retrieve the current rule definition, modify the complete array, and submit the full updated array in the request
- Concurrent update handling
The system uses optimistic locking to manage concurrent updates. When multiple administrators attempt to update the same RBAC rule simultaneously, the system processes the first request successfully and rejects subsequent conflicting requests with a conflict error. The client application must retrieve the latest version of the rule and resubmit the update request.
RBAC and the RPA-Admin role
The RPA-Admin role provides elevated privileges for administrative operations, but the system does not bypass RBAC permission enforcement when evaluating access to document content. The system applies RBAC evaluation consistently to all users, including users assigned to the RPA-Admin role.
The system allows RPA-Admin users to perform specific administrative operations that are not available to standard users.
- Rule management
Restrict RBAC rule management operations, including create, update, delete, and list, to users assigned to the RPA-Admin role.
- Delete operations
Perform document deletion operations, including both single-document and bulk deletion.
The system evaluates document access for RPA-Admin users by using the same RBAC evaluation process applied to all users. The system compares the user identity and group memberships against rule principals, evaluates attribute conditions, and determines effective permissions based on matching rules. The system denies access when no RBAC rule matches the user, even when the user is assigned to the RPA-Admin role.
RBAC API usage concepts
This section provides examples to use the RBAC APIs for creating rules and retrieving effective permissions.
Example:
This example creates a rule that grants the IFS Security Role "Approver" permission to view and submit documents in the "NEEDSVERIFICATION" category, but only for documents where the DIVISION field equals "US_EAST".
POST /api/v1/rpa/exception/usecasetypes/{id}/rbac/rules
Content-Type: application/json
{
"principal_type": "SECURITY_ROLE",
"principal_value": "Approver",
"principal_display_name": "Approver Role",
"active": true,
"grant_all_documents": false,
"permissions": [
{
"usecase_category": "NEEDSVERIFICATION",
"permissions": ["view_document", "submit"]
}
],
"conditions": [
{
"attribute_source": "DOCUMENT_ENTITY",
"attribute_key": "DIVISION",
"operator": "EQUALS",
"value": "US_EAST"
}
]
}
Example: Creating a rule with grant_all_document
To apply a rule to all documents in the use case type without filtering any specific attribute, set grant_all_document to true. When grant_all_document is enabled, any conditions on the rule are ignored. The following example grants a specific user full permissions across all categories for all documents:
{ "principal_type": "USER", "principal_value": "john.smith", "principal_display_name": "John Smith", "active": true, "grant_all_documents": true, "permissions": [ { "usecase_category": "MISSINGINFORMATION", "permissions": ["view_document", "edit_document_fields", "edit_table_data", "submit", "archive", "move"] }, { "usecase_category": "NEEDSVERIFICATION", "permissions": ["view_document", "edit_document_fields", "edit_table_data", "submit", "archive", "move"] } ] }
Example: Retrieving effective permissions
Any authenticated user can retrieve the effective permissions for a use case type. This is useful for the UI to determine which actions to display or enable for the current user.
GET /api/v1/rpa/exception/usecasetypes/{id}/rbac/permissions/{userId}