Skip to content

Redact passwords in log file#4198

Merged
big-r81 merged 1 commit intomainfrom
redact_passwords_in_logs
Oct 9, 2022
Merged

Redact passwords in log file#4198
big-r81 merged 1 commit intomainfrom
redact_passwords_in_logs

Conversation

@big-r81
Copy link
Copy Markdown
Contributor

@big-r81 big-r81 commented Oct 7, 2022

In some log messages user passwords were not redacted.

Examples:

[debug] 2022-10-06T18:36:24.615459Z node1@127.0.0.1 <0.659.0> 3f924ac1d2 Enable Cluster: [{node_count,3},{bind_address,<<"0.0.0.0">>},{password,<<"a">>},{username,<<"a">>}]

[debug] 2022-10-06T18:36:24.786483Z node1@127.0.0.1 <0.821.0> 969ca45f27 add node_int: [{name,<<"node2">>},{port,25984},{host,<<"127.0.0.1">>},{password,<<"a">>},{username,<<"a">>}]

[notice] 2022-10-06T18:36:26.778453Z node1@127.0.0.1 <0.840.0> ff4625a79a Setup: [{<<"action">>,<<"add_node">>},{<<"host">>,<<"127.0.0.1">>},{<<"port">>,35984},{<<"name">>,<<"node3">>},{<<"username">>,<<"a">>},{<<"password">>,<<"****">>}]

Move and introduce a global helper function remove_sensitive_data to redact passwords.

In some log messages user passwords were not redacted. Move and
introduce a global helper function `remove_sensitive_data` to redact
passwords.
@big-r81 big-r81 force-pushed the redact_passwords_in_logs branch from d2eb723 to 892da7b Compare October 7, 2022 07:48
Copy link
Copy Markdown
Contributor

@nickva nickva left a comment

Choose a reason for hiding this comment

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

+1 good idea

@big-r81 big-r81 merged commit 0c58422 into main Oct 9, 2022
@big-r81 big-r81 deleted the redact_passwords_in_logs branch October 9, 2022 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants