[
https://issues.apache.org/jira/browse/CAMEL-17478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476039#comment-17476039
]
Jiri Ondrusek commented on CAMEL-17478:
---------------------------------------
I looked into the issue and because the client could be autowired, there is no
way how to get credentials, which are required for downloadLink operation other
then providing them as parameters. The small change in the doc explains it and
it is all needed as a solution (#1).
I can see one small improvement. In case that s3 client is created via
component (aws2 credentials are passed into the component), credentials might
be used instead of parameters for the operation. But it will create an
inconsistency.
* We could define 2 ways how to get credentials for DownloadLink operation:
# if user provides aws credentials as parameters (current state), parameters
will be used
# if parameters are not provided for operation: If aws credentials are defined
for the component - credentials can be reused for downloadLink. (This could
make the usage of the component a little bit easier). If client is autowired,
endpoint will fail.
[~davsclaus] Should I add such behavior?
> camel-aws2-s3 Operation downloadLink requires aws credentails even if client
> is aurowired from registry
> -------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-17478
> URL: https://issues.apache.org/jira/browse/CAMEL-17478
> Project: Camel
> Issue Type: Improvement
> Components: camel-aws2
> Affects Versions: 3.15.0
> Reporter: Jiri Ondrusek
> Assignee: Jiri Ondrusek
> Priority: Minor
> Fix For: 3.15.0
>
>
> It is possible to use "custom" aws s3 client by providing a client in
> registry.
> If operation "downloadLink" is executed with a component with autowired
> client, it fails.
> I understand that creation of a link is not possible without credentials and
> the only solution for user is to provide credentials (in the same way as in
> [test|https://github.com/apache/camel/blob/main/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CreateDownloadLinkOperationIT.java#L84])
> I think that this behavior should be mentioned in the documentation and
> covered by the test.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)