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

tiflash: Add TiFlash security configuration #4412

Merged
merged 14 commits into from
Jan 4, 2021
Merged
29 changes: 18 additions & 11 deletions enable-tls-between-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Currently, it is not supported to only enable encrypted transmission of some spe

```toml
[security]
# Path of file that contains list of trusted SSL CAs for connection with cluster components.
# Path of the file that contains list of trusted SSL CAs for connection with cluster components.
cluster-ssl-ca = "/path/to/ca.pem"
# Path of file that contains X509 certificate in PEM format for connection with cluster components.
# Path of the file that contains X509 certificate in PEM format for connection with cluster components.
cluster-ssl-cert = "/path/to/tidb-server.pem"
# Path of file that contains X509 key in PEM format for connection with cluster components.
# Path of the file that contains X509 key in PEM format for connection with cluster components.
cluster-ssl-key = "/path/to/tidb-server-key.pem"
```

Expand All @@ -49,9 +49,12 @@ Currently, it is not supported to only enable encrypted transmission of some spe

```toml
[security]
# set the path for certificates. Empty string means disabling secure connections.
## The path for certificates. Empty string means that secure connections are disabled.
TomShawn marked this conversation as resolved.
Show resolved Hide resolved
# Path of the file that contains a list of trusted SSL CAs. If it is set, the following settings `cert_path` and `key_path` are also needed.
ca-path = "/path/to/ca.pem"
# Path of the file that contains X509 certificate in PEM format.
cert-path = "/path/to/tikv-server.pem"
# Path of the file that contains X509 key in PEM format.
key-path = "/path/to/tikv-server-key.pem"
```

Expand All @@ -61,11 +64,12 @@ Currently, it is not supported to only enable encrypted transmission of some spe

```toml
[security]
# Path of file that contains list of trusted SSL CAs. If set, following four settings shouldn't be empty
## The path for certificates. Empty string means that secure connections are disabled.
TomShawn marked this conversation as resolved.
Show resolved Hide resolved
# Path of the file that contains a list of trusted SSL CAs. If it is set, the following settings `cert_path` and `key_path` are also needed.
cacert-path = "/path/to/ca.pem"
JaySon-Huang marked this conversation as resolved.
Show resolved Hide resolved
# Path of file that contains X509 certificate in PEM format.
# Path of the file that contains X509 certificate in PEM format.
cert-path = "/path/to/pd-server.pem"
# Path of file that contains X509 key in PEM format.
# Path of the file that contains X509 key in PEM format.
key-path = "/path/to/pd-server-key.pem"
```

Expand All @@ -75,21 +79,24 @@ Currently, it is not supported to only enable encrypted transmission of some spe

```toml
[security]
# Path of file that contains list of trusted SSL CAs. if set, following four settings shouldn't be empty
## The path for certificates. Empty string means that secure connections are disabled.
TomShawn marked this conversation as resolved.
Show resolved Hide resolved
# Path of the file that contains a list of trusted SSL CAs. If it is set, the following settings `cert_path` and `key_path` are also needed.
ca_path = "/path/to/ca.pem"
# Path of file that contains X509 certificate in PEM format.
# Path of the file that contains X509 certificate in PEM format.
cert_path = "/path/to/tiflash-server.pem"
# Path of file that contains X509 key in PEM format.
# Path of the file that contains X509 key in PEM format.
key_path = "/path/to/tiflash-server-key.pem"
```

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

```toml
[security]
# Sets the path for certificates. The empty string means that secure connections are disabled.
# Path of the file that contains a list of trusted SSL CAs. If it is set, the following settings `cert_path` and `key_path` are also needed.
ca-path = "/path/to/ca.pem"
# Path of the file that contains X509 certificate in PEM format.
cert-path = "/path/to/tiflash-server.pem"
# Path of the file that contains X509 key in PEM format.
key-path = "/path/to/tiflash-server-key.pem"
```

Expand Down
18 changes: 17 additions & 1 deletion tiflash/tiflash-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,23 @@ delta_index_cache_size = 0

## The memory usage limit for the generated intermediate data when all queries
## are executed. The default value is 0 (in bytes), which means no limit.
max_memory_usage_for_all_queries = 0
max_memory_usage_for_all_queries = 0

## Security settings take effect starting from v4.0.5.
[security]
## This configuration item enables or disables log redaction. If the configuration value
## is set to `true`, all user data in the log will be replaced by `?`.
## Note that you also need to set `security.redact-info-log` for tiflash-learner's logging
## in tiflash-learner.toml
# redact_info_log = false

## Path of the file that contains a list of trusted SSL CAs. If set, the following settings
## `cert_path` and `key_path` are also needed.
# ca_path = "/path/to/ca.pem"
## Path of the file that contains X509 certificate in PEM format.
# cert_path = "/path/to/tiflash-server.pem"
## Path of the file that contains X509 key in PEM format.
# key_path = "/path/to/tiflash-server-key.pem"
```

### Configure the `tiflash-learner.toml` file
Expand Down