-
Notifications
You must be signed in to change notification settings - Fork 257
Make URL Redaction more dynamic #2716
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
Open
rads-1996
wants to merge
10
commits into
microsoft:main
Choose a base branch
from
rads-1996:dynamic-config-for-url-redaction
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+153
−22
Open
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e0651b7
Make URL Redaction more dynamic
rads-1996 8d1de51
Add missing colon
rads-1996 b4d41fd
Retrigger CI/CD pipeline
rads-1996 781fa52
Addressed feedback, modified config
rads-1996 9a25f45
Retrigger CI/CD pipeline
rads-1996 53aa2c8
Fix comparison issue
rads-1996 8368977
Fix comparison issue for false
rads-1996 ddc2531
Fix enum issue
rads-1996 0859848
Push changes after rebuild
rads-1996 1822734
Fix string literal issue
rads-1996 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
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
41 changes: 41 additions & 0 deletions
41
shared/AppInsightsCore/src/enums/ai/UrlRedactionOptions.ts
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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| /** | ||
| * Controls how the user can configure which parts of the URL should be redacted. Example, certain query parameters, username and password, etc. | ||
| * @since <next_release_version> | ||
rads-1996 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| */ | ||
| export const enum UrlRedactionOptions { | ||
| /** | ||
| * The default value, will redact the username and password as well as the default set of query parameters | ||
| */ | ||
| true = 1, | ||
|
|
||
| /** | ||
| * Does not redact username and password or any query parameters, the URL will be left as is. Note: this is not recommended as it may lead | ||
| * to sensitive data being sent in clear text. | ||
| */ | ||
| false = 2, | ||
|
|
||
| /** | ||
| * This will append any additional queryParams that the user has provided through redactQueryParams config to the default set i.e to | ||
| * @defaultValue ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"]. | ||
| */ | ||
| append = 3, | ||
|
|
||
| /** | ||
| * This will replace the default set of query parameters to redact with the query parameters defined in redactQueryParams config, if provided by the user. | ||
| */ | ||
| replace = 4, | ||
|
|
||
| /** | ||
| * This will redact username and password in the URL but will not redact any query parameters, even those in the default set. | ||
| */ | ||
| usernamePasswordOnly = 5, | ||
|
|
||
| /** | ||
| * This will only redact the query parameter in the default set of query parameters to redact. It will not redact username and password. | ||
| */ | ||
| queryParamsOnly = 6, | ||
|
|
||
| } | ||
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.