From adff9aa91191662463ae10e4f18600122da796d3 Mon Sep 17 00:00:00 2001 From: David Kocher Date: Wed, 9 Aug 2023 17:39:23 +0200 Subject: [PATCH] Fix deprecated usage. --- .../cyberduck/core/sts/STSAssumeRoleAuthorizationService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s3/src/main/java/ch/cyberduck/core/sts/STSAssumeRoleAuthorizationService.java b/s3/src/main/java/ch/cyberduck/core/sts/STSAssumeRoleAuthorizationService.java index 7b74209a2f6..aead05e263d 100644 --- a/s3/src/main/java/ch/cyberduck/core/sts/STSAssumeRoleAuthorizationService.java +++ b/s3/src/main/java/ch/cyberduck/core/sts/STSAssumeRoleAuthorizationService.java @@ -31,6 +31,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.AnonymousAWSCredentials; import com.amazonaws.client.builder.AwsClientBuilder; import com.amazonaws.internal.StaticCredentialsProvider; @@ -53,7 +54,7 @@ public STSAssumeRoleAuthorizationService(final Host bookmark, final X509TrustMan this(AWSSecurityTokenServiceClientBuilder .standard() .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(bookmark.getProtocol().getSTSEndpoint(), null)) - .withCredentials(new StaticCredentialsProvider(new AnonymousAWSCredentials())) + .withCredentials(new AWSStaticCredentialsProvider(new AnonymousAWSCredentials())) .withClientConfiguration(new CustomClientConfiguration(bookmark, new ThreadLocalHostnameDelegatingTrustManager(trust, bookmark.getProtocol().getSTSEndpoint()), key)) .build());