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

Update the log redaction documentation #17835

Merged
merged 8 commits into from
Aug 14, 2024

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Jul 2, 2024

What is changed, added or deleted? (Required)

Update the log redaction documentation.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Change aliases

@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 2, 2024
log-redaction.md Outdated
[2024/07/02 11:35:01.426 +08:00] [INFO] [conn.go:1146] ["command dispatched failed"] [conn=1482686470] [session_alias=] [connInfo="id:1482686470, addr:127.0.0.1:52258 status:10, collation:utf8mb4_0900_ai_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="insert into `t` values ( ‹1› ) , ( ‹1› )"] [txn_mode=PESSIMISTIC] [timestamp=450859185309483010] [err="[kv:1062]Duplicate entry '‹1›' for key 't.a'"]
```

从以上报错日志可以看到,当把 `tidb_redact_log` 的值设为 `MARKER` 后,TiDB 日志中会用单角形引号 `‹›` 标记出敏感信息,用户可以根据自己的需求自定义脱敏规则来处理日志中的敏感信息。
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "单角形引号" is sourced from https://zh.wikipedia.org/wiki/Guillemet, though I am uncertain about its accurate translation in Chinese.

@JmPotato JmPotato mentioned this pull request Jul 2, 2024
5 tasks
log-redaction.md Outdated

## PD 组件日志脱敏

PD 侧的日志脱敏需要将 [`security.redact-info-log`](/pd-configuration-file.md#redact-info-log-从-v50-版本开始引入) 的值设为 `true`。该配置项值默认为 `false`,即关闭脱敏。
PD 侧的日志脱敏需要将 [`security.redact-info-log`](/pd-configuration-file.md#redact-info-log-从-v50-版本开始引入) 的值设为 `true` 或 `"MARKER"`。该配置项值默认为 `false`,即关闭脱敏。
Copy link
Contributor

@JaySon-Huang JaySon-Huang Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PD 支持设置为小写的 "marker" 么?因为配置文件里面的其他配置项 value 应该都是小写的,配置文件里面出现大写会有些不和谐。
(tiflash 代码上是支持这个配置项的 value 大小写忽略的,但文档上只写小写的 "marker")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PD 也是这样,大小写均可,我统一一下只写小写 marker 吧。

@LykxSassinator
Copy link
Contributor

/cc @qiancai

@ti-chi-bot ti-chi-bot bot requested a review from qiancai July 17, 2024 09:40
@hfxsd hfxsd self-assigned this Jul 23, 2024
@hfxsd hfxsd added v8.3 translation/doing This PR’s assignee is translating this PR. and removed missing-translation-status This PR does not have translation status info. labels Jul 23, 2024
@hfxsd hfxsd self-requested a review July 23, 2024 03:04
tikv-configuration-file.md Outdated Show resolved Hide resolved
log-redaction.md Outdated Show resolved Hide resolved
log-redaction.md Outdated Show resolved Hide resolved
pd-configuration-file.md Outdated Show resolved Hide resolved
tiflash/tiflash-configuration.md Show resolved Hide resolved
@qiancai qiancai removed their request for review July 24, 2024 02:44
@hfxsd hfxsd added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Jul 24, 2024
JmPotato and others added 4 commits July 25, 2024 11:21
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
log-redaction.md Outdated Show resolved Hide resolved
Co-authored-by: xixirangrang <hfxsd@hotmail.com>
log-redaction.md Outdated Show resolved Hide resolved
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Aug 1, 2024

@JaySon-Huang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

ti-chi-bot bot commented Aug 1, 2024

@LykxSassinator: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

ti-chi-bot bot commented Aug 2, 2024

@ljun0712: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@hfxsd hfxsd added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Aug 6, 2024
@hfxsd hfxsd requested a review from lilin90 August 6, 2024 07:26
log-redaction.md Outdated Show resolved Hide resolved
pd-configuration-file.md Outdated Show resolved Hide resolved
pd-configuration-file.md Outdated Show resolved Hide resolved
pd-configuration-file.md Outdated Show resolved Hide resolved
tikv-configuration-file.md Outdated Show resolved Hide resolved
log-redaction.md Outdated Show resolved Hide resolved
Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 12, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 14, 2024
Copy link

ti-chi-bot bot commented Aug 14, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-12 06:44:28.805108046 +0000 UTC m=+163953.508577689: ☑️ agreed by lilin90.
  • 2024-08-14 08:22:57.187394947 +0000 UTC m=+342661.890864590: ☑️ agreed by hfxsd.

@hfxsd
Copy link
Collaborator

hfxsd commented Aug 14, 2024

/approve

Copy link

ti-chi-bot bot commented Aug 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Aug 14, 2024
@ti-chi-bot ti-chi-bot bot merged commit a39d6d9 into pingcap:master Aug 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. v8.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants