Skip to content

Commit

Permalink
Set STS endpoint explicitly and allow override in profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 26, 2024
1 parent ef0b879 commit 025cc56
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 @@ -337,6 +338,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 025cc56

Please sign in to comment.