Skip to content

Commit 05e3c2c

Browse files
committed
Added missing files and fixed broken links for stable-25-1
1 parent 4c383db commit 05e3c2c

File tree

25 files changed

+276
-35
lines changed

25 files changed

+276
-35
lines changed

ydb/docs/en/core/concepts/_includes/secondary_indexes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A synchronous index is updated simultaneously with the table that it indexes. Th
1515

1616
## Asynchronous secondary index {#async}
1717

18-
Unlike a synchronous index, an asynchronous index doesn't use distributed transactions. Instead, it receives changes from an indexed table in the background. Write transactions to a table using this index are performed with no planning overheads due to reduced guarantees: an asynchronous index provides [eventual consistency](https://en.wikipedia.org/wiki/Eventual_consistency), but no strict consistency. You can only use asynchronous indexes in read transactions in [Stale Read Only](transactions.md#modes) mode.
18+
Unlike a synchronous index, an asynchronous index doesn't use distributed transactions. Instead, it receives changes from an indexed table in the background. Write transactions to a table using this index are performed with no planning overheads due to reduced guarantees: an asynchronous index provides [eventual consistency](https://en.wikipedia.org/wiki/Eventual_consistency), but no strict consistency. You can only use asynchronous indexes in read transactions in [Stale Read Only](../transactions.md#modes) mode.
1919

2020
## Covering secondary index {#covering}
2121

ydb/docs/en/core/dev/query-plans-optimization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Let's build a plan for this query. You can do this via either UI or {{ ydb-short
2020

2121
- {{ ydb-short-name }} CLI
2222

23-
You can build a query plan via {{ ydb-short-name }} [CLI](../reference/ydb-cli/_includes/index.md) using the following command:
23+
You can build a query plan via {{ ydb-short-name }} [CLI](../reference/ydb-cli/commands/explain-plan.md) using the following command:
2424

2525
```bash
2626
ydb -p <profile_name> table query explain \
@@ -63,7 +63,7 @@ ALTER TABLE episodes
6363
ADD INDEX title_index GLOBAL ON (title)
6464
```
6565

66-
Please note that this example uses [synchronous secondary index](../concepts/_includes/secondary_indexes.md#sync). Building an index in {{ ydb-short-name }} is an asynchronous operation. Even if the index creation query is successful, it is advisable to wait for some time because the index may not be ready for use immediately. You can manage asynchronous operations through the [CLI](../reference/ydb-cli/commands/_includes/secondary_index.md#add).
66+
Please note that this example uses [synchronous secondary index](../concepts/secondary_indexes.md#sync). Building an index in {{ ydb-short-name }} is an asynchronous operation. Even if the index creation query is successful, it is advisable to wait for some time because the index may not be ready for use immediately. You can manage asynchronous operations through the [CLI](../reference/ydb-cli/commands/secondary_index.md#add).
6767

6868
Let's build the query plan using the secondary index `title_index`. Secondary indexes to be used need to be explicitly specified in the `VIEW` clause.
6969

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Database node authentication and authorization
2+
3+
Node authentication in the {{ ydb-short-name }} cluster ensures that database nodes are authenticated when making service requests to other nodes via the gRPC protocol. Node authorization ensures that the privileges required by the service requests are checked and granted during request processing. These service calls include database node registration within the cluster and access to [dynamic configuration](../../maintenance/manual/dynamic-config.md) information. The use of node authorization is recommended for all {{ ydb-short-name }} clusters, as it helps prevent unauthorized access to data by adding nodes controlled by an attacker to the cluster.
4+
5+
Database node authentication and authorization are performed in the following order:
6+
7+
1. The database node being started opens a gRPC connection to one of the cluster storage nodes specified in the `--node-broker` command-line option. The connection uses the TLS protocol, and the certificate of the running node is used as the client certificate for the connection.
8+
2. The storage node and the database node perform mutual authentication checks using the TLS protocol: the certificate trust chain is checked, and the hostname is matched against the value of the "Subject Name" field of the certificate.
9+
3. The storage node checks the "Subject" field of the certificate for compliance with the requirements [set up through settings](../../reference/configuration/client_certificate_authorization.md) in the static configuration.
10+
4. If the above checks are successful, the connection from the database node is considered authenticated, and it is assigned a security identifier - [SID](../../concepts/glossary.md#access-sid), which is determined by the settings.
11+
5. The database node uses the established gRPC connection to register with the cluster through the corresponding service request. When registering, the database node sends its network address intended to be used for communication with other cluster nodes.
12+
6. The storage node checks whether the SID assigned to the gRPC connection is in the list of acceptable ones. If this check is successful, the storage node registers the database node within the cluster, saving the association between the network address of the registered node and its identifier.
13+
7. The database node joins the cluster by connecting via its network address and providing the node ID it received during registration. Attempts to join the cluster by nodes with unknown network addresses or IDs are blocked by other nodes.
14+
15+
Below are the steps required to enable the node authentication and authorization feature.
16+
17+
## Configuration prerequisites
18+
19+
1. The deployed {{ ydb-short-name }} cluster must have [gRPC traffic encryption](../../reference/configuration/tls.md#grpc) configured to use the TLS protocol.
20+
1. When preparing node certificates for a cluster where you plan to use the node authorization feature, uniform rules must be used for populating the "Subject" field of the certificates. This allows the identification of certificates issued for the cluster nodes. For more information, see the [certificate verification rules documentation](../../reference/configuration/client_certificate_authorization.md).
21+
22+
{% note info %}
23+
24+
The proposed [example script](https://github.com/ydb-platform/ydb/blob/main/ydb/deploy/tls_cert_gen/) generates self-signed certificates for {{ ydb-short-name }} nodes and ensures that the "Subject" field is populated with the value `O=YDB` for all node certificates. The configuration examples provided below are prepared for certificates with this specific "Subject" field configuration, but feel free to use your real organization name instead.
25+
26+
{% endnote %}
27+
28+
1. The command-line parameters for [starting database nodes](../../devops/manual/initial-deployment.md#start-dynnode) must include options that specify the paths to the trusted CA certificate, the node certificate, and the node key files. The required additional command-line options are shown in the table below.
29+
30+
| **Command-line option** | **Description** |
31+
|-------------------------|-----------------|
32+
| `--grpc-ca` | Path to the trusted certification authority file `ca.crt` |
33+
| `--grpc-cert` | Path to the node certificate file `node.crt` |
34+
| `--grpc-key` | Path to the node secret key file `node.key` |
35+
36+
Below is an example of the complete command to start the database node, including the extra options for gRPC TLS key and certificate files:
37+
38+
```bash
39+
/opt/ydb/bin/ydbd server --yaml-config /opt/ydb/cfg/config.yaml --tenant /Root/testdb \
40+
--grpcs-port 2136 --grpc-ca /opt/ydb/certs/ca.crt \
41+
--grpc-cert /opt/ydb/certs/node.crt --grpc-key /opt/ydb/certs/node.key \
42+
--ic-port 19002 --ca /opt/ydb/certs/ca.crt \
43+
--mon-port 8766 --mon-cert /opt/ydb/certs/web.pem \
44+
--node-broker grpcs://<ydb1>:2135 \
45+
--node-broker grpcs://<ydb2>:2135 \
46+
--node-broker grpcs://<ydb3>:2135
47+
```
48+
49+
## Enabling database node authentication and authorization
50+
51+
To enable mandatory database node authorization, add the following configuration blocks to the [static cluster configuration](../../reference/configuration/index.md) file:
52+
53+
1. At the root level, add the `client_certificate_authorization` block to define the requirements for the "Subject" field of trusted node certificates. For example:
54+
55+
```yaml
56+
client_certificate_authorization:
57+
request_client_certificate: true
58+
client_certificate_definitions:
59+
- member_groups: ["registerNode@cert"]
60+
subject_terms:
61+
- short_name: "O"
62+
values: ["YDB"]
63+
```
64+
65+
Add other certificate validation settings [as defined in the documentation](../../reference/configuration/client_certificate_authorization.md), if required.
66+
67+
If the certificate is successfully verified and the components of the "Subject" field comply with the requirements defined in the `subject_terms` sub-block, the connection will be assigned the access subjects listed in the `member_groups` parameter. To distinguish these subjects from other user groups and accounts, their names typically have the `@cert` suffix.
68+
69+
1. Add the `register_dynamic_node_allowed_sids` element to the cluster authentication settings `security_config` block, and list the subjects permitted for database node registration. For internal technical reasons, the list must include the `root@builtin` element. Example:
70+
71+
```yaml
72+
domains_config:
73+
...
74+
security_config:
75+
enforce_user_token_requirement: true
76+
monitoring_allowed_sids:
77+
...
78+
administration_allowed_sids:
79+
...
80+
viewer_allowed_sids:
81+
...
82+
register_dynamic_node_allowed_sids:
83+
- "root@builtin" # required for internal technical reasons
84+
- "registerNode@cert"
85+
```
86+
87+
For more detailed information on configuring cluster authentication parameters, see the [relevant documentation section](../../reference/configuration/index.md#security-access-levels).
88+
89+
1. Deploy the static configuration files on all cluster nodes either manually, or [using the Ansible playbook action](../ansible/update-config.md).
90+
91+
1. Perform the rolling restart of storage nodes by [using ydbops](../../reference/ydbops/scenarios.md) or [Ansible playbook action](../ansible/restart.md).
92+
93+
1. Perform the rolling restart of database nodes through ydbops or Ansible playbooks.

ydb/docs/en/core/devops/manual/toc_p.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ items:
2121
href: system-views.md
2222
- name: Maintenance without downtime
2323
href: maintenance-without-downtime.md
24+
- name: Node authentication and authorization
25+
href: node-authorization.md
2426
- name: Federated queries
2527
href: federated-queries/index.md
2628
include:

ydb/docs/en/core/downloads/yandex-enterprise-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ Yandex Enterprise Database distributions are available for download via the link
9595
|| **v23.4** | | | | ||
9696
|| v.23.4.11 | 14.05.24 | `cr.yandex/crptqonuodf51kdj7a7d/ydb:23.4.11` | [See list](../changelog-server.md#23-4) ||
9797
|| **v23.3** | | | | ||
98-
|| v.23.3.17 | 14.12.23 | `cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.17` | [See list](../changelog-server-23.md#23-3-17) ||
98+
|| v.23.3.17 | 14.12.23 | `cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.17` | [See list](../changelog-server.md#23-3-17) ||
9999
|| v.23.3.13 | 12.10.23 | `cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.13` | [See list](../changelog-server.md#23-3) ||
100100
|#
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Download Ansible Playbooks for {{ ydb-short-name }}
22

3-
A set of automated playbooks for installing and maintaining the server side of [open-source {{ ydb-short-name }}](ydb-oss-server.md) or [Yandex Enterprise Database](yandex-enterprise-database.md) using [Ansible](https://docs.ansible.com/) is available for download via the links below. Their source code is published [on GitHub](https://github.com/ydb-platform/ydb-ansible) under Apache 2.0 license.
3+
A set of automated playbooks for installing and maintaining the server side of [open-source {{ ydb-short-name }}](./ydb-open-source-database.md) or [Yandex Enterprise Database](yandex-enterprise-database.md) using [Ansible](https://docs.ansible.com/) is available for download via the links below. Their source code is published [on GitHub](https://github.com/ydb-platform/ydb-ansible) under Apache 2.0 license.
44

55
| Version | Release date | Download | Checksums |
66
| ------ | ------------ | ------- | ----------------- |
77
| v0.14 | 30.11.2024 | [ydb-ansible-0.14.zip](https://binaries.ясубд.рф/ansible/ydb-ansible-0.14.zip) | [ydb-ansible-0.14.txt](https://binaries.ясубд.рф/ansible/ydb-ansible-0.14.txt) |
88
| v0.10 | 01.08.2024 | [ydb-ansible-0.10.zip](https://binaries.ясубд.рф/ansible/ydb-ansible-0.10.zip) | [ydb-ansible-0.10.txt](https://binaries.ясубд.рф/ansible/ydb-ansible-0.10.txt) |
99
| v0.9 | 20.07.2024 | [ydb-ansible-0.9.zip](https://binaries.ясубд.рф/ansible/ydb-ansible-0.9.zip) | [ydb-ansible-0.9.txt](https://binaries.ясубд.рф/ansible/ydb-ansible-0.9.txt) |
1010
| v0.8 | 10.07.2024 | [ydb-ansible-0.8.zip](https://binaries.ясубд.рф/ansible/ydb-ansible-0.8.zip) | [ydb-ansible-0.7.txt](https://binaries.ясубд.рф/ansible/ydb-ansible-0.8.txt) |
11-
| v0.7 | 03.05.2024 | [ydb-ansible-0.7.zip](https://binaries.ясубд.рф/ansible/ydb-ansible-0.7.zip) | [ydb-ansible-0.7.txt](https://binaries.ясубд.рф/ansible/ydb-ansible-0.7.txt) |
11+
| v0.7 | 03.05.2024 | [ydb-ansible-0.7.zip](https://binaries.ясубд.рф/ansible/ydb-ansible-0.7.zip) | [ydb-ansible-0.7.txt](https://binaries.ясубд.рф/ansible/ydb-ansible-0.7.txt) |
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# `client_certificate_authorization` configuration section
2+
3+
Database node authentication within the {{ ydb-short-name }} cluster ensures that service connections between cluster nodes are assigned the correct security identifiers, or [SIDs](../../concepts/glossary.md#access-sid). The process of database node authentication applies to connections that use the gRPC protocol and provide functions for registering nodes in the cluster, as well as for accessing configuration information. SIDs assigned to connections are considered when checking the authorization rules that apply to the corresponding gRPC service calls.
4+
5+
Node authentication settings are configured within the [static configuration](./index.md) of the cluster.
6+
7+
The `client_certificate_authorization` section specifies the authentication settings for database node connections by defining the requirements for the content of the "Subject" and "Subject Alternative Name" fields in node certificates, as well as the list of [SID](../../concepts/glossary.md#access-sid) values assigned to the connections.
8+
9+
The "Subject" field of the node certificate may contain multiple components (such as `O` – organization, `OU` – organizational unit, `C` – country, `CN` – common name), and checks can be configured against one or more of these components.
10+
11+
The "Subject Alternative Name" field of the node certificate is a list of the node's network names or IP addresses. Checks can be configured to match the names specified in the certificate against the expected values.
12+
13+
## Syntax
14+
15+
```yaml
16+
client_certificate_authorization:
17+
request_client_certificate: Bool
18+
default_group: <default SID>
19+
client_certificate_definitions:
20+
- member_groups: <SID array>
21+
require_same_issuer: Bool
22+
subject_dns:
23+
- suffixes: <array of allowed suffixes>
24+
values: <array of allowed values>
25+
subject_terms:
26+
- short_name: <Subject Name component>
27+
suffixes: <array of allowed suffixes>
28+
values: <array of allowed values>
29+
- member_groups: <SID array>
30+
...
31+
```
32+
33+
Key | Description
34+
---- | ---
35+
`request_client_certificate` | Request a valid client certificate for node connections.<br/>Allowed values:<br/><ul><li>`false` — A certificate is not required (used by default if the parameter is omitted).</li><li>`true` — A certificate is required for all node connections.</li></ul>
36+
`default_group` | SID assigned to all connections providing a trusted client certificate when no explicit settings are provided in the `client_certificate_definitions` section.
37+
`client_certificate_definitions` | Section defining the requirements for database node certificates.
38+
`member_groups` | SIDs assigned to connections that conform to the requirements of the current configuration block.
39+
`require_same_issuer` | Require that the value of the "Issuer" field (typically containing the Certification Authority name) is the same for both client (database node) and server (storage node) certificates. <br/>Allowed values:<br/><ul><li>`true` — The values must be the same (used by default if the parameter is omitted).</li><li>`false` — The values can be different (allowing client and server certificates to be issued by different Certification Authorities).</li></ul>
40+
`subject_dns` | Allowed values for the "Subject Alternative Name" field, specified as either full values (using the `values` sub-key) or suffixes (using the `suffixes` sub-key). The check is successful if the actual value matches any full name or any suffix specified.
41+
`subject_terms` | Requirements for the "Subject" field value. Contains the component name (in the `short_name` sub-key) and a list of full values (using the `values` sub-key) or suffixes (using the `suffixes` sub-key). The check is successful if the actual value of each component matches either an allowed full value or an allowed suffix.
42+
43+
## Examples
44+
45+
The following configuration fragment enables node authentication and requires the "Subject" field to include the component `O=YDB`. Upon successful authentication, the connection is assigned the `registerNode@cert` SID.
46+
47+
```yaml
48+
client_certificate_authorization:
49+
request_client_certificate: true
50+
client_certificate_definitions:
51+
- member_groups: ["registerNode@cert"]
52+
subject_terms:
53+
- short_name: "O"
54+
values: ["YDB"]
55+
```
56+
57+
The next configuration fragment enables node authentication, and requires "Subject" field to include both `OU=cluster1` and `O=YDB` components. In addition "Subject Alternative Name" field should contain the network name ending with the `.cluster1.ydb.company.net` suffix. Upon successful authentication, the connection will be assigned the `registerNode@cert` SID.
58+
59+
```yaml
60+
client_certificate_authorization:
61+
request_client_certificate: true
62+
client_certificate_definitions:
63+
- member_groups: ["registerNode@cert"]
64+
subject_dns:
65+
- suffixes: [".cluster1.ydb.company.net"]
66+
subject_terms:
67+
- short_name: "OU"
68+
values: ["cluster1"]
69+
- short_name: "O"
70+
values: ["YDB"]
71+
```
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
items:
22
- name: TLS
3-
href: tls.md
3+
href: tls.md
4+
- name: client_certificate_authorization
5+
href: client_certificate_authorization.md

ydb/docs/en/core/reference/observability/tracing/setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ The limits on the number of traced requests are local to the cluster node. For e
255255

256256
As with [logs](../../../reference/embedded-ui/logs.md), diagnosing most system issues does not require the most detailed trace. Therefore, in {{ ydb-short-name }}, each span has its own level described by an integer from 0 to 15 inclusive. Each rule in the `sampling` section must include the detail level of the generated trace (`level`); spans with a level less than or equal to `level` will be included in it.
257257

258-
The [{{ ydb-short-name }} architecture](../../../concepts/_includes/index/how_it_works.md#ydb-architecture) section describes the system's division into 5 layers:
258+
The [{{ ydb-short-name }} architecture](../../../concepts/index.md#ydb-architecture) section describes the system's division into 5 layers:
259259

260260
| Layer | Components |
261261
| ---- | --------- |
@@ -348,4 +348,4 @@ With a sufficiently low flow of requests to the `/Root/db1` database, the follow
348348
With a sufficiently high flow of requests to the `/Root/db1` database, the following will be sampled:
349349

350350
* 5 requests per minute with a detail level of 15
351-
* between 95 and 100 requests per minute with a detail level of 5
351+
* between 95 and 100 requests per minute with a detail level of 5

0 commit comments

Comments
 (0)