-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
*: update the recent improvements about tls/security #2417
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b6604e1
statements: add alter instance
lysu 1eac656
link enable client tls docs
lysu b9046a2
add cluster reload
lysu b79a8ae
add tls config for tidb-ctl
lysu b720e08
add require secure connection to enable tls clients
lysu 6c53244
add cn check doc
lysu 1e7ac2f
fix lint
lysu b201c6d
fix doc
lysu f5f6302
Merge branch 'master' into update-tls-docs
lysu c4f4909
Update how-to/secure/enable-tls-clients.md
lysu 7b9f7eb
Update how-to/secure/enable-tls-clients.md
lysu e91ca3e
Update how-to/secure/enable-tls-clients.md
lysu df585e6
Update how-to/secure/enable-tls-clients.md
lysu 2d56556
Update reference/sql/statements/alter-instance.md
lysu c1a2f7d
Apply suggestions from code review
lysu e8a9831
Update reference/sql/statements/alter-instance.md
lysu b289e89
Update how-to/secure/enable-tls-between-components.md
lysu 8ed83c6
Update reference/sql/statements/alter-instance.md
lysu a016780
refine format
TomShawn e035241
Merge branch 'master' into update-tls-docs
sre-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: ALTER INSTANCE | ||
summary: TiDB 数据库中 ALTER INSTANCE 的使用概况。 | ||
category: reference | ||
--- | ||
|
||
# ALTER INSTANCE | ||
|
||
`ALTER INSTANCE` 语句用于对单个 TiDB 实例进行变更操作。目前 TiDB 仅支持 `RELOAD TLS` 子句。 | ||
|
||
## RELOAD TLS | ||
|
||
`ALTER INSTACE RELOAD TLS` 语句用于从原配置的证书 ([`ssl-cert`](/reference/configuration/tidb-server/configuration-file.md#ssl-cert))、密钥 ([`ssl-key`](/reference/configuration/tidb-server/configuration-file.md#ssl-key)) 和 CA ([`ssl-ca`](/reference/configuration/tidb-server/configuration-file.md#ssl-ca)) 的路径重新加证书、密钥和 CA。 | ||
|
||
新加载的证书密钥和 CA 将在语句执行成功后对新建立的连接生效,不会影响语句执行前已建立的连接。 | ||
|
||
在重加载遇到错误时默认会报错返回且继续使用变更前的密钥和证书,但在添加可选的 `NO ROLLBACK ON ERROR` 后遇到错误将不报错并以关闭 TLS 安全连接功能的方式处理后续请请求。 | ||
lysu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## 语法图 | ||
|
||
![AlterInstanceStmt](/media/sqlgram/AlterInstanceStmt.png) | ||
|
||
## 示例 | ||
|
||
{{< copyable "sql" >}} | ||
|
||
```sql | ||
ALTER INSTANCE RELOAD TLS; | ||
``` | ||
|
||
## MySQL 兼容性 | ||
|
||
仅支持从原配置路径重加载,不支持动态修改加载路径,也不支持动态启用启动 TiDB 时未开启的 TLS 加密连接功能。 | ||
|
||
## 另请参阅 | ||
|
||
* [Enable Client TLS](/how-to/secure/enable-tls-clients.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是分别在 TiDB/TiKV/PD 的配置文件中加入这些配置吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的, 和前面一段 https://github.com/pingcap/docs-cn/blob/c1a2f7df408b3a2d88287d6cc72c6ec892070960/how-to/secure/enable-tls-between-components.md#tidb-%E9%9B%86%E7%BE%A4%E7%BB%84%E4%BB%B6%E9%97%B4%E5%BC%80%E5%90%AF-tls%E5%8F%8C%E5%90%91%E8%AE%A4%E8%AF%81 一样在改配置