Dhairya-007 opened a new pull request, #29983:
URL: https://github.com/apache/camel/pull/29983
## Problem
The switch is documented for the producer while the three options it gates
are documented for both sides - four consecutive lines of `AWS2S3Configuration`:
```java
@UriParam(label = "producer,advanced", defaultValue = "false")
private boolean useCustomerKey;
@UriParam(label = "common,advanced")
private String customerKeyId;
@UriParam(label = "common,advanced")
private String customerKeyMD5;
@UriParam(label = "common,advanced")
private String customerAlgorithm;
```
`AWS2S3Consumer` applies customer-provided keys when it downloads an object,
and reads the switch to decide whether to:
```java
private GetObjectRequest getObjectRequest(String key) {
GetObjectRequest.Builder getRequest =
GetObjectRequest.builder().bucket(getConfiguration().getBucketName()).key(key);
if (getConfiguration().isUseCustomerKey()) {
if (ObjectHelper.isNotEmpty(getConfiguration().getCustomerKeyId())) {
getRequest.sseCustomerKey(getConfiguration().getCustomerKeyId());
}
if (ObjectHelper.isNotEmpty(getConfiguration().getCustomerKeyMD5()))
{
getRequest.sseCustomerKeyMD5(getConfiguration().getCustomerKeyMD5());
}
if
(ObjectHelper.isNotEmpty(getConfiguration().getCustomerAlgorithm())) {
getRequest.sseCustomerAlgorithm(getConfiguration().getCustomerAlgorithm());
}
}
return getRequest.build();
}
```
So reading SSE-C encrypted objects from a bucket requires
`useCustomerKey=true` on the consumer, and the catalog puts that option in
`producer (advanced)` while the three keys it enables sit in `common
(advanced)`. Someone configuring a consumer finds the keys documented for their
side and the switch that activates them documented for the other one.
## Fix
Label it `common,advanced`, matching the three options it gates.
Nothing in the runtime path changes - the option was always readable by the
consumer, which is how the code above works today. The regenerated
`aws2-s3.json` files are included, produced by `camel-package-maven-plugin`;
the only substantive change is `useCustomerKey` moving group, and the rest of
the diff is the index renumbering that follows from it.
--
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]