Skip to content
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

Merged
merged 8 commits into from
Jul 30, 2024
Merged

Conversation

mishavay-aws
Copy link
Contributor

@mishavay-aws mishavay-aws commented Jul 17, 2024

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

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
  • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

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>
Signed-off-by: mishavay-aws <140549901+mishavay-aws@users.noreply.github.com>
Copy link
Member

@dlvenable dlvenable left a 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.

this.salt = config.getSalt();
this.saltKey = config.getSaltKey();
try{
messageDigest = MessageDigest.getInstance(config.getHashFormat());
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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>
Copy link
Member

@dlvenable dlvenable left a 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.

@dlvenable dlvenable merged commit 9e084a0 into opensearch-project:main Jul 30, 2024
45 of 47 checks passed
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 8, 2024
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>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 12, 2024
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>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 14, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants