-
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
feat(general): Scrub all fields with IP address #1725
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
537defe
Scrub all fields with IP address
TBS1996 26fcb0b
add PR number to changelog
TBS1996 d8d1a43
Merge branch 'master' into feat/scrub_ip
TBS1996 13de398
Update CHANGELOG.md
TBS1996 c3e3bd3
test ip scrubbing in more fields
TBS1996 fc60045
merge user and sdk ip strip tests
TBS1996 2e37a03
fix misplaced data field
TBS1996 cf2f916
Merge branch 'master' into feat/scrub_ip
TBS1996 40ad796
re-implement scrubbing of known ip fields regardless of content
TBS1996 79b96c4
Update relay-general/src/pii/convert.rs
TBS1996 4d9e051
push ip:replace directly to applied_rules
TBS1996 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As we talked in the meeting, can we also make sure to test that the IPs are scrubbed also from inside the strings, e.g.
which should result in something like
or make sure this actually can work?
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.
I would create a separate issue for this, as it would also the touch IP scrubbing for users who configured it manually through advanced data scrubbing.