-
Notifications
You must be signed in to change notification settings - Fork 91
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
fix(pii): Mark sentry_user field as PII #3948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is extracting after PII scrubbing feasible?
This works now for IP addresses but not custom rules where the Sentry user specifically targets the ip field.
@@ -81,7 +81,7 @@ pub struct User { | |||
/// This field is computed by concatenating the name of specific fields of the `User` | |||
/// struct with their value. For example, if `id` is set, `sentry_user` will be equal to | |||
/// `"id:id-of-the-user". | |||
#[metastructure(skip_serialization = "empty")] | |||
#[metastructure(pii = "true", skip_serialization = "empty")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mini nit: I would put this field declaration right after name
, i.e. group it with the fields it is constructed from.
I tried switching around PII stripping and normalization (where |
Yes I'm afraid we cannot move all of event normalization after PII scrubbing. But we could introduce a new "post-pii normalization" step that for now only contains the creation of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the issue at hand for now, thinking about re-ordering processing is probably a not so easy/big task, think we should move forward with this. @jjbayer wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the issue at hand for now, thinking about re-ordering processing is probably a not so easy/big task, think we should move forward with.
Yep
This marks
User::sentry_user
as PII so it gets scrubbed correctly.Fixes #3917.
#skip-changelog