-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refine enable tls for client/components #3325
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ca518a7
refine enable tls between coms
lysu 382b61c
refine client-server tls
lysu 987da19
Merge branch 'docs-special-week' into dev-enable-tls
lysu 23041ed
refine footer
lysu 255d4db
fix lint
lysu e0730c0
fix lint
lysu 6fbed80
Merge branch 'docs-special-week' into dev-enable-tls
lysu 9416e5b
Apply suggestions from code review
lysu 477a05a
Apply suggestions from code review
lysu c06f613
Merge branch 'docs-special-week' into dev-enable-tls
lysu 5e47c05
Update enable-encrypt-stored-data.md
TomShawn 656a743
Merge branch 'docs-special-week' into dev-enable-tls
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 hidden or 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 hidden or 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,45 @@ | ||
| --- | ||
| title: 为 TiDB 开启数据加密存储 | ||
| summary: 介绍如何为 TiDB 开启数据加密存储。 | ||
| category: how-to | ||
| --- | ||
|
|
||
| # 为 TiDB 开启数据加密存储 | ||
|
|
||
| 在 TiDB 集群中,用户的数据都存储在 TiKV 中,配置了 TiKV 数据加密存储功能,就代表 TiDB 集群已经加密存储了用户的数据。本部分主要介绍如何配置 TiKV 的加密存储功能。 | ||
|
|
||
| ## 操作流程 | ||
|
|
||
| 1. 生成 token 文件。 | ||
|
|
||
| token 文件存储的是密钥,用于对用户数据进行加密,以及对已加密的数据进行解密。 | ||
|
|
||
| {{< copyable "shell-regular" >}} | ||
|
|
||
| ```bash | ||
| ./tikv-ctl random-hex --len 256 > cipher-file-256 | ||
| ``` | ||
|
|
||
| > **注意:** | ||
| > | ||
| > TiKV 只接受 hex 格式的 token 文件,文件的长度必须是 2<sup>n</sup>,并且小于等于 1024。 | ||
|
|
||
| 2. 配置 TiKV。 | ||
|
|
||
| ```toml | ||
| [security] | ||
| # Cipher file 的存储路径 | ||
| cipher-file = "/path/to/cipher-file-256" | ||
| ``` | ||
|
|
||
| > **注意:** | ||
| > | ||
| > 若使用 [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md) 向集群导入数据,如果目标集群开启了加密功能,Lightning 生成的 SST 文件也必须是加密的格式。 | ||
|
|
||
| ## 使用限制 | ||
|
|
||
| 目前 TiKV 数据加密存储存在以下限制: | ||
|
|
||
| - 对之前没有开启加密存储的集群,不支持开启该功能。 | ||
| - 已经开启加密功能的集群,不允许关闭加密存储功能。 | ||
| - 同一集群内部,不允许部分 TiKV 实例开启该功能,部分 TiKV 实例不开启该功能。对于加密存储功能,所有 TiKV 实例要么都开启该功能,要么都不开启该功能。这是由于 TiKV 实例之间会有数据迁移,如果开启了加密存储功能,迁移过程中数据也是加密的。 | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.