-
Notifications
You must be signed in to change notification settings - Fork 93
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
obfuscate ip addresses in alert error message #511
Merged
Merged
Conversation
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
eirsep
requested review from
lezzago,
qreshi,
bowenlan-amzn,
rishabhmaurya,
tlfeng,
getsaurabh02,
sbcd90 and
AWSHurneyt
as code owners
August 17, 2023 22:59
lezzago
previously approved these changes
Aug 17, 2023
Codecov Report
@@ Coverage Diff @@
## main #511 +/- ##
============================================
+ Coverage 74.63% 74.66% +0.02%
Complexity 872 872
============================================
Files 130 130
Lines 5662 5667 +5
Branches 697 697
============================================
+ Hits 4226 4231 +5
Misses 1130 1130
Partials 306 306
|
|
||
fun obfuscateIPAddresses(exceptionMessage: String): String { | ||
val ipAddressPattern = "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" | ||
val obfuscatedMessage = exceptionMessage.replace(ipAddressPattern.toRegex(), "X.X.X.X") |
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.
Maybe use x.x.x.x
lowercase
bowenlan-amzn
previously approved these changes
Aug 18, 2023
lezzago
previously approved these changes
Sep 8, 2023
lezzago
added
backport 2.x
backport 2.4
backport 2.5
backport 2.6
backport 2.7
backport 2.9
backport PR to 2.9
backport 2.10
backport 2.8
labels
Sep 8, 2023
Signed-off-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
lezzago
approved these changes
Sep 8, 2023
bowenlan-amzn
approved these changes
Sep 8, 2023
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This was referenced Sep 8, 2023
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This was referenced Sep 8, 2023
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 8, 2023
* obfuscate ip addresses in alert error message Signed-off-by: Surya Sashank Nistala <[email protected]> * make ip obfuscation lower case Signed-off-by: Surya Sashank Nistala <[email protected]> * update test with lowercase ip obfuscation Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit b8e6e75) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
engechas
pushed a commit
that referenced
this pull request
Apr 11, 2024
* obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AWSHurneyt
pushed a commit
to AWSHurneyt/common-utils
that referenced
this pull request
Apr 12, 2024
opensearch-project#523) * obfuscate ip addresses in alert error message * make ip obfuscation lower case * update test with lowercase ip obfuscation --------- (cherry picked from commit b8e6e75) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: AWSHurneyt <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 2.x
backport 2.4
backport 2.5
backport 2.6
backport 2.7
backport 2.8
backport 2.9
backport PR to 2.9
backport 2.10
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.
Description
Currently alertError class' message field is storing exception messages along with IP addresses if message contains any IPs
This change obfuscates the ip address in exception messages stored in disk and shown to user