ABAC Operators¶
The following operators are available in Ranger for use in different policies:
Operator | Name | Usage |
---|---|---|
== | Equals to | USER._name == 'mark' |
!= | Not equals to | USER._name != 'mark' |
> | Greater than | USER.age > 18 |
< | Less than | USER.salary < 10000 |
>= | Greater than or equal to | USER.salary >= 10000 |
<= | Less than or equal to | USER.salary <= 10000 |
Logical Operators¶
The following logical operators are available in Ranger for use in different policies:
Operator | Name | Usage |
---|---|---|
&& | AND | (USER._name == 'mark') && (USER.location == 'US') |
|| | OR | (USER._name == 'mark') || (USER.location == 'US') |
! | Not | !(USER._name == 'mark') |
- Prev topic: ABAC Macros
- Next topic: Managing ABAC Policies