-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adding Redacted Keys #217
Open
clr182
wants to merge
24
commits into
next
Choose a base branch
from
PLAT-4543-AddRedactedKeys
base: next
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.
Open
Adding Redacted Keys #217
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3d06a86
Adding Redacted Keys
clr182 bce2bc4
Fixed check tests
clr182 6ec55a3
Fixed conflicting filters and redacted keys tests
clr182 9ac6180
update AutoRedactedKeysScenario.java
clr182 fc657ac
altered default filters string array in the configuration
clr182 6f774b4
update CHANGELOG
clr182 42ec37b
Changes to RedactedKeysMap
clr182 0fd5542
remove duplicate filter config
clr182 088aa21
fix fixed reference errors
clr182 1c840e1
config option broken
clr182 16760f5
Added tests to check regex matching
clr182 415f03e
scenario syntax fix
clr182 9b2e42d
Changes to add back public filters
clr182 4dab99e
updated variable names
clr182 9e9e84b
Update bugsnag/src/test/resources/logback.xml
clr182 c17fb7c
Merge branch 'next' into PLAT-4543-AddRedactedKeys
clr182 2fc8d1c
Converting to Patterns
clr182 a536540
update javadoc reference
clr182 a3e5fd0
setRedactedKey to string parameter rather than pattern for logback
clr182 cae37b6
adding in scenarios
clr182 0fc2727
Adding Pattern import to scenario
clr182 089e3a8
filters are appended to setRedactedKeys
clr182 d1dbada
Update bugsnag/src/main/java/com/bugsnag/Bugsnag.java
clr182 51203d1
Added concat list
clr182 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
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -38,6 +38,7 @@ public class Configuration { | |||||||||
public Delivery delivery = new AsyncHttpDelivery(SyncHttpDelivery.DEFAULT_NOTIFY_ENDPOINT); | ||||||||||
public Delivery sessionDelivery = | ||||||||||
new AsyncHttpDelivery(SyncHttpDelivery.DEFAULT_SESSION_ENDPOINT); | ||||||||||
public String[] redactedKeys = new String[]{"password", "secret", "Authorization", "Cookie"}; | ||||||||||
public String[] filters = new String[]{"password", "secret", "Authorization", "Cookie"}; | ||||||||||
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. I think it would be appropriate to set this to the same instance rather than a different array with the same content. Just in case anyone is amending elements in the array.
Suggested change
|
||||||||||
public String[] ignoreClasses; | ||||||||||
public String[] notifyReleaseStages = null; | ||||||||||
|
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
122 changes: 0 additions & 122 deletions
122
bugsnag/src/main/java/com/bugsnag/util/FilteredMap.java
This file was deleted.
Oops, something went wrong.
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.
Unfortunately we're stuck with Configuration.filters being public, so we probably want to keep
filters
andredactedKeys
synchronised otherwise things could get confusing if both are used for any reason. Suggest also settingconfig.filters
here and removing the line fromsetFilters
above?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.
Looking at the changes, I wonder if in fact this change is more risky as a non-breaking change than I thought as we'll need to compile the filter strings as regexes (L249). At very least we need a try-catch for a
PatternSyntaxException
, but it makes me a bit nervous even if 99.9% of users will have pretty straightforward key names with an occasional.
which will still match a literal.
.@lemnik - thoughts here? The alternative is that we go back to running the two config options independently alongside each other (which I think was @clr182's first take).