Skip to content

Commit a921899

Browse files
authored
Doc changes related to security features (#17532)
1 parent 7ba316e commit a921899

File tree

19 files changed

+122
-119
lines changed

19 files changed

+122
-119
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This section describes the {{ ydb-short-name }} cluster scheme entities.
44

55
## {{ ydb-short-name }} cluster scheme {#cluster-scheme}
66

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**. [Databases](../../concepts/glossary.md#database) are children elements of the cluster scheme root. It is also possible to create other [scheme objects](../../concepts/glossary.md#scheme-object) in the cluster scheme root. These objects exist at the cluster level and do not belong to tenant databases. Scheme objects inside a database can use nested directories to form a hierarchy.
7+
{{ ydb-short-name }} cluster scheme is a hierarchical namespace of a {{ ydb-short-name }} cluster. The top-level element of the namespace is the **cluster scheme root** that contains [databases](../../concepts/glossary.md#database) as its children. Scheme objects inside a database can use nested directories to form a hierarchy.
88

99
![cluster scheme diagram](_assets/cluster-scheme.png =500x)
1010

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

+2-21
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,6 @@ 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 a database requires additional operations from [DevOps engineers](../devops/index.md).
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-
32-
#### Root database {#root-database}
33-
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.
35-
3621
### Node {#node}
3722

3823
A {{ ydb-short-name }} **node** is a server process running an executable called `ydbd`. A physical server or virtual machine can run multiple {{ ydb-short-name }} nodes, which is common. Thus, in the context of {{ ydb-short-name }}, nodes are **not** synonymous with hosts.
@@ -283,13 +268,9 @@ An **authentication token** or **auth token** is a token that {{ ydb-short-name
283268

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

286-
### User token {#user-token}
287-
288-
When a {{ ydb-short-name }} node gets a request from a [user](#access-user), it requests the service where the user was created to validate the user's authentication token. Upon successful validation, the node creates and caches a **user token** for validating subsequent requests from that user instead of re-validating the authentication token.
289-
290271
### Cluster scheme {#scheme}
291272

292-
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.
273+
A **{{ ydb-short-name }} cluster scheme** is a hierarchical namespace of a {{ ydb-short-name }} cluster. The top-level element of the namespace is the [cluster scheme root](#scheme-root) that contains [databases](#database) as its children. Scheme objects inside databases can use nested directories to form a hierarchy.
293274

294275
### Database scheme {#scheme-database}
295276

@@ -366,7 +347,7 @@ A **[user](../security/authorization.md#user)** is an individual utilizing {{ yd
366347

367348
{{ ydb-short-name }} has the following types of users depending on their source:
368349

369-
- internal users in {{ ydb-short-name }} databases
350+
- local users in {{ ydb-short-name }} databases
370351
- external users from third-party directory services
371352

372353
{{ ydb-short-name }} users are identified by their [SIDs](#access-sid).

ydb/docs/en/core/dev/system-views.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ ORDER BY IntervalEnd desc, LocksBroken desc
372372

373373
### Auth users {#users}
374374

375-
The `auth_users` view lists internal {{ ydb-short-name }} [users](../concepts/glossary.md#access-user). It does not include users authenticated through external systems such as LDAP.
375+
The `auth_users` view lists local {{ ydb-short-name }} [users](../concepts/glossary.md#access-user). It does not include users authenticated through external systems such as LDAP.
376376

377377
This view can be fully accessed by administrators, while regular users can only view their own details.
378378

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

+13-15
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,35 @@
22

33
{{ ydb-short-name }} supports various user authentication methods. The configuration for authentication providers is specified in the `auth_config` section.
44

5-
## Configuring internal {{ ydb-short-name }} user authentication {#internal-auth-config}
5+
## Configuring local {{ ydb-short-name }} user authentication {#local-auth-config}
66

7-
For more information about the authentication of [internal {{ ydb-short-name }} users](../../concepts/glossary.md#access-user), see [{#T}](../../security/authentication.md#static-credentials). To configure authentication by username and password, define the following parameters in the `auth_config` section:
7+
For more information about the authentication of [local {{ ydb-short-name }} users](../../concepts/glossary.md#access-user), see [{#T}](../../security/authentication.md#static-credentials). To configure authentication by username and password, define the following parameters in the `auth_config` section:
88

99
#|
1010
|| Parameter | Description ||
1111
|| use_login_provider
12-
| Indicates whether to allow the authentication of internal users with an [authentication token](../../concepts/glossary.md#auth-token) that is obtained after entering a username and password.
12+
| Indicates whether to allow the authentication of local users with an [authentication token](../../concepts/glossary.md#auth-token) that is obtained after entering a username and password.
1313

1414
Default value: `true`
1515
||
1616
|| enable_login_authentication
17-
| Indicates whether to allow adding internal users to {{ ydb-short-name }} databases and generating authentication tokens after an internal user enters a username and password.
17+
| Indicates whether to allow adding local users to {{ ydb-short-name }} databases and generating authentication tokens after an local user enters a username and password.
1818

1919
Default value: `true`
2020
||
2121
|| domain_login_only
22-
| Determines the scope of internal user access rights in a {{ ydb-short-name }} cluster.
22+
| Determines the scope of local user access rights in a {{ ydb-short-name }} cluster.
2323

2424
Valid values:
2525

26-
- `true`internal users exist in a {{ ydb-short-name }} cluster and can be granted rights to access multiple [tenant databases](../../concepts/glossary.md#tenant-database).
26+
- `true`local users exist in a {{ ydb-short-name }} cluster and can be granted rights to access multiple [databases](../../concepts/glossary.md#database).
2727

28-
In this scenario, users are added only to the [root database](../../concepts/glossary.md#root-database).
29-
30-
- `false` — internal users can exist either in a {{ ydb-short-name }} cluster or in tenant databases. The scope of access rights for internal users in tenant databases is limited to the database, in which they are created.
31-
32-
In this scenario, users are added either to the root database or to tenant databases.
28+
- `false` — local users can exist either at the cluster or database level. The scope of access rights for local users created at the database level is limited to the database, in which they are created.
3329

3430
Default value: `true`
3531
||
3632
|| login_token_expire_time
37-
| Specifies the expiration time of the authentication token created when an internal user logs in to {{ ydb-short-name }}.
33+
| Specifies the expiration time of the authentication token created when an local user logs in to {{ ydb-short-name }}.
3834

3935
Default value: `12h`
4036
||
@@ -75,7 +71,7 @@ Default value: `1h`
7571

7672
### Configuring password complexity requirements {#password-complexity}
7773

78-
{{ ydb-short-name }} allows internal users to authenticate using a login and password. For more information, see [authentication by login and password](../../security/authentication.md#static-credentials). To enhance security in {{ ydb-short-name }}, configure complexity requirements for the passwords of [internal users](../../concepts/glossary.md#access-user) in the `password_complexity` subsection inside the `auth_config` section.
74+
{{ ydb-short-name }} allows local users to authenticate using a login and password. For more information, see [authentication by login and password](../../security/authentication.md#static-credentials). To enhance security in {{ ydb-short-name }}, configure complexity requirements for the passwords of [local users](../../concepts/glossary.md#access-user) in the `password_complexity` subsection inside the `auth_config` section.
7975

8076
Example of the `password_complexity` section:
8177

@@ -288,9 +284,11 @@ Default value: `false`
288284
||
289285
|#
290286

291-
## Configuring user token life cycle
287+
## Configuring caching for authentication results
288+
289+
During the authentication process, a user session receives an authentication token, which is transmitted along with each request to the cluster {{ydb-short-name }}. Since {{ydb-short-name }} is a distributed system, user requests will eventually be processed on one or more {{ydb-short-name }} nodes. After receiving a request from the user, a {{ydb-short-name }} node verifies the authentication token. If successful, the node generates a **user token**, which is valid only inside the current node and is used to authorize the actions requested by the user. Subsequent requests with the same authentication token to the same node do not require verification of the authentication token.
292290

293-
Parameters for configuring the [user token](../../concepts/glossary.md#user-token) life cycle are applicable to all authentication methods.
291+
To configure the life cycle and other important aspects of managing user tokens, define the following parameters:
294292

295293
#|
296294
|| refresh_period

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ The list includes groups and their members.
149149

150150
{% note warning %}
151151

152-
These groups are created in the [root database](../../concepts/glossary.md#root-database) for the entire {{ ydb-short-name }} cluster.
152+
These groups are created for the entire {{ ydb-short-name }} cluster.
153153

154154
{% endnote %}
155155

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To enable anonymous authentication, use `false` in the `enforce_user_token_requi
3131

3232
## Authenticating by username and password {#static-credentials}
3333

34-
Authentication by username and password using the YDB server is available only to [internal users](../concepts/glossary.md#access-user). Authentication of external users involves third-party servers.
34+
Authentication by username and password using the YDB server is available only to [local users](../concepts/glossary.md#access-user). Authentication of external users involves third-party servers.
3535

3636
This access type implies that each database user has a username and password.
3737
Only digits and lowercase Latin letters can be used in usernames. [Password complexity requirements](#password-complexity) can be configured.
@@ -46,7 +46,7 @@ Authentication by username and password includes the following steps:
4646
1. The service validates authentication data. If the data matches, it generates a token and returns it to the authentication service.
4747
1. The client accesses the database, presenting their token as authentication data.
4848

49-
To enable username/password authentication, use `true` in the `enforce_user_token_requirement` key of the cluster's [configuration file](../reference/configuration/index.md#auth).
49+
To enable authentication by username and password, ensure that the `use_login_provider` and `enable_login_authentication` parameters are set to the default value of `true` in the [configuration file](../reference/configuration/auth_config.md). Besides, to disable anonymous authentication, set the [`enforce_user_token_requirement` parameter](../reference/configuration/security_config.md) to `true`.
5050

5151
To learn how to manage roles and users, see [{#T}](../security/authorization.md).
5252

ydb/docs/en/core/security/builtin-security.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
# Built-in security configuration
1+
# Initial security configuration
22

3-
Built-in security is configured automatically when the {{ ydb-short-name }} cluster starts for the first time, if the [`security_config`](../reference/configuration/index.md#security) section in the cluster configuration file does not define the `default_users`, `default_groups`, or `default_access` parameters.
3+
Initial security is configured automatically when the {{ ydb-short-name }} cluster starts for the first time.
44

5-
Built-in security configuration can be disabled by setting the [`domains_config.disable_builtin_security`](../reference/configuration/index.md#domains-config) parameter to `true`.
5+
During this process {{ ydb-short-name }} adds a [superuser](#superuser) and a set of [roles](#roles) for user access management.
66

7-
Built-in security configuration adds a superuser and a set of roles for user access management.
7+
{% note info %}
88

9-
## Roles
9+
For information about overriding and skipping initial security configuration, see the following sections:
10+
11+
- [{#T}](#skip-initial-security)
12+
- [{#T}](#override-initial-security)
13+
14+
{% endnote %}
15+
16+
## Roles {#roles}
1017

1118
| Role | Description |
1219
|------------------|-------------|
@@ -19,7 +26,7 @@ Built-in security configuration adds a superuser and a set of roles for user acc
1926
| `METADATA-READERS` | Provides access rights for scheme objects. No data access. |
2027
| `USERS` | Provides access rights for databases. This is a common group for all users. |
2128

22-
## Groups
29+
## Groups {#groups}
2330

2431
Roles in {{ ydb-short-name }} are implemented as a hierarchy of [user](../concepts/glossary.md#access-user) [groups](./authorization.md#group) and a set of [access rights](./authorization.md#right) for these groups. Access rights for the groups are granted on the cluster scheme root.
2532

@@ -40,14 +47,24 @@ Users in the `DDL-ADMINS` group are allowed to:
4047

4148
Users in the `ADMINS` group are allowed to perform all operations on the scheme and data.
4249

43-
## Superuser
50+
## Superuser {#superuser}
4451

4552
A superuser belongs to the `ADMINS` and `USERS` groups and has full access rights to the cluster scheme.
4653

4754
By default, a superuser is the `root` user with an empty password.
4855

49-
## A group for all users
56+
## A group for all users {#all-users-group}
57+
58+
The `USERS` group is a common [group](../concepts/glossary.md#access-group) for all local [users](../concepts/glossary.md#access-user). When you [add new users](./authorization.md#user), they are automatically added to the `USERS` group.
59+
60+
For more information about managing groups and users, see [{#T}](../security/authorization.md).
61+
62+
## Overriding initial security configuration {#override-initial-security}
63+
64+
You can override the initial security configuration with a custom set of users, groups, and access rights.
65+
66+
To specify custom users, groups, and access rights to be created during the initial security configuration, define the `default_users`, `default_groups`, or `default_access` parameters in the [`security_config`](../reference/configuration/security_config.md#security-bootstrap) section in the cluster configuration file.
5067

51-
The `USERS` group is a common [group](../concepts/glossary.md#access-group) for all internal [users](../concepts/glossary.md#access-user). When you [add new users](./authorization.md#user), they are automatically added to the `USERS` group.
68+
## Skipping initial security configuration {#skip-initial-security}
5269

53-
For more information about managing groups and users, see [{#T}](../security/authorization.md).
70+
You can skip initial security configuration by setting the [`security_config.disable_builtin_security`](../reference/configuration/index.md#domains-config) parameter to `true`.

0 commit comments

Comments
 (0)