-
Notifications
You must be signed in to change notification settings - Fork 202
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
4602 one way hash #4750
4602 one way hash #4750
Conversation
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
8b114ca
to
3d2d9d2
Compare
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
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.
Thank you @mishavay-aws for this great contribution! I left a few comments and am happy to discuss some of the questions in this review.
.../org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionConfig.java
Outdated
Show resolved
Hide resolved
.../org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionConfig.java
Outdated
Show resolved
Hide resolved
...n/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashAction.java
Outdated
Show resolved
Hide resolved
...n/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashAction.java
Outdated
Show resolved
Hide resolved
...n/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashAction.java
Outdated
Show resolved
Hide resolved
...n/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashAction.java
Show resolved
Hide resolved
...va/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionTest.java
Show resolved
Hide resolved
...va/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionTest.java
Show resolved
Hide resolved
...a/org/opensearch/dataprepper/plugins/processor/obfuscation/action/ObfuscationActionTest.java
Outdated
Show resolved
Hide resolved
this.salt = config.getSalt(); | ||
this.saltKey = config.getSaltKey(); | ||
try{ | ||
messageDigest = MessageDigest.getInstance(config.getHashFormat()); |
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.
I'm wondering if we should allow the user to choose any available Java hash algorithm. Should we limit these to a subset?
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.
My suggestion is only include ones that are asked for/needed. I do not think that we should include weaker ones that are still supported in java for backwards compatibility. I have included SHA-512 as it was asked. Do you have suggestions on other frequently used/ asked-for algorithms?
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.
I see that you have an @Pattern
on the format
so that only SHA-512
is allowed. This makes sense.
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
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.
Thank you @mishavay-aws for this contribution! It looks good.
added capabilities for working with OneWay Hash Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
added capabilities for working with OneWay Hash Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
added capabilities for working with OneWay Hash Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Description
[Describe what this change achieves]
Added one-way hashing capability using SHA-512 to the obfuscate processor.
Issues Resolved
Resolves #[Issue number to be closed when this PR is merged]
#4602
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.