rishabhdaim commented on code in PR #2558:
URL: https://github.com/apache/jackrabbit-oak/pull/2558#discussion_r2416415394
##########
oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3RequestDecorator.java:
##########
@@ -101,109 +117,96 @@ public GetObjectRequest decorate(final GetObjectRequest
request) {
* Set encryption in {@link PutObjectRequest}
*/
public PutObjectRequest decorate(PutObjectRequest request) {
- ObjectMetadata metadata = request.getMetadata() == null
- ? new ObjectMetadata()
- : request.getMetadata();
- switch (getDataEncryption()) {
+ PutObjectRequest.Builder builder = request.toBuilder();
+
+ DataEncryption encryption = getDataEncryption();
+
+ switch (encryption) {
case SSE_S3:
-
metadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION);
+ builder.serverSideEncryption(ServerSideEncryption.AES256);
break;
case SSE_KMS:
- metadata.setSSEAlgorithm(SSEAlgorithm.KMS.getAlgorithm());
- /*Set*/
- request.withSSEAwsKeyManagementParams(sseParams);
+ builder.serverSideEncryption(ServerSideEncryption.AWS_KMS);
+ if (sseKmsKey != null) {
Review Comment:
It will work fine, we can run it without `kmeKey`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]