Skip to content

Commit 752ed97

Browse files
authored
Merge pull request #2 from anton-bobkov/docs-feature-security-cluster-scheme
Replaced the cluster scheme diagram with a directory structure
2 parents 28b00b8 + 5d8cfeb commit 752ed97

File tree

9 files changed

+102
-204
lines changed

9 files changed

+102
-204
lines changed

ydb/docs/en/core/concepts/datamodel/index.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
1-
# Data model and schema
1+
# Cluster structure
22

3-
This section describes the entities that {{ ydb-short-name }} uses within DBs. The {{ ydb-short-name }} core lets you flexibly implement various storage primitives, so new entities may appear in the future.
3+
This section describes the {{ ydb-short-name }} entities.
44

5-
{{ ydb-short-name }} is a relational database where the data is stored in [tables](table.md) with each table consisting of rows and columns. Database objects in {{ ydb-short-name }} can be organized into a hierarchy of [folders](dir.md).
5+
## {{ ydb-short-name }} cluster scheme {#cluster-scheme}
6+
7+
{{ ydb-short-name }} cluster scheme is a hierarchical namespace of a {{ ydb-short-name }} cluster. The only root element of this namespace is a **cluster scheme root**. A root of the cluster scheme can be a directory or a root database. Children elements of the cluster scheme root can be [databases](../../concepts/glossary.md#database) or other [scheme objects](../../concepts/glossary.md#scheme-object). Scheme objects can use nested directories to form a hierarchy.
8+
9+
```plaintext
10+
Cluster scheme root/
11+
├── Database 1/
12+
│ ├── Table 1
13+
│ ├── Directory 1/
14+
│ │ ├── Table 2
15+
│ │ └── Table 3
16+
│ └── Directory 2/
17+
│ ├── Directory 3/
18+
│ │ └── ...
19+
│ └── ...
20+
└── Database 2/
21+
└── ...
22+
```
23+
24+
## Data model
25+
26+
Scheme objects in {{ ydb-short-name }} databases:
627

728
* [Folder](dir.md)
829
* [Table](table.md)

ydb/docs/en/core/concepts/glossary.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@ Like in most database management systems, a **database** in {{ ydb-short-name }}
1818

1919
Another essential characteristic of {{ ydb-short-name }} databases is that they typically have dedicated compute resources allocated to them. Hence, creating an additional database is usually done externally by [DevOps engineers](../devops/index.md) or automation rather than via a SQL query.
2020

21+
{{ ydb-short-name }} has the following database types:
22+
23+
- [tenant databases](#tenant-database)
24+
- [root databases](#root-database)
25+
26+
#### Tenant database {#tenant-database}
27+
28+
A **tenant database** is a logical container with an independent namespace for user-defined objects within the database.
29+
30+
Tenant databases are completely isolated from each other — they are processed by separate [database nodes](#database-node), they have separate [storage groups](#storage-group), and they can have separate [users](#access-user) with different [access rights](#access-right) and [access levels](#access-level).
31+
2132
#### Root database {#root-database}
2233

23-
A **root database** is a system database created for {{ ydb-short-name }}'s internal purposes at the root of the cluster scheme. This database contains service data such as [users], [access levels](#access-level) and [access rights](#access-right), tenant databases, and more.
34+
A **root database** is a system database created for {{ ydb-short-name }}'s internal purposes at the [root of the cluster scheme](#scheme-root). This database contains service data such as [users](#access-user), [access levels](#access-level) and [access rights](#access-right), [tenant databases](#tenant-database), and more.
2435

2536
### Node {#node}
2637

@@ -263,6 +274,22 @@ An **authentication token** or **auth token** is a token that {{ ydb-short-name
263274

264275
{{ ydb-short-name }} supports various [authentication modes](../security/authentication.md) and token types.
265276

277+
### Cluster scheme {#scheme}
278+
279+
A **{{ ydb-short-name }} cluster scheme** is a hierarchical namespace of a {{ ydb-short-name }} cluster. The only root element of this namespace is a [cluster scheme root](#scheme-root). A root of the cluster scheme can be a [directory](#folder) or a [root database](#root-database). Children elements of the cluster scheme root can be [databases](#database) or other [scheme objects](#scheme-object). Scheme objects can use nested directories to form a hierarchy.
280+
281+
### Database scheme {#scheme-database}
282+
283+
A **database scheme** is a subset of the hierarchical namespace of a {{ ydb-short-name }} cluster that belongs to a database.
284+
285+
### Database root {#scheme-database-root}
286+
287+
A **database root** is a path to a database in a {{ ydb-short-name }} cluster scheme. This path acts as a root for database scheme objects.
288+
289+
### Scheme root {#scheme-root}
290+
291+
A **scheme root** is a root element of a [{{ ydb-short-name }} cluster scheme](datamodel/index.md#cluster-scheme). Children elements of the cluster scheme root can be [databases](#database) or other [scheme objects](#scheme-object).
292+
266293
### Scheme object {#scheme-object}
267294

268295
A database schema consists of **scheme objects**, which can be databases, [tables](#table) (including [external tables](#external-table)), [topics](#topic), [folders](#folder), and so on.

ydb/docs/en/core/reference/configuration/auth_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Default value: `true`
2424
Valid values:
2525

2626
- `true` – internal users are added only to the [root database](../../concepts/glossary.md#root-database).
27-
- `false` – internal users are added to the root and to tenant databases.
27+
- `false` – internal users are added to the root and to [tenant databases](../../concepts/glossary.md#tenant-database).
2828

2929
Default value: `true`
3030
||

ydb/docs/en/core/reference/configuration/index.md

+1-163
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ When deploying {{ ydb-short-name }} with a Kubernetes operator, the entire `host
125125

126126
## domains_config: Cluster domain {#domains-config}
127127

128-
This section contains the configuration of the {{ ydb-short-name }} cluster root domain, including the [Blob Storage](#domains-blob) (binary object storage), [State Storage](#domains-state), and [authentication](#auth) configurations.
128+
This section contains the configuration of the {{ ydb-short-name }} cluster root domain, including the [Blob Storage](#domains-blob) (binary object storage) and [State Storage](#domains-state) configurations.
129129

130130
### Syntax
131131

@@ -207,168 +207,6 @@ Each State Storage client (for example, DataShard tablet) uses `nto_select` node
207207

208208
Odd numbers must be used for `nto_select` because using even numbers does not improve fault tolerance in comparison to the nearest smaller odd number.
209209

210-
## Authentication configuration {#auth}
211-
212-
The [authentication mode](../../security/authentication.md) in the {{ ydb-short-name }} cluster is created in the `domains_config.security_config` section.
213-
214-
### Syntax
215-
216-
```yaml
217-
domains_config:
218-
...
219-
security_config:
220-
# authentication mode settings
221-
enforce_user_token_requirement: false
222-
enforce_user_token_check_requirement: false
223-
default_user_sids: <SID list for anonymous requests>
224-
all_authenticated_users: <group SID for all authenticated users>
225-
all_users_group: <group SID for all users>
226-
227-
# initial security settings
228-
default_users: <initial list of users>
229-
default_groups: <initial list of groups>
230-
default_access: <initial permissions>
231-
232-
# настройки привилегий
233-
viewer_allowed_sids: <list of SIDs enabled for YDB UI access>
234-
monitoring_allowed_sids: <list of SIDs enabled for tablet administration>
235-
administration_allowed_sids: <list of SIDs enabled for storage administration>
236-
register_dynamic_node_allowed_sids: <list of SIDs enabled for database node registration>
237-
...
238-
```
239-
240-
| Key | Description |
241-
--- | ---
242-
| `enforce_user_token_requirement` | Require a user token.<br/>Acceptable values:<br/><ul><li>`false`: Anonymous authentication mode, no token needed (used by default if the parameter is omitted).</li><li>`true`: Username/password authentication mode. A valid user token is needed for authentication.</li></ul> |
243-
244-
### Examples {#domains-examples}
245-
246-
{% list tabs %}
247-
248-
- `block-4-2`
249-
250-
```yaml
251-
domains_config:
252-
domain:
253-
- name: Root
254-
storage_pool_types:
255-
- kind: ssd
256-
pool_config:
257-
box_id: 1
258-
erasure_species: block-4-2
259-
kind: ssd
260-
pdisk_filter:
261-
- property:
262-
- type: SSD
263-
vdisk_kind: Default
264-
state_storage:
265-
- ring:
266-
node: [1, 2, 3, 4, 5, 6, 7, 8]
267-
nto_select: 5
268-
ssid: 1
269-
270-
271-
- `mirror-3-dc`
272-
273-
```yaml
274-
domains_config:
275-
domain:
276-
- name: global
277-
storage_pool_types:
278-
- kind: ssd
279-
pool_config:
280-
box_id: 1
281-
erasure_species: mirror-3-dc
282-
kind: ssd
283-
pdisk_filter:
284-
- property:
285-
- type: SSD
286-
vdisk_kind: Default
287-
state_storage:
288-
- ring:
289-
node: [1, 2, 3, 4, 5, 6, 7, 8, 9]
290-
nto_select: 9
291-
ssid: 1
292-
```
293-
294-
- `none` (without fault tolerance)
295-
296-
```yaml
297-
domains_config:
298-
domain:
299-
- name: Root
300-
storage_pool_types:
301-
- kind: ssd
302-
pool_config:
303-
box_id: 1
304-
erasure_species: none
305-
kind: ssd
306-
pdisk_filter:
307-
- property:
308-
- type: SSD
309-
vdisk_kind: Default
310-
state_storage:
311-
- ring:
312-
node:
313-
- 1
314-
nto_select: 1
315-
ssid: 1
316-
```
317-
318-
- Multiple pools
319-
320-
```yaml
321-
domains_config:
322-
domain:
323-
- name: Root
324-
storage_pool_types:
325-
- kind: ssd
326-
pool_config:
327-
box_id: '1'
328-
erasure_species: block-4-2
329-
kind: ssd
330-
pdisk_filter:
331-
- property:
332-
- {type: SSD}
333-
vdisk_kind: Default
334-
- kind: rot
335-
pool_config:
336-
box_id: '1'
337-
erasure_species: block-4-2
338-
kind: rot
339-
pdisk_filter:
340-
- property:
341-
- {type: ROT}
342-
vdisk_kind: Default
343-
- kind: rotencrypted
344-
pool_config:
345-
box_id: '1'
346-
encryption_mode: 1
347-
erasure_species: block-4-2
348-
kind: rotencrypted
349-
pdisk_filter:
350-
- property:
351-
- {type: ROT}
352-
vdisk_kind: Default
353-
- kind: ssdencrypted
354-
pool_config:
355-
box_id: '1'
356-
encryption_mode: 1
357-
erasure_species: block-4-2
358-
kind: ssdencrypted
359-
pdisk_filter:
360-
- property:
361-
- {type: SSD}
362-
vdisk_kind: Default
363-
state_storage:
364-
- ring:
365-
node: [1, 16, 31, 46, 61, 76, 91, 106]
366-
nto_select: 5
367-
ssid: 1
368-
```
369-
370-
{% endlist %}
371-
372210
## Actor system {#actor-system}
373211

374212
The CPU resources are mainly used by the actor system. Depending on the type, all actors run in one of the pools (the `name` parameter). Configuring is allocating a node's CPU cores across the actor system pools. When allocating them, please keep in mind that PDisks and the gRPC API run outside the actor system and require separate resources.

ydb/docs/en/core/security/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This section of {{ ydb-short-name }} documentation covers security-related aspec
88

99
When a [user](../concepts/glossary.md#access-user) connects to a {{ ydb-short-name }} database, {{ ydb-short-name }} first identifies the user's account. This process is called [authentication](./authentication.md). Based on the authentication data, a user then goes through [authorization](./authorization.md) — a process that verifies whether a user has sufficient [access rights](../concepts/glossary.md#access-right) and [access levels](../concepts/glossary.md#access-level) to perform user operations.
1010

11-
{{ ydb-short-name }} supports both internal [users](./authorization.md#user) and external users from third-party directory services. After passing [authentication](./authentication.md), a {{ ydb-short-name }} cluster identifies users by [SIDs](./authorization.md#sid). A SID is a string that contains a username and auth domain.
11+
{{ ydb-short-name }} supports both internal [users](./authorization.md#user) and external users from third-party directory services. After passing [authentication](./authentication.md), a user gets a [SID](./authorization.md#sid) that the {{ ydb-short-name }} cluster uses for user identification and access control.
1212

1313
[Access rights](./authorization.md#right) in {{ ydb-short-name }} are tied to [access objects](../concepts/glossary.md#access-object) using [access control lists (ACL)](../concepts/glossary.md#access-control-list). The ACL format is described in [{#T}](./short-access-control-notation.md).
1414

15-
{{ ydb-short-name }} uses [access level lists](../concepts/glossary.md#access-level-list) to manage [access subject](../concepts/glossary.md#access-subject) privileges that are not related to [scheme objects](../concepts/glossary.md#scheme-object).
15+
{{ ydb-short-name }} uses [access levels](../concepts/glossary.md#access-level) to manage [access subject](../concepts/glossary.md#access-subject) privileges that are not related to [scheme objects](../concepts/glossary.md#scheme-object). Access levels are granted to users in [access level lists](../concepts/glossary.md#access-level-list).
1616

1717
[Built-in security](./builtin-security.md) is configured automatically by default when the {{ ydb-short-name }} cluster is started for the first time. This process adds a [superuser](./builtin-security.md#superuser) and a set of [roles](./builtin-security.md#role) for convenient user access management.
1818

ydb/docs/ru/core/concepts/datamodel/index.md

+18-29
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,29 @@
1-
# Модель данных и схема
1+
# Структура кластера
22

3-
В разделе собраны описания сущностей, которыми оперирует {{ ydb-short-name }} в рамках БД. Ядро {{ ydb-short-name }} позволяет гибко реализовывать различные примитивы хранения, поэтому возможно появление в будущем новых сущностей.
3+
В разделе собраны описания сущностей, которыми оперирует {{ ydb-short-name }}.
44

55
## Схема кластера {{ ydb-short-name }} {#cluster-scheme}
66

7-
Схема кластера {{ ydb-short-name }} — логическая древовидная структура кластера {{ ydb-short-name }}. Корневым элементом схемы кластера {{ ydb-short-name }} является **корень схемы кластера**. Дочерними элементами корня схемы кластера являются [базы данных](../../concepts/glossary.md#database). В свою очередь базы данных содержат [схемные объекты](../../concepts/glossary.md#scheme-object), которые образуют произвольную иерархию с помощью вложенных директорий.
8-
9-
```mermaid
10-
flowchart
11-
12-
subgraph Корень схемы кластера
13-
subgraph База данных 1
14-
o1[Схемный объект 1]
15-
o2[Схемный объект 2]
16-
el1[...]
17-
o3[Схемный объект N]
18-
end
19-
subgraph База данных 2
20-
o4[Схемный объект 1]
21-
o5[Схемный объект 2]
22-
el2[...]
23-
o6[Схемный объект N]
24-
end
25-
subgraph База данных N
26-
o7[Схемный объект 1]
27-
o8[Схемный объект 2]
28-
el3[...]
29-
o9[Схемный объект N]
30-
end
31-
end
32-
7+
Схема кластера {{ ydb-short-name }} — это иерархическое пространство имён кластера {{ ydb-short-name }}. Единственным корневым элементом этого пространства имён является **корень схемы кластера**. Корнем схемы кластера может выступать как директория, так и корневая база. Дочерними элементами корня схемы кластера выступают [базы данных](../../concepts/glossary.md#database) или другие [схемные объекты](../../concepts/glossary.md#scheme-object), которые образуют произвольную иерархию с помощью вложенных директорий.
8+
9+
```plaintext
10+
Корень схемы кластера/
11+
├── База данных 1/
12+
│ ├── Таблица 1
13+
│ ├── Директория 1/
14+
│ │ ├── Таблица 2
15+
│ │ └── Таблица 3
16+
│ └── Директория 2/
17+
│ ├── Директория 3/
18+
│ │ └── ...
19+
│ └── ...
20+
└── База данных 2/
21+
└── ...
3322
```
3423

3524
## Модель данных
3625

37-
{{ ydb-short-name }} – это реляционная база данных, в которой данные хранятся в таблицах, состоящих из рядов и колонок. Объекты баз данных {{ ydb-short-name }} могут быть организованы в иерархию директорий.
26+
Схемные объекты баз данных {{ ydb-short-name }}:
3827

3928
* [Директории](dir.md)
4029
* [Таблицы](table.md)

0 commit comments

Comments
 (0)