Skip to content

Update to crypto kms plugin for AWS SDK v2.x #18268

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

Merged
merged 5 commits into from
May 15, 2025

Conversation

kumargu
Copy link
Contributor

@kumargu kumargu commented May 12, 2025

Description

Include the necessary dependencies for the crypto-kms plugin which were missed as part of #17396

This fixes broken local KMS integration

[2025-05-12T16:21:56,212][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [bcd07460880c] fatal error in thread [opensearch[bcd07460880c][clusterApplierService#updateTask][T#1]], exiting
java.lang.NoClassDefFoundError: software/amazon/awssdk/http/auth/aws/scheme/AwsV4AuthScheme
	at software.amazon.awssdk.services.kms.DefaultKmsBaseClientBuilder.authSchemes(DefaultKmsBaseClientBuilder.java:144) ~[?:?]
	at software.amazon.awssdk.services.kms.DefaultKmsBaseClientBuilder.lambda$mergeServiceDefaults$0(DefaultKmsBaseClientBuilder.java:72) ~[?:?]
	at software.amazon.awssdk.utils.builder.SdkBuilder.applyMutation(SdkBuilder.java:61) ~[?:?]
	at software.amazon.awssdk.core.client.config.SdkClientConfiguration.merge(SdkClientConfiguration.java:98) ~[?:?]
	at software.amazon.awssdk.services.kms.DefaultKmsBaseClientBuilder.mergeServiceDefaults(DefaultKmsBaseClientBuilder.java:70) ~[?:?]
	at software.amazon.awssdk.awscore.client.builder.AwsDefaultClientBuilder.mergeChildDefaults(AwsDefaultClientBuilder.java:139) ~[?:?]
	at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.syncClientConfiguration(SdkDefaultClientBuilder.java:198) ~[?:?]
	at software.amazon.awssdk.services.kms.DefaultKmsClientBuilder.buildClient(DefaultKmsClientBuilder.java:36) ~[?:?]
	at software.amazon.awssdk.services.kms.DefaultKmsClientBuilder.buildClient(DefaultKmsClientBuilder.java:25) ~[?:?]
	at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.build(SdkDefaultClientBuilder.java:169) ~[?:?]
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) ~[?:?]
	at org.opensearch.crypto.kms.SocketAccess.doPrivileged(SocketAccess.java:29) ~[?:?]
	at org.opensearch.crypto.kms.KmsService.buildClient(KmsService.java:116) ~[?:?]
	at org.opensearch.crypto.kms.KmsService.buildClient(KmsService.java:77) ~[?:?]
	at org.opensearch.crypto.kms.KmsService.lambda$client$2(KmsService.java:169) ~[?:?]
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) ~[?:?]
	at org.opensearch.crypto.kms.SocketAccess.doPrivileged(SocketAccess.java:29) ~[?:?]
	at org.opensearch.crypto.kms.KmsService.client(KmsService.java:169) ~[?:?]
	at org.opensearch.crypto.kms.KmsService.createMasterKeyProvider(KmsService.java:266) ~[?:?]

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.

@kumargu kumargu requested a review from a team as a code owner May 12, 2025 17:53
@kumargu
Copy link
Contributor Author

kumargu commented May 12, 2025

@peterzhuamazon @cwperks how do i generate the new .sha file with this update?

@cwperks
Copy link
Member

cwperks commented May 12, 2025

@peterzhuamazon @cwperks how do i generate the new .sha file with this update?

@kumargu Run ./gradlew updateSHAs and checkin the new checksums

Copy link
Contributor

❌ Gradle check result for 9f176ea: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 8c05300: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kumargu
Copy link
Contributor Author

kumargu commented May 13, 2025

I will fix the failures and send our a new revision.

Copy link
Contributor

❌ Gradle check result for a3e0d64: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Gulshan Kumar <[email protected]>
@kumargu kumargu force-pushed the updates_for_aws_sdk branch from ceb7f5e to d01ba50 Compare May 15, 2025 11:49
Copy link
Contributor

❌ Gradle check result for d01ba50: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Gulshan Kumar <[email protected]>
@kumargu kumargu force-pushed the updates_for_aws_sdk branch from d01ba50 to 2523fee Compare May 15, 2025 12:44
Copy link
Contributor

✅ Gradle check result for 2523fee: SUCCESS

Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.58%. Comparing base (6f4d6c5) to head (2523fee).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18268      +/-   ##
============================================
+ Coverage     72.50%   72.58%   +0.08%     
- Complexity    67379    67396      +17     
============================================
  Files          5488     5488              
  Lines        311062   311062              
  Branches      45217    45217              
============================================
+ Hits         225520   225785     +265     
+ Misses        67176    66846     -330     
- Partials      18366    18431      +65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kumargu
Copy link
Contributor Author

kumargu commented May 15, 2025

@cwperks this is ready for review. thanks.

@cwperks cwperks merged commit a29069e into opensearch-project:main May 15, 2025
30 checks passed
@kumargu kumargu deleted the updates_for_aws_sdk branch May 15, 2025 14:41
tanik98 pushed a commit to tanik98/OpenSearch that referenced this pull request May 27, 2025
* Update to crypto kms plugin for AWS SDK v2.x

Signed-off-by: Gulshan <[email protected]>

* Remove duplicates and generate sha file

Signed-off-by: Gulshan <[email protected]>

* Include licenses and notices

Signed-off-by: Gulshan Kumar <[email protected]>

* Update change log

Signed-off-by: Gulshan Kumar <[email protected]>

---------

Signed-off-by: Gulshan <[email protected]>
Signed-off-by: Gulshan Kumar <[email protected]>
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Jun 1, 2025
* Update to crypto kms plugin for AWS SDK v2.x

Signed-off-by: Gulshan <[email protected]>

* Remove duplicates and generate sha file

Signed-off-by: Gulshan <[email protected]>

* Include licenses and notices

Signed-off-by: Gulshan Kumar <[email protected]>

* Update change log

Signed-off-by: Gulshan Kumar <[email protected]>

---------

Signed-off-by: Gulshan <[email protected]>
Signed-off-by: Gulshan Kumar <[email protected]>
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