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

[INLONG-7952][Sort] Mask sensitive message of Flink SQL in the logs #7953

Merged
merged 2 commits into from
May 5, 2023

Conversation

e-mhui
Copy link
Contributor

@e-mhui e-mhui commented May 1, 2023

Prepare a Pull Request

[INLONG-7952][Sort] Mask sensitive message of Flink SQL in the logs

Motivation

The logs printed in Inlong contain password message in Flink SQL, and we hope to replace the password or other sensitive message with * for display.

4123 [main] INFO  org.apache.inlong.sort.parser.impl.FlinkSqlParser [] - start parse node, node id:1
4131 [main] INFO  org.apache.inlong.sort.parser.impl.FlinkSqlParser [] - node id:1, create table sql:
CREATE TABLE `table_1`(
    PRIMARY KEY (`id`) NOT ENFORCED,
    `id` INT,
    `name` STRING,
    `age` INT)
    WITH (
    'inlong.metric.labels' = 'groupId=1&streamId=1&nodeId=1',
    'connector' = 'mysql-cdc-inlong',
    'hostname' = 'localhost',
    'database-name' = 'test',
    'port' = '3306',
    'server-id' = '10011',
    'scan.incremental.snapshot.enabled' = 'true',
    'username' = 'root',
    'password' = '******',
    'table-name' = 'user'
)

Modifications

Mask sensitive message at the location where Flink SQL is printed.

Verifying this change

Run MaskDataUtilsTest.java

@EMsnap EMsnap merged commit 3f4ebb5 into apache:master May 5, 2023
GanfengTan pushed a commit to GanfengTan/incubator-inlong that referenced this pull request May 10, 2023
Yizhou-Yang pushed a commit to Yizhou-Yang/inlong-yyz that referenced this pull request May 30, 2023
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.

[Improve][Sort] Mask sensitive message of Flink SQL in the logs
4 participants