-
Notifications
You must be signed in to change notification settings - Fork 702
cloud: initial doc user-controlled log redaction #21214
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
ti-chi-bot
merged 10 commits into
pingcap:release-8.1
from
ginkgoch:feature/tidb-cloud-log-redaction
Jun 24, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
78e6fa1
cloud: initial doc user-controlled log redaction
ginkgoch 71fab47
cloud: update based on suggestions
ginkgoch 81a8040
cloud: add log redaction to toc
ginkgoch 26175ee
Update tidb-cloud-log-redaction.md
hfxsd fd30272
Update tidb-cloud-log-redaction.md
hfxsd 6067088
Update tidb-cloud-log-redaction.md
hfxsd 3f35b44
Update tidb-cloud-log-redaction.md
hfxsd b8efef2
Apply suggestions from code review
hfxsd 3c5c4ff
Update tidb-cloud/tidb-cloud-log-redaction.md
hfxsd 1004079
Update tidb-cloud/tidb-cloud-log-redaction.md
hfxsd 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,74 @@ | ||
--- | ||
title: User-Controlled Log Redaction | ||
summary: Learn how to enable or disable user-controlled log redaction for TiDB Cloud Dedicated clusters to manage sensitive data visibility in execution logs. | ||
--- | ||
|
||
# User-Controlled Log Redaction | ||
|
||
User-controlled log redaction lets you manage the visibility of sensitive data in your [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) cluster logs. By toggling this redaction feature, you can protect your information, balance operational needs with security, and control what appears in your cluster logs. | ||
|
||
Log redaction is enabled by default, ensuring that sensitive information in running logs and execution plans is concealed. If you need more detailed log information for cluster maintenance or SQL tuning, you can disable this feature at any time. | ||
|
||
> **Note:** | ||
> | ||
> The log redaction feature is only supported for TiDB Cloud Dedicated clusters. | ||
|
||
## Prerequisites | ||
|
||
* You must be in the **Organization Owner** or **Project Owner** role of your organization in TiDB Cloud. | ||
* Log redaction cannot be enabled or disabled when the cluster is in the `paused` state. | ||
|
||
## Disable log redaction | ||
|
||
> **Warning:** | ||
> | ||
> Disabling log redaction might expose sensitive information and increase the risk of data leakage. Ensure that you understand and acknowledge this risk before proceeding. Remember to re-enable it as soon as you complete your diagnostic or maintenance task. | ||
|
||
To disable log redaction, do the following: | ||
|
||
1. Log in to the [TiDB Cloud console](https://tidbcloud.com/). | ||
2. Navigate to the [**Clusters**](https://tidbcloud.com/project/clusters) page, and then click the name of your target cluster to go to its overview page. | ||
|
||
> **Tip:** | ||
> | ||
> You can use the combo box in the upper-left corner to switch between organizations, projects, and clusters. | ||
|
||
3. In the left navigation pane, click **Settings** > **Security**. | ||
4. In the **Execution Log Redaction** section, you can see that the redaction feature is **Enabled** by default. | ||
5. Click **Disable**. A warning appears, explaining the risks of disabling log redaction. | ||
6. Confirm the disabling. | ||
|
||
After disabling log redaction, note the following: | ||
|
||
* The change only applies to new database connections. | ||
* Existing connections are unaffected. You need to reconnect them for the changes to take effect. | ||
* Logs for new sessions will no longer be redacted. | ||
|
||
## Check the updated logs | ||
|
||
To check the updated logs after log redaction is disabled, do the following: | ||
|
||
1. Simulate a performance issue caused by a slow query. For example, execute the following SQL statement: | ||
|
||
```sql | ||
SELECT *, SLEEP(2) FROM users WHERE email LIKE "%useremail%"; | ||
``` | ||
|
||
2. Wait a few minutes for the slow query log to update. | ||
3. Review the log to confirm that the sensitive data is not redacted. | ||
|
||
## Enable log redaction | ||
|
||
To maintain data security, **enable log redaction** as soon as you complete your diagnostic or maintenance task as follows. | ||
|
||
1. Log in to the [TiDB Cloud console](https://tidbcloud.com/). | ||
2. Navigate to the [**Clusters**](https://tidbcloud.com/project/clusters) page, and then click the name of your target cluster to go to its overview page. | ||
|
||
> **Tip:** | ||
> | ||
> You can use the combo box in the upper-left corner to switch between organizations, projects, and clusters. | ||
|
||
3. In the left navigation pane, click **Settings** > **Security**. | ||
4. In the **Execution Log Redaction** section, you can see that the redaction feature is **Disabled**. | ||
5. Click **Enable** to enable it. | ||
6. Reconnect to the database for the change to take effect on new sessions. |
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.