This repository was archived by the owner on Aug 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 221
Explain how to sanitize url
parameters
#760
Closed
antonpirker
wants to merge
7
commits into
master
from
antonpirker/parameterize_http_integration_urls
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
097002b
Add explanation on how to parameterize the url data.
antonpirker 7646205
Made it work for breadcrumbs and span descriptions.
antonpirker 661db9c
Fixed typos
antonpirker 190c1d8
Wording.
antonpirker ab0df14
Wording
antonpirker 1d7a8fe
Added config option. (very raw)
antonpirker b01a2df
Update src/docs/sdk/features.mdx
antonpirker 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 hidden or 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 |
---|---|---|
|
@@ -268,6 +268,36 @@ If Performance Monitoring is both supported by the SDK and enabled in the client | |
- span status must match HTTP response status code ([see Span status to HTTP status code mapping](/sdk/event-payloads/span/)) | ||
- when network error occurs, span status must be set to `internal_error` | ||
|
||
|
||
### Scrubbing Sensitive Data | ||
|
||
HTTP Client Integrations record the URLs of HTTP requests. URLs can contain two categories of sensitive information: | ||
* Privacy related data like passwords, private keys, etc. | ||
* Personally identifiable information (PII) like email addresses, addresses, names, social security numbers, etc. | ||
|
||
#### Privacy Related Data | ||
|
||
The SDKs must scrub privacy-related data from the `url` in breadcumbs and `$url` in span descriptions. | ||
|
||
The username and passwords that can be included in an URL (like `https://username:password123@example.com`) must always be scrubbed. | ||
|
||
Query params that contain sensitive information must also be redacted. | ||
|
||
The SDK should maintain a list of query params that can include sensitive data. The default of the list should be the same list that relay uses to scrub sensitive data: https://github.com/getsentry/relay/blob/master/relay-general/src/pii/regexes.rs#L272 | ||
|
||
The values of all query parameters whose name is in the list of params with sensitive data must be scrubbed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once we have the list of params, we should add them here. |
||
|
||
This example URL `https://username:password@example.com/bla/blub?token=abc&sessionid=123&save=true&secret=geheim123#fragment` has to be modified to look like this `https://%s:%s@example.com/bla/blub?token=%s&sessionid=123&save=true&secret=%s#fragment`. | ||
|
||
#### Personally Identifiable Information (PII) | ||
|
||
SDKs should also give the user the possibility to define a custom list of query param names that should be scrubbed. Given the user full control over what data gets sent do Sentry. | ||
|
||
There should be a config option to the SDKs `init()` call that can set a list of query params that should be scrubbed. By setting this config option the default list of query params with sensitive data is overridden. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still need to specify the name of the option, once we decided on one. |
||
|
||
This way it is possible to set additional query params to be scrubbed, but also make it possible for the user to not scrubbing any query params. (Which is not recommended) | ||
|
||
|
||
### HTTP Client Errors | ||
|
||
The SDK automatically captures HTTP Client errors and sends them to [sentry.io](https://sentry.io). | ||
|
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.
🥇 for specifying the subject and using the active voice.