Skip to content

Commit e72b547

Browse files
committed
Rebase changes
1 parent 554bfc4 commit e72b547

24 files changed

+581
-234
lines changed

docs/pages/guides/recipes/multitenancy/custom-data-model-per-tenant.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ module.exports = {
6767

6868
## Data modeling
6969

70-
### Customizing publicity
70+
### Customizing member-level access
7171

72-
The simplest way to customize the data models is by changing the [publicity][ref-publicity]
73-
of data model entities. It works great for use cases when tenants share parts of
72+
The simplest way to customize the data models is by changing the [member-level access][ref-mls]
73+
to data model entities. It works great for use cases when tenants share parts of
7474
their data models.
7575

7676
By setting the `public` parameter of [cubes][ref-cubes-public], [views][ref-views-public],
@@ -168,7 +168,7 @@ cube(`cube_x`, {
168168

169169
</CodeTabs>
170170

171-
For your convenience, [Playground][ref-playground] ignores publicity configration
171+
For your convenience, [Playground][ref-playground] ignores member-level access configration
172172
and marks data model entities that are not accessible for querying through
173173
[APIs][ref-apis] with the lock icon.
174174

@@ -182,8 +182,8 @@ And here's the *perspective* of `Bob`:
182182

183183
### Customizing other parameters
184184

185-
Similarly to [customizing publicity](#customizing-publicity), you can set other
186-
parameters of data model entities for each tenant individually:
185+
Similarly to [customizing member-level access](#customizing-member-level-access),
186+
you can set other parameters of data model entities for each tenant individually:
187187

188188
- By setting `sql` or [`sql_table` parameters][ref-cube-sql-table] of cubes, you
189189
can ensure that each tenant accesses data from its own tables or database schemas.
@@ -364,7 +364,7 @@ code that fetches data model files for each tenant.
364364
[ref-scheduled-refresh-contexts]: /reference/configuration/config#scheduled_refresh_contexts
365365
[ref-context-to-app-id]: /reference/configuration/config#context_to_app_id
366366
[ref-config-files]: /product/configuration#cubepy-and-cubejs-files
367-
[ref-publicity]: /product/data-modeling/concepts/publicity
367+
[ref-mls]: /product/auth/member-level-security
368368
[ref-cubes-public]: /reference/data-model/cube#public
369369
[ref-views-public]: /reference/data-model/view#public
370370
[ref-measures-public]: /reference/data-model/measures#public

docs/pages/guides/style-guide.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ cube_project
7070
- `description`
7171
- `public`
7272
- `refresh_key`
73+
- `meta`
7374
- `pre_aggregations`
7475
- `joins`
7576
- `dimensions`
7677
- `hierarchies`
7778
- `segments`
7879
- `measures`
80+
- `access_policy`
7981

8082
### Dimensions & measures
8183

@@ -141,6 +143,7 @@ cubes:
141143
- `public`
142144
- `cubes`
143145
- `folders`
146+
- `access_policy`
144147

145148
### Example view
146149

docs/pages/product/_meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
"configuration": "Configuration",
55
"data-modeling": "Data modeling",
66
"caching": "Caching",
7-
"auth": "Authentication & authorization",
7+
"auth": "Access control",
88
"apis-integrations": "APIs & integrations",
99
"workspace": "Workspace",
1010
"deployment": "Deployment",

docs/pages/product/auth.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
---
2-
redirect_from:
3-
- /security
4-
---
5-
6-
# Overview
1+
# Access control
72

83
In Cube, authorization (or access control) is based on the **security context**.
94
The diagram below shows how it works during the request processing in Cube:

docs/pages/product/auth/_meta.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
2-
"context": "Security context"
2+
"context": "Security context",
3+
"member-level-security": "Member-level security",
4+
"row-level-security": "Row-level security",
5+
"data-access-policies": "Data access policies"
36
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Data access policies
2+
3+
TODO
4+
5+
## Data access roles
6+
7+
TODO
8+
9+
## Member-level access
10+
11+
TODO
12+
13+
14+
```
15+
Привет! Можешь проверить, что я правильно мыслю? Снова access policies.
16+
Вот есть такие политики. Для пользователя с ролью status_checker_2_3_4 она ожидаемо делает доступным куб и все его мемберы.
17+
access_policy:
18+
- role: "*"
19+
member_level:
20+
includes: []
21+
22+
- role: status_checker_2_3_4
23+
member_level:
24+
includes: '*'
25+
А вот такие политики (поменял includes на excludes) для пользователя с ролью status_checker_2_3_4
26+
access_policy:
27+
- role: "*"
28+
member_level:
29+
excludes: '*'
30+
31+
- role: status_checker_2_3_4
32+
member_level:
33+
includes: '*'
34+
```
35+
36+
37+
38+
написать, что public takes preference
39+
40+
41+
написать, что вьюшки не наследуют mls от кубов
42+
43+
When evaluating Cube and View level policies:
44+
- member level policy at the view always wins (you can expose a hidden
45+
member of a Cube on a View)
46+
47+
## Row-level access
48+
49+
TODO

docs/pages/product/data-modeling/concepts/publicity.mdx renamed to docs/pages/product/auth/member-level-security.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Publicity of data model entities
1+
# Member-level security
22

33
The data model serves as a facade of your data and enables running
44
[queries][ref-queries] via a [rich set of APIs][ref-apis] by referencing data
@@ -10,7 +10,7 @@ By default, all cubes, views, measures, dimensions, and segments are *public*,
1010
meaning that they can be used in API queries and they are visible during data
1111
model introspection.
1212

13-
## Managing publicity
13+
## Managing member-level access
1414

1515
You can explicitly make a data model entity public or private by setting its
1616
`public` parameter to `true` or `false`. This parameter is available for
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Row-level security
2+
3+
TODO

docs/pages/product/configuration.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ Cube can be run in an insecure, development mode by setting the
152152
mode does the following:
153153

154154
- Disables authentication checks.
155-
- Disables access control checks based on the [publicity][ref-data-model-publicity]
156-
of data model entities.
155+
- Disables [member-level access control][ref-mls].
157156
- Enables Cube Store in single instance mode.
158157
- Enables background refresh for in-memory cache and [scheduled
159158
pre-aggregations][link-scheduled-refresh].
@@ -177,6 +176,6 @@ of data model entities.
177176
[ref-dynamic-data-models]: /product/data-modeling/dynamic
178177
[ref-custom-docker-image]: /product/deployment/core#extend-the-docker-image
179178
[link-docker-env-vars]: https://docs.docker.com/compose/environment-variables/set-environment-variables/
180-
[ref-data-model-publicity]: /product/data-modeling/concepts/publicity
179+
[ref-mls]: /product/auth/member-level-security
181180
[link-current-python-version]: https://github.com/cube-js/cube/blob/master/packages/cubejs-docker/latest.Dockerfile#L13
182181
[link-current-nodejs-version]: https://github.com/cube-js/cube/blob/master/packages/cubejs-docker/latest.Dockerfile#L1

0 commit comments

Comments
 (0)