Skip to content

*: add column-level masking policy feature document#21454

Open
tiancaiamao wants to merge 7 commits into
masterfrom
column-masking-policy
Open

*: add column-level masking policy feature document#21454
tiancaiamao wants to merge 7 commits into
masterfrom
column-masking-policy

Conversation

@tiancaiamao
Copy link
Copy Markdown
Contributor

@tiancaiamao tiancaiamao commented Mar 23, 2026

First-time contributors' checklist

What is changed, added or deleted? (Required)

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

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

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

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 23, 2026
@ti-chi-bot ti-chi-bot Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 23, 2026
@hfxsd hfxsd added translation/doing This PR’s assignee is translating this PR. and removed missing-translation-status This PR does not have translation status info. labels Mar 24, 2026
@qiancai
Copy link
Copy Markdown
Collaborator

qiancai commented Mar 24, 2026

@tiancaiamao Please involve a tech reviewer for this PR. Thanks.

@qiancai qiancai added the v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. label Mar 24, 2026
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
@qiancai qiancai self-assigned this Apr 17, 2026
@tiancaiamao tiancaiamao requested a review from bb7133 May 9, 2026 02:56
@bb7133
Copy link
Copy Markdown
Member

bb7133 commented May 9, 2026

Please address the comments~

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 9, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiancai. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

Details 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

Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Co-authored-by: Grace Cai <qqzczy@126.com>
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
| `INSERT_INTO_SELECT` | 阻止通过 `INSERT ... SELECT` 将脱敏数据插入另一个表 |
| `UPDATE_SELECT` | 阻止通过 `UPDATE ... SET = (SELECT ...)` 使用脱敏数据进行更新 |
| `DELETE_SELECT` | 阻止通过 `DELETE ... WHERE ... IN (SELECT ...)` 基于脱敏数据进行删除 |
| `CTAS` | 阻止使用脱敏数据进行 Create Table As Select |
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@qiancai 这里是否特殊说明一下,CTAS 其实是没有实现的,或者叫保留给将来使用
原因不是 column masking 这边没做实现
而是说,由于我们的 DDL 那边本身是没有支持 create table as select 这样的用法
必须分成两步做,create table like + insert into select
由于没有 create table as select 的实现,column masking 也就没有实际 去实现 CTAS

Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Comment thread column-level-masking-policy.md Outdated
Co-authored-by: Grace Cai <qqzczy@126.com>
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 20, 2026

@tiancaiamao: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-verify d73e99f link true /test pull-verify

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@tiancaiamao tiancaiamao requested a review from qiancai May 20, 2026 08:39
@tiancaiamao
Copy link
Copy Markdown
Contributor Author

address comment, PTAL @qiancai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. translation/doing This PR’s assignee is translating this PR. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants