You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/04/20 07:32:58 UTC
[camel] 01/02: AWS2-SNS component does not recognize or use
proxy-host and proxy-port when default credentials provider is in use
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 99b385b61725e32cc52654fc6b02bd1fe77b100f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 09:28:49 2021 +0200
AWS2-SNS component does not recognize or use proxy-host and proxy-port when default credentials provider is in use
---
.../aws2/sns/client/impl/Sns2ClientIAMOptimized.java | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/client/impl/Sns2ClientIAMOptimized.java b/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/client/impl/Sns2ClientIAMOptimized.java
index d61c41e..d1ad18d 100644
--- a/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/client/impl/Sns2ClientIAMOptimized.java
+++ b/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/client/impl/Sns2ClientIAMOptimized.java
@@ -67,22 +67,8 @@ public class Sns2ClientIAMOptimized implements Sns2InternalClient {
+ configuration.getProxyPort());
proxyConfig.endpoint(proxyEndpoint);
httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
- isClientConfigFound = true;
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
}
- if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
- DefaultCredentialsProvider cred = DefaultCredentialsProvider.create();
- if (isClientConfigFound) {
- clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder)
- .credentialsProvider(cred);
- } else {
- clientBuilder = clientBuilder.credentialsProvider(cred);
- }
- } else {
- if (!isClientConfigFound) {
- clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
- }
- }
-
if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
}