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

scrub the secrets #4203

Merged
merged 2 commits into from
Nov 4, 2021
Merged

scrub the secrets #4203

merged 2 commits into from
Nov 4, 2021

Conversation

nathaniel-may
Copy link
Contributor

@nathaniel-may nathaniel-may commented Nov 3, 2021

Description

Uses the same strategy that we use today via LogBook just via a simple function call. I decided not to use the built-in scrubbing from structlog because it's made to scrub named fields, which we are not doing here. We only have the values.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change

Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

Looks good - FYI there's a commit in the main branch ahead of when this branched off that uses scrubbing in exceptions.py

@emmyoop
Copy link
Member

emmyoop commented Nov 4, 2021

Tests also import SECRET_ENV_PREFIX to build secrets so it should probably stay a var.

@nathaniel-may
Copy link
Contributor Author

Thanks for the heads up @emmyoop. It looks like the commit in exceptions.py is going to work just fine with the new system. I also agree that since the var is used in tests I should be referencing it as well. We can move it out of the old logger module later.

@nathaniel-may nathaniel-may merged commit 9121743 into feature/structured-logging Nov 4, 2021
@nathaniel-may nathaniel-may deleted the log-scrubbing branch November 4, 2021 15:23
emmyoop pushed a commit that referenced this pull request Nov 8, 2021
scrub secrets in event module
emmyoop pushed a commit that referenced this pull request Nov 8, 2021
scrub secrets in event module
kwigley pushed a commit that referenced this pull request Nov 9, 2021
scrub secrets in event module
nathaniel-may pushed a commit that referenced this pull request Nov 9, 2021
scrub secrets in event module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants