diff --git a/CHANGELOG.md b/CHANGELOG.md index b0efd17ec8e..82c97b654cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug Fixes**: - Fix a problem with Data Scrubbing source names (PII selectors) that caused `$frame.abs_path` to match, but not `$frame.abs_path || **` or `$frame.abs_path && **`. ([#932](https://github.com/getsentry/relay/pull/932)) +- Make username pii-strippable. ([#935](https://github.com/getsentry/relay/pull/935)) ## 21.2.0 diff --git a/relay-general/src/pii/snapshots/relay_general__pii__convert__tests__user.snap b/relay-general/src/pii/snapshots/relay_general__pii__convert__tests__user.snap index 871127f17c0..0fc47b14e7c 100644 --- a/relay-general/src/pii/snapshots/relay_general__pii__convert__tests__user.snap +++ b/relay-general/src/pii/snapshots/relay_general__pii__convert__tests__user.snap @@ -5,7 +5,7 @@ expression: data { "user": { "ip_address": null, - "username": "secret", + "username": "[Filtered]", "data": { "a_password_here": "[Filtered]", "apiKey": "[Filtered]", @@ -93,6 +93,19 @@ expression: data ] ] } + }, + "username": { + "": { + "rem": [ + [ + "@password:filter", + "s", + 0, + 10 + ] + ], + "len": 6 + } } } } diff --git a/relay-general/src/protocol/user.rs b/relay-general/src/protocol/user.rs index 3f99652246e..db5b9f71c85 100644 --- a/relay-general/src/protocol/user.rs +++ b/relay-general/src/protocol/user.rs @@ -53,7 +53,7 @@ pub struct User { pub ip_address: Annotated, /// Username of the user. - #[metastructure(pii = "false", max_chars = "enumlike", skip_serialization = "empty")] + #[metastructure(pii = "true", max_chars = "enumlike", skip_serialization = "empty")] pub username: Annotated, /// Human readable name of the user.