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

feat: support mask_inner and mask_outer #11975

Merged

Conversation

Azusain
Copy link
Contributor

@Azusain Azusain commented May 13, 2024

No description provided.

proto/store/setting.proto Outdated Show resolved Hide resolved
proto/store/setting.proto Show resolved Hide resolved
@ecmadao
Copy link
Collaborator

ecmadao commented May 13, 2024

And we can use the RangeMask to define the masker just same as the InnerOuterMask, so I'm not sure its scenario.
Also, the InnerOuterMask cannot define an algorithm to mask the prefix and suffix at the same time, but the RangeMask can do.

@Azusain Azusain requested a review from ecmadao May 13, 2024 09:01
proto/store/setting.proto Outdated Show resolved Hide resolved
backend/component/masker/masker.go Outdated Show resolved Hide resolved
backend/component/masker/masker.go Outdated Show resolved Hide resolved
backend/component/masker/masker.go Outdated Show resolved Hide resolved
backend/component/masker/masker.go Outdated Show resolved Hide resolved
@h3n4l
Copy link
Member

h3n4l commented May 13, 2024

Also, the InnerOuterMask cannot define an algorithm to mask the prefix and suffix at the same time, but the RangeMask can do.

IMO, use mask outer can do this:
mysql> SELECT mask_outer('This is a string', 5, 1);
+--------------------------------------+
| mask_outer('This is a string', 5, 1) |
+--------------------------------------+
| XXXXXis a strinX |
+--------------------------------------+

https://dev.mysql.com/doc/refman/5.7/en/data-masking-usage.html

Copy link
Collaborator

@ecmadao ecmadao left a comment

Choose a reason for hiding this comment

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

The proto LGTM

Copy link
Contributor

@rebelice rebelice left a comment

Choose a reason for hiding this comment

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

LG, otherwise

backend/component/masker/masker.go Outdated Show resolved Hide resolved
backend/component/masker/masker.go Outdated Show resolved Hide resolved
Copy link
Member

@h3n4l h3n4l left a comment

Choose a reason for hiding this comment

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

LGTM

@Azusain Azusain merged commit 390dd4f into bytebase:main May 15, 2024
15 checks passed
@Azusain Azusain deleted the tommy/byt-4499-support-mask_inner-and-mask_outer branch May 15, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants