JiriOndrusek commented on code in PR #4404: URL: https://github.com/apache/camel-quarkus/pull/4404#discussion_r1087509925
########## integration-test-groups/aws2/aws2-cw/src/main/java/org/apache/camel/quarkus/component/aws2/cw/it/Aws2CwResource.java: ########## @@ -97,18 +104,30 @@ public Response postMap( return val; })); try { + if (defaultCredentialsProvider && setCredentials) { + System.setProperty("aws.accessKeyId", + ConfigProvider.getConfig().getValue("camel.component.aws2-cw.access-key", String.class)); + System.setProperty("aws.secretAccessKey", + ConfigProvider.getConfig().getValue("camel.component.aws2-cw.secret-key", String.class)); Review Comment: @zbendhiba my bad. I put explanation only to this PR, not the code itself. 1- the purpose of the test it to cover [STATIC CREDENTIALS VS DEFAULT CREDENTIAL PROVIDER](https://camel.apache.org/components/3.18.x/aws2-cw-component.html#_static_credentials_vs_default_credential_provider). By passing a parameter to the endpoint I force aws2 component to use [defaultCredentialsProvider](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html#credentials-chain). To make that provider work I have to supply credentials in one of the predefined locations -> I chose system properties. Therefore I have to "copy" credentials from local stack config properties and set them into system properties. They are removed right after the test. 2 - Some time ago the config properties was accessible also as system properties, but this is not true anymore. There is no way how the amazon credentials provider could get to that properties. -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org