[ 
https://issues.apache.org/jira/browse/CAMEL-26336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132850#comment-18132850
 ] 

Claus Ibsen commented on CAMEL-26336:
-------------------------------------

Merged to main via https://github.com/apache/camel/pull/28553 (b9b931f9f552, 
4.24.0). Left open since fixVersions also list 4.18.6 and 4.22.3 and those 
backports are not done yet.

_Claude Code on behalf of davsclaus_

> camel-minio: MinioProducer should apply configured serverSideEncryption and 
> serverSideEncryptionCustomerKey options
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26336
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26336
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-minio
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.18.6, 4.22.3, 4.24.0
>
>
> h3. Current behaviour
> In {{camel-minio}}, {{MinioConfiguration}} exposes {{serverSideEncryption}} 
> and {{serverSideEncryptionCustomerKey}} endpoint configuration options.
> In {{MinioConsumer}} and {{MinioEndpoint}}, these options are configured on 
> MinIO SDK request builders (e.g. {{GetObjectArgs}}, {{StatObjectArgs}}, and 
> the {{CopyObjectArgs}} in {{moveAfterRead}}).
> However, in {{org.apache.camel.component.minio.MinioProducer}}:
> * In {{doPutObject}}, {{PutObjectArgs.builder()}} does not configure 
> {{.sse(...)}} from {{serverSideEncryption}} or 
> {{serverSideEncryptionCustomerKey}}.
> * In {{copyObject}}, {{CopyObjectArgs.builder()}} does not configure 
> {{.sse(...)}} for the destination, and {{SourceObject.builder()}} (or 
> {{CopySource.builder()}} on 4.18.x) does not configure {{.ssec(...)}} for the 
> source object.
> Consequently, producer endpoints do not pass the configured server-side 
> encryption settings to the MinIO SDK during putObject and copyObject 
> operations.
> h3. Expected behaviour
> {{MinioProducer}} should apply the configured {{serverSideEncryption}} and 
> {{serverSideEncryptionCustomerKey}} settings to {{PutObjectArgs.Builder}} in 
> {{doPutObject}} and to {{CopyObjectArgs.Builder}} / {{SourceObject.Builder}} 
> in {{copyObject}}, matching the configuration applied in {{MinioConsumer}}.
> h3. Change
> * In {{MinioProducer}}:
>   - In {{doPutObject}}: apply 
> {{getConfiguration().getServerSideEncryption()}} and 
> {{getConfiguration().getServerSideEncryptionCustomerKey()}} to 
> {{putObjectRequest::sse}} via 
> {{MinioChecks.checkIfConfigIsNotEmptyAndSetAndConfig}}.
>   - In {{copyObject}}: apply 
> {{getConfiguration().getServerSideEncryptionCustomerKey()}} to 
> {{copySourceBuilder::ssec}}, and apply 
> {{getConfiguration().getServerSideEncryption()}} and 
> {{getConfiguration().getServerSideEncryptionCustomerKey()}} to 
> {{copyObjectRequest::sse}}.
> * Add unit tests in {{camel-minio}} verifying that {{PutObjectArgs}} and 
> {{CopyObjectArgs}} receive the configured {{ServerSideEncryption}} objects 
> when the endpoint is configured with these options.
> h3. Tests
> * Unit test in {{components/camel-minio}} with a mock {{MinioClient}} 
> verifying that {{doPutObject}} sets the expected {{sse}} on {{PutObjectArgs}}.
> * Unit test verifying that {{copyObject}} sets the expected {{sse}} and 
> {{ssec}} on {{CopyObjectArgs}} and the source object.
> * Ensure all existing tests in {{camel-minio}} continue to pass.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to