[Backport 2.15] Add SSE-KMS encryption context and bucket owner verification to S3 repository plugin#21277
Conversation
…er verification (opensearch-project#18312)\n\nCherry-picked from upstream PR opensearch-project#18312 (commit ab0827a)\nwith conflict resolution for 2.15.0 compatibility:\n- Preserved metadata field in UploadRequest.java\n- Kept S3Error import in S3BlobContainer.java\n- Skipped S3AsyncDeleteHelper.java change (file doesn't exist in 2.15.0)\n\nChanges:\n- Replace boolean server_side_encryption with typed settings:\n server_side_encryption_type (AES256/aws:kms/bucket_default),\n server_side_encryption_kms_key_id,\n server_side_encryption_bucket_key_enabled,\n server_side_encryption_encryption_context\n- Add expected_bucket_owner setting for bucket verification\n- Add SseKmsUtil utility class for configuring SSE on S3 requests\n\nKRATOS-6416 Signed-off-by: yzhang5 <yzhang5@atlassian.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit e68ca5d.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
❌ Gradle check result for e68ca5d: 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? |
|
Hi @jed326 and @gbbafna — pinging you as the original merger and approver of #18312 since this is a backport of that PR. CI Status NoteThe
What's in this PRThis is a clean cherry-pick of #18312 to the target branch with version-specific conflict resolutions:
All S3 plugin unit tests pass locally, and this backport has been validated in production at Atlassian. QuestionCould you please advise on the right path forward? Either:
Happy to make any adjustments. Thanks! |
Summary
Backport of #18312 to
branch-2.15.Adds support for:
AES256,aws:kms,bucket_default) replacing the previous booleanserver_side_encryptionflagChanges
SseKmsUtil.javautility class centralizing encryption configuration for S3 request buildersS3Repositorywith new typed settings definitionsS3BlobStore,S3BlobContainer,UploadRequestAsyncTransferManager,AsyncPartsHandlerConflict Resolutions (2.15-specific)
The following adaptations were made when cherry-picking to
branch-2.15:metadatafield inUploadRequest.java(added in 2.15.0, not present inmain)S3Errorimport inS3BlobContainer.java(used in 2.15.0)S3AsyncDeleteHelper.javachange (file does not exist in 2.15.0)Testing
Related: #18312
Signed-off-by: yzhang5 yzhang5@atlassian.com