You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit introduces a new style Role Based Access Control framework
for cubes. User can now define `accessPolicies` on Cubes and Views which
will be evaluated into `queryRewrite` and visibility rules.
This commit introduces a new config: `contextToRoles(context):
string[]`. It should return a list of user role names based on the
request context. Access Policies are defined per Cube x Role name like
```
access_policy:
- role: "manager"
conditions:
- if "{ security_context.isNotSuspended }"
row_level:
filters:
- member: `access_level`
operator: lt
values: [2]
member_level:
includes: "*"
excludes: [`top_secret_field`]
```
Each policy can define a `row_level` and `member_level` rules.
Row level rules can be defined as a list of filters or `allow_all: true`
Member level rules should specify a list of "included" members that the
user with a given role is allowed to see.
When evaluating Cube and View level policies:
- row level filters are joined via AND (least permissive policy wins)
- member level policy at the view always wins (you can expose a hidden
member of a Cube on a View)
Policies can reference `security_context` (lowercase) when evaluating
policy conditions and filter values.
0 commit comments