Validate ABAC Rule
POST /obp/v7.0.0/management/abac-rules/validate
OBPv6.0.0-validateAbacRule Roles: CanCreateAbacRule ABAC
Validate ABAC rule code syntax and structure without creating or executing the rule.
This endpoint performs the following validations:
- Parse the rule_code as a Scala expression
- Validate syntax - check for parsing errors
- Validate field references - check if referenced objects/fields exist
- Check type consistency - verify the expression returns a Boolean
Available ABAC Context Objects:
- AuthenticatedUser - The user who is logged in
- OnBehalfOfUser - Optional delegation user
- User - Target user being evaluated
- Bank, Account, View, Transaction, TransactionRequest, Customer
- Attributes for each entity (e.g., userAttributes, accountAttributes)
Documentation:
- here - Getting started with ABAC rules
- here - Complete list of all 18 parameters
- here - Detailed property reference
This is a "dry-run" validation that does NOT save or execute the rule.
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
JSON request body fields (1)
- rule_code
- rule_code
JSON response body fields (2)
- message
- 123456
- valid
- valid
Example request body
{
"rule_code": "AuthenticatedUser.user_id == Account.owner_id"
}Example success response
{
"valid": true,
"message": "ABAC rule code is valid"
}Possible errors (4)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-10001: Incorrect json format.
- OBP-50000: Unknown Error.