-
Notifications
You must be signed in to change notification settings - Fork 921
Open
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issue
Description
Describe the bug
sdk: 2.32.7
jdk: 21
Hello,
I am trying to use the S3Async client with mrap, but I got an error on authentication:
j.l.UnsupportedOperationException: null\n\tat s.a.a.h.a.a.c.i.s.DefaultAwsCrtV4aHttpSigner.signAsync(DefaultAwsCrtV4aHttpSigner.java:83)\n\tat s.a.a.c.i.h.p.s.AsyncSigningStage.doSraSign(AsyncSigningStage.java:132)\n\tat s.a.a.c.i.h.p.s.AsyncSigningStage.lambda$sraSignRequest$1(AsyncSigningStage.java:95)\n\t... 44 frames truncated (including 32 common frames)\nWrapped by: s.a.a.c.e.SdkClientException: Unable to execute HTTP request: null (SDK Attempt Count: 1)\n\tat s.a.a.c.e.SdkClientException$BuilderImpl.build(SdkClientException.java:130)\n\tat s.a.a.c.e.SdkClientException$BuilderImpl. build(SdkClientException.java:95)\n\tat s.a.a.c.i.h.p.s.u.RetryableStageHelper.retryPolicyDisallowedRetryException(RetryableStageHelper.java:168)\n\t... 39 frames truncated (including 6 common frames)\nWrapped by: j.l.RuntimeException: Error saving file to S3\n\tat c.n.b.s.AwsS3Service.lambda$saveFileToS3$2(AwsS3Service.java:42)\n\tat r.c.p.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94)\n\tat r.c.p.MonoPeekTerminal$MonoTerm...\n
Everything works fine using the bucket name.
I can see that that DefaultAwsCrtV4aHttpSigner.signAsync
is not implemented.
Is there a way of using mrap with the S3AsyncClient or should we use the synchrone one?
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
We can use mrap with S3AsyncClient
Current Behavior
Got an Authentication error (not implemented)
Reproduction Steps
@Bean
public SdkAsyncHttpClient asyncHttpClient() {
return NettyNioAsyncHttpClient
.builder()
.eventLoopGroupBuilder(SdkEventLoopGroup.builder().numberOfThreads(Runtime.getRuntime().availableProcessors()))
.connectionTimeout(Duration.ofMillis(5_000L))
.maxConcurrency(500)
.tlsNegotiationTimeout(Duration.ofMillis(3_500L)).build();
}
@Bean
public S3AsyncClient s3AsyncClient(AwsS3Properties config, SdkAsyncHttpClient asyncHttpClient, AwsCredentialsProvider credentialsProvider) {
final boolean useMRAP = config.bucket().startsWith("arn:aws:s3::") && config.bucket().contains(":accesspoint/");
LOGGER.atInfo().setMessage("s3 - Role To Assume: {} - Region: {} - Use Multi-Region Access Point: {}")
.addArgument(config::roleArn)
.addArgument(config::region)
.addArgument(useMRAP).log();
return S3AsyncClient.builder()
.httpClient(asyncHttpClient)
.credentialsProvider(credentialsProvider)
.region(config.region()).build();
}
@Bean
public AwsCredentialsProvider credentialsProvider() {
return WebIdentityTokenFileCredentialsProvider.create();
}
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.32.7
JDK version used
21
Operating System and version
linux
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issue