Skip to content

[Feature][dlink-client] FlinkSQL supports data masking #1931

Description

@HamaWhiteGG

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

Support data masking access control at the user/role level, that is, specific users/roles can only access masking data. Similar to Ranger column masking in offline data warehouse Hive.

Use case

  1. Take the two rows of data in the order table orders as an example, the sample data is as follows

Data mask example data

  1. Set data masking policy,the administrator configures users, tables, columns, and data masking conditions, such as the configuration below.

data-masking-policy

  1. User access data
    When a user queries data in the orders table on Flink, SQL will be regenerated at the bottom layer based on the user's data masking conditions, that is, the data masking will take effect. When user A and user B execute the same SQL below, they will see different result data.
SELECT * FROM orders;

3.1 The result data viewed by user A is as follows, and the data in the customer_name field is completely masked.
Data mask-masked with customer_name after mask

3.2 The result data viewed by user B is as follows. The data in the customer_name field will only display the first 4 digits, and the rest will be replaced by x.
Data mask-masked with customer_name after mask_show_first_4

Related issues

no

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions