-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Feature:Security/AuthorizationPlatform Security - AuthorizationPlatform Security - AuthorizationTeam:SecurityPlatform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//
Description
Currently, our requiredPrivileges structure supports allRequired and anyRequired for defining authorization logic. However, there is a need to support more complex scenarios as (privilege1 AND privilege2) OR (privilege3 AND privilege4)
To achieve this we can extend anyRequired, which will allow for defining multiple AND conditions evaluated with OR logic:
security: {
authz: {
requiredPrivileges: [
{ anyRequired: [['privilege1', 'privilege2'], ['privilege3', 'privilege4']] }
]
}
}An array of arrays aka privilege groups where each inner group represents a set of privileges that must all be present (AND logic). The outer array represents OR logic between these groups.
So it will evaluate to: (privilege1 AND privilege2) OR (privilege3 AND privilege4)
The following needs to be done:
- Modify the security config interface to extend
anyRequireddefinition. - Implement logic to evaluate new
anyRequiredconditions. - Update existing documentation to include the new structure.
- Write tests to validate the logic.
Metadata
Metadata
Assignees
Labels
Feature:Security/AuthorizationPlatform Security - AuthorizationPlatform Security - AuthorizationTeam:SecurityPlatform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//