Skip to content

Commit 7e70b23

Browse files
azevaykinanton-bobkovblinkov
authored
Docs: authorization (#12771)
Co-authored-by: anton-bobkov <[email protected]> Co-authored-by: Ivan Blinkov <[email protected]>
1 parent 6bcf4a6 commit 7e70b23

File tree

49 files changed

+590
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+590
-201
lines changed

ydb/docs/en/core/concepts/_includes/connect_overlay/auth_choose.md

Whitespace-only changes.

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ The following authentication modes are supported:
88
* [Authentication through a third-party IAM provider](#iam), for example, [Yandex Identity and Access Management]{% if lang == "en" %}(https://cloud.yandex.com/en/docs/iam/){% endif %}{% if lang == "ru" %}(https://cloud.yandex.ru/docs/iam/){% endif %}.
99
* Authentication by [username and password](#static-credentials).
1010

11+
## Anonymous authentication
12+
13+
Anonymous authentication allows you to connect to {{ ydb-short-name }} without specifying any credentials like username and password. This type of access should be used only for educational purposes in local databases that cannot be accessed over the network.
14+
15+
To enable anonymous authentication, use `false` in the `enforce_user_token_requirement` key of the cluster's [configuration file](../reference/configuration/index.md#auth).
16+
1117
## Authentication through a third-party IAM provider {#iam}
1218

1319
* **Anonymous**: Empty token passed in a request.
@@ -35,23 +41,20 @@ The token to specify in request parameters can be obtained in the IAM system tha
3541

3642
When using modes in which the {{ ydb-short-name }} client accesses the IAM system, the IAM URL that provides an API for issuing tokens can be set additionally. By default, existing SDKs and CLIs attempt to access the {{ yandex-cloud }} IAM API hosted at `iam.api.cloud.yandex.net:443`.
3743

38-
{% include [overlay/auth_choose.md](_includes/connect_overlay/auth_choose.md) %}
39-
4044
## Authenticating by username and password {#static-credentials}
4145

42-
Authentication by username and password includes the following steps:
46+
This type of access implies that each database user has a username and password.
47+
Only digits and lowercase Latin letters can be used in usernames. Passwords are not restricted; even empty passwords can be used.
4348

44-
1. The client accesses the database and presents their username and password to the {{ ydb-short-name }} authentication service.
49+
The username and hashed password are stored in a table inside the authentication component. The password is hashed using the [Argon2](https://en.wikipedia.org/wiki/Argon2) method. In authentication mode, only the system administrator can use a username and password pair to access the table.
4550

46-
You can only use lower case Latin letters and digits in usernames. No restrictions apply to passwords (empty passwords can be used).
51+
A token is returned in response to the username and password. Tokens have a default lifetime of 12 hours. To rotate tokens, the client, such as the [SDK](../reference/ydb-sdk/index.md), independently accesses the authentication service. Tokens accelerate authentication and enhance security.
4752

53+
Authentication by username and password includes the following steps:
54+
55+
1. The client accesses the database and presents their username and password to the {{ ydb-short-name }} authentication service.
4856
1. The authentication service passes authentication data to the {{ ydb-short-name }} authentication component.
4957
1. The component validates authentication data. If the data matches, it generates a token and returns it to the authentication service.
50-
51-
Tokens accelerate authentication and strengthen security. Tokens have a default lifetime of 12 hours. YDB SDK rotates tokens by accessing the authentication service.
52-
53-
The username and hashed password are stored in the table inside the authentication component. The password is hashed by the [Argon2]{% if lang == "en" %}(https://en.wikipedia.org/wiki/Argon2){% endif %}{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Argon2){% endif %} method. In authentication mode, only the system administrator can use a username/password pair to access the table.
54-
5558
1. The authentication system returns the token to the client.
5659
1. The client accesses the database, presenting their token as authentication data.
5760

ydb/docs/redirects.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,15 @@ common:
184184

185185
# Security-related redirects
186186
- from: /cluster/access.md
187-
to: /security/acess-management.md
187+
to: /security/authorization.md
188188
- from: /cluster/audit-log.md
189189
to: /security/audit-log.md
190190
- from: /cluster/short-access-control-notation.md
191191
to: /security/short-access-control-notation.md
192+
- from: /concepts/auth.md
193+
to: /security/authentication.md
194+
- from: /security/access-management.md
195+
to: /security/authorization.md
192196

193197
# Contributors-related redirects
194198
- from: /development/build-ya.md
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% note info %}
2+
3+
Область действия команд `CREATE USER`, `ALTER USER`, `DROP USER` не распространяется на внешние каталоги пользователей.
4+
Учитывайте это, если к {{ ydb-short-name }} подключаются пользователи со сторонней аутентификацией (например, LDAP).
5+
Например, команда `CREATE USER` не создаст пользователя в LDAP-каталоге.
6+
Подробнее про [взаимодействие {{ ydb-short-name }} с LDAP-каталогом](../security/authentication.md#ldap-auth-provider).
7+
8+
{% endnote %}

ydb/docs/ru/core/changelog-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131

132132
* Реализована [Knn UDF](./yql/reference/udf/list/knn.md) для точного поиска ближайших векторов.
133133
* Разработан gRPC сервис QueryService, обеспечивающий возможность выполнения всех типов запросов (DML, DDL) и выборку неограниченных объёмов данных.
134-
* Реализована [интеграция с LDAP протоколом](./concepts/auth.md) и возможность получения перечня групп из внешних LDAP-каталогов.
134+
* Реализована [интеграция с LDAP протоколом](./security/authentication.md) и возможность получения перечня групп из внешних LDAP-каталогов.
135135

136136
### Встроенный UI
137137

ydb/docs/ru/core/concepts/_includes/connect_overlay/auth_choose.md

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Директория
22

3-
Для удобства организации поддерживается создание директорий по аналогии с файловой системой, то есть вся база состоит из дерева директорий, а таблицы и другие сущности находятся в листах этого дерева (аналогично файлам файловой системы). В одной директории могут быть несколько поддиректорий и несколько таблиц. Имена у сущностей внутри одной директории уникальны.
3+
Для удобства организации поддерживается создание [директорий](../../glossary.md#folder) по аналогии с файловой системой, то есть вся база состоит из дерева директорий, а [схемные объекты](../../glossary.md#scheme-object), например, таблицы, находятся в листах этого дерева. В одной директории могут быть несколько поддиректорий и несколько схемных объектов. Имена схемных объектов внутри одной директории уникальны.

ydb/docs/ru/core/concepts/federated_query/ydb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Для подключения к внешней базе {{ ydb-short-name }} со стороны другой базы {{ ydb-short-name }}, выступающей в роли движка обработки федеративных запросов, на последней требуется выполнить следующие шаги:
66

7-
1. Подготовить аутентификационные данные для доступа к удалённой базе {{ ydb-short-name }}. В настоящее время в федеративных запросах к {{ ydb-short-name }} доступен метод аутентификации по [логину и паролю](../../concepts/auth.md#static-credentials) (остальные методы не поддерживаются). Пароль к внешней базе сохраняется в виде [секрета](../datamodel/secrets.md):
7+
1. Подготовить аутентификационные данные для доступа к удалённой базе {{ ydb-short-name }}. В настоящее время в федеративных запросах к {{ ydb-short-name }} доступен метод аутентификации по [логину и паролю](../../security/authentication.md#static-credentials) (остальные методы не поддерживаются). Пароль к внешней базе сохраняется в виде [секрета](../datamodel/secrets.md):
88

99
```yql
1010
CREATE OBJECT ydb_datasource_user_password (TYPE SECRET) WITH (value = "<password>");
@@ -93,4 +93,4 @@ SELECT * FROM ydb_datasource.<table_name>
9393
|`Datetime`|`Datetime`|
9494
|`Timestamp`|`Timestamp`|
9595
|`Json`|`Json`|
96-
|`JsonDocument`|`Json`|
96+
|`JsonDocument`|`Json`|

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

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,52 @@
269269

270270
**Секрет** или **secret** — это конфиденциальные метаданные, требующие особого обращения. Например, секреты могут использоваться в определениях [внешних источников данных](#external-data-source) и представляют собой такие сущности, как пароли и токены.
271271

272+
### Объект схемы {#scheme-object}
273+
274+
Схема базы данных состоит из **схемных объектов** или **объектов схемы**, которыми могут быть базы данных, [таблицы](#table) (включая [внешние таблицы](#external-table)), [топики](#topic), [папки](#folder) и т.д.
275+
276+
Для удобства организации, схемные объекты образуют иерархию с помощью [папок](#folder).
277+
272278
### Папка {#folder}
273279

274-
Как и в файловых системах, **папка**, **каталог**, **folder** или **directory** является контейнером для других сущностей. В случае {{ ydb-short-name }}, эти сущности могут быть [таблицами](#table) (включая [внешние таблицы](#external-table)), [топиками](#topic), другими папками и т.д.
280+
Как и в файловых системах, **папка**, **каталог**, **folder** или **directory** является контейнером для [схемных объектов](#scheme-object).
281+
282+
Папки могут содержать подпапки и такая вложенность может быть произвольной глубины.
283+
284+
### Объект доступа {#access-object}
285+
286+
**Объект доступа** или **access object** при [авторизации](../security/authorization.md) — сущность, для которой настраиваются права и ограничения доступа. В {{ ydb-short-name }} объектами доступа являются [объекты схемы](#scheme-object).
287+
У каждого объекта доступа есть [владелец](#access-owner) и [список разрешений](#access-control-list).
288+
289+
### Субъект доступа {#access-subject}
290+
291+
**Субъект доступа** или **access subject** — сущность, которая может обращаться к [объектам доступа](#access-object) или выполнять определённые действия в системе. Получение доступа при этих обращениях и действиях зависит от настроенных [списков разрешений](#access-control-list).
292+
293+
Субъектом доступа может быть [пользователь](#access-user) или [группа](#access-group).
294+
295+
### Право доступа {#access-right}
296+
297+
**[Право доступа](../security/authorization.md#right)** или **access right** — сущность, отражающая разрешение [субъекту доступа](#access-subject) выполнять конкретный набор операций в кластере или базе данных над конкретным [объектом доступа](#access-object).
298+
299+
### Список разрешений {#access-control-list}
300+
301+
**Список разрешений**, **access control list** или **ACL** — список всех [прав](#access-right), предоставленных [субъектам доступа](#access-subject) (пользователям и группам) на конкретный [объект доступа](#access-object).
302+
303+
### Владелец {#access-owner}
304+
305+
**[Владелец](../security/authorization.md#owner)** - [субъект доступа](#access-subject) ([пользователь](#access-user) или [группа](#access-group)) имеющий полный объем прав на конкретный [объект доступа](#access-object).
306+
307+
### Пользователь {#access-user}
308+
309+
**[Пользователь](../security/authorization.md#user)** - лицо, использующее {{ ydb-short-name }} для выполнения конкретной функции.
310+
311+
### Группа {#access-group}
312+
313+
**[Группа](../security/authorization.md#group)** или **группа доступа** - именованное множество [пользователей](#access-user) с одинаковыми [правами доступа](#access-right) к тем или иным [объектам доступа](#access-object).
314+
315+
### SID {#access-sid}
316+
317+
**SID** (**Security Identifier**) - строка вида `<login>[@<subsystem>]`, идентифицирующая [субъект доступа](../concepts/glossary.md#access-subject) в [списках разрешений](#access-control-list).
275318

276319
### Оптимизатор запросов {#optimizer}
277320

ydb/docs/ru/core/concepts/toc_i.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ items:
33
href: glossary.md
44
- name: Соединение с БД
55
href: connect.md
6-
- name: Аутентификация
7-
href: auth.md
86
- name: Модель данных и схема
97
href: datamodel/index.md
108
include:

0 commit comments

Comments
 (0)