-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(general): Scrub all fields with IP address (#1725)
This change will scrub all fields containing an IP address, rather than only scrubbing certain fields known to have them referencing issue #1693 Co-authored-by: Oleksandr <1931331+olksdr@users.noreply.github.com> Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
- Loading branch information
1 parent
588e46a
commit 156c2ae
Showing
8 changed files
with
227 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
relay-general/src/pii/snapshots/relay_general__pii__convert__tests__ip_stripped.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
source: relay-general/src/pii/convert.rs | ||
expression: data | ||
--- | ||
{ | ||
"user": { | ||
"ip_address": null, | ||
"username": "[ip]", | ||
"data": { | ||
"a_password_here": "hello", | ||
"apiKey": "secret_key", | ||
"api_key": "secret_key", | ||
"foo": "bar", | ||
"password": "hello", | ||
"the_secret": "hello" | ||
} | ||
}, | ||
"breadcrumbs": { | ||
"values": [ | ||
{ | ||
"message": "[ip]", | ||
"data": { | ||
"test_data": "[ip]" | ||
} | ||
} | ||
] | ||
}, | ||
"sdk": { | ||
"client_ip": null | ||
}, | ||
"_meta": { | ||
"breadcrumbs": { | ||
"values": { | ||
"0": { | ||
"data": { | ||
"test_data": { | ||
"": { | ||
"rem": [ | ||
[ | ||
"@ip:replace", | ||
"s", | ||
0, | ||
4 | ||
] | ||
], | ||
"len": 13 | ||
} | ||
} | ||
}, | ||
"message": { | ||
"": { | ||
"rem": [ | ||
[ | ||
"@ip:replace", | ||
"s", | ||
0, | ||
4 | ||
] | ||
], | ||
"len": 13 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"sdk": { | ||
"client_ip": { | ||
"": { | ||
"err": [ | ||
[ | ||
"invalid_data", | ||
{ | ||
"reason": "expected an ip address" | ||
} | ||
] | ||
], | ||
"val": "should also be stripped" | ||
} | ||
} | ||
}, | ||
"user": { | ||
"ip_address": { | ||
"": { | ||
"err": [ | ||
[ | ||
"invalid_data", | ||
{ | ||
"reason": "expected an ip address" | ||
} | ||
] | ||
], | ||
"val": "should be stripped despite lacking ip address" | ||
} | ||
}, | ||
"username": { | ||
"": { | ||
"rem": [ | ||
[ | ||
"@ip:replace", | ||
"s", | ||
0, | ||
4 | ||
] | ||
], | ||
"len": 13 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.