Skip to content

Commit

Permalink
Merge pull request #16585 from iterate-ch/bugfix/GH-16377-region
Browse files Browse the repository at this point in the history
Set STS endpoint explicitly and allow override in profile.
  • Loading branch information
dkocher authored Nov 26, 2024
2 parents 2790232 + 025cc56 commit 604cb16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions s3/src/main/java/ch/cyberduck/core/s3/S3Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import com.amazonaws.client.builder.AwsClientBuilder;
import com.amazonaws.services.securitytoken.AWSSecurityTokenService;
import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder;
import com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException;
Expand Down Expand Up @@ -339,6 +340,7 @@ public void login(final LoginCallback prompt, final CancelCallback cancel) throw
final CustomClientConfiguration configuration = new CustomClientConfiguration(host,
new ThreadLocalHostnameDelegatingTrustManager(trust, host.getHostname()), key);
final AWSSecurityTokenServiceClientBuilder builder = AWSSecurityTokenServiceClientBuilder.standard()
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(host.getProtocol().getSTSEndpoint(), null))
.withCredentials(AWSCredentialsConfigurator.toAWSCredentialsProvider(client.getProviderCredentials()))
.withClientConfiguration(configuration);
final AWSSecurityTokenService service = builder.build();
Expand Down

0 comments on commit 604cb16

Please sign in to comment.