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

Additional masking functions to be applied to log fields #87

Merged
merged 6 commits into from
Jul 24, 2022
Merged

Conversation

detro
Copy link
Contributor

@detro detro commented Jul 21, 2022

Closes #86

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

My main concern with updating the existing functions in-place here is that the "Message" part of the function names is now not accurate -- we had gotten explicit in the naming so it was very clear what was going to be masked or omitted. I see a few options here:

  • Leave/Deprecate *MaskMessage* functions with their existing functionality and introduce *MaskLog* functions that do what is now implemented here.
  • Introduce new logging options and functions separately, e.g. make new LoggingOptions.MaskAllFieldValueRegexes etc. fields, then create mask functions which set only those new fields (which ApplyMask would separately check for), then potentially also create *MaskLog* functions which set both the old and new fields (thereby implementing both masking concepts)

I personally think the latter of offering provider developers the differing options is better, since sensitive data locations may either be very known but generically filtered (e.g. I always want to filter messages containing an email, but not my special email field) or very unknown (e.g. just never show this type of data ever).

internal/logging/filtering.go Show resolved Hide resolved
@detro
Copy link
Contributor Author

detro commented Jul 21, 2022

I like the second. Will change the PR tomorrow.

@detro detro requested a review from bflad July 22, 2022 15:38
@detro detro changed the title Apply regexp/strings matching/search masking, to log field values, when they are strings Additional masking functions to be applied to log fields Jul 22, 2022
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

This looks awesome to me 🚀 Nice!

@detro detro merged commit b3ff5d7 into main Jul 24, 2022
@detro detro deleted the detro/#86 branch July 24, 2022 09:11
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider Support for Masking Portions of a Field Value
2 participants