Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pd: support multi cn after 8.4 #19082

Merged
merged 5 commits into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions enable-tls-between-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,22 @@ Currently, it is not supported to only enable encrypted transmission of some spe

### Verify component caller's identity

The Common Name is used for caller verification. In general, the callee needs to verify the caller's identity, in addition to verifying the key, the certificates, and the CA provided by the caller. For example, TiKV can only be accessed by TiDB, and other visitors are blocked even though they have legitimate certificates.
In general, the callee needs to verify the caller's identity using `Common Name`, in addition to verifying the key, the certificates, and the CA provided by the caller. For example, TiKV can only be accessed by TiDB, and other visitors are blocked even though they have legitimate certificates.

To verify component caller's identity, you need to mark the certificate user identity using `Common Name` when generating the certificate, and to check the caller's identity by configuring the `Common Name` list for the callee.
To verify the caller's identity for a component, you need to mark the certificate user identity using `Common Name` when generating the certificate, and check the caller's identity by configuring `cluster-verify-cn` (in TiDB) or `cert-allowed-cn` (in other components) for the callee.

> **Note:**
>
> Currently the `cert-allowed-cn` configuration item of the PD can only be set to one value. Therefore, the `commonName` of all authentication objects must be set to the same value.
> - Starting from v8.4.0, the PD configuration item `cert-allowed-cn` supports multiple values. You can configure multiple `Common Name` in the `cluster-verify-cn` configuration item for TiDB and in the `cert-allowed-cn` configuration item for other components as needed. Note that TiUP uses a separate identifier when querying component status. For example, if the cluster name is `test`, TiUP uses `test-client` as the `Common Name`.
> - For v8.3.0 and earlier versions, the PD configuration item `cert-allowed-cn` can only be set to a single value. Therefore, the `Common Name` of all authentication objects must be set to the same value. For related configuration examples, see [v8.3.0 documentation](https://docs.pingcap.com/tidb/v8.3/enable-tls-between-components).

- TiDB

Configure in the configuration file or command-line arguments:

```toml
[security]
cluster-verify-cn = ["TiDB"]
cluster-verify-cn = ["tidb", "test-client", "prometheus"]
```

- TiKV
Expand All @@ -177,7 +178,7 @@ To verify component caller's identity, you need to mark the certificate user ide

```toml
[security]
cert-allowed-cn = ["TiDB"]
cert-allowed-cn = ["tidb", "pd", "tikv", "tiflash", "prometheus"]
```

- PD
Expand All @@ -186,7 +187,7 @@ To verify component caller's identity, you need to mark the certificate user ide

```toml
[security]
cert-allowed-cn = ["TiDB"]
cert-allowed-cn = ["tidb", "pd", "tikv", "tiflash", "test-client", "prometheus"]
```

- TiFlash (New in v4.0.5)
Expand All @@ -195,14 +196,14 @@ To verify component caller's identity, you need to mark the certificate user ide

```toml
[security]
cert_allowed_cn = ["TiDB"]
cert_allowed_cn = ["tidb", "tikv", "prometheus"]
```

Configure in the `tiflash-learner.toml` file:

```toml
[security]
cert-allowed-cn = ["TiDB"]
cert-allowed-cn = ["tidb", "tikv", "tiflash", "prometheus"]
```

## Reload certificates
Expand Down
Loading