Limitations/rules: adding roles to a subject

When adding a role to a subject, the application applies rules binding the type and role of the modification-initiating subject to the target type of the subject being assigned the role.

By adding roles, you can dynamically (during execution) expand the permissions of subjects.

The add_role element can contain multiple rules. Rules are applied sequentially (the order is important) until the first rule that does not conflict with the combination of source_type, source_role, and target_type values is found. In other words, to apply a rule, the following is required:

Options for assigning a type to the subject that initiated addition of roles (source_type element):

Options for assigning a role to the subject that initiated addition of roles (source_role element):

Options for assigning the original type to the target subject (target_type element):

Options for assigning permissible roles to the target subject (target_role element):

Example

add_role : [

{ source_type: dispatcher

, source_role: system

, target_type: [auditservice, fileservice]

, target_role: [user, admin]

},

]

Page top