add aws-java-sdk-sts to aws-common classpath (#12482)

Fixes #11303

WebIdentityTokenProvider in the defaultAWSCredentialsProviderChain can not actually be used because the aws-java-sdk-sts jar is not in the classpath of S3 extension at runtime, since each extension has its own classpath. This results in the inability to assume STS role before generating authentication token.
The error message from getCredentials() is:

"Unable to load credentials from WebIdentityTokenCredentialsProvider: To use assume role profiles the aws-java-sdk-sts module must be on the class path"

This PR will fix multiple authentication modules that are dependent on the WebIdentityTokenProvider, including AWS IAM based RDS authentication and S3 authentication.
This commit is contained in:
Naya Chen 2022-05-03 12:25:51 -07:00 committed by GitHub
parent fb08bac01a
commit 35a7d863b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -80,6 +80,14 @@
<artifactId>validation-api</artifactId>
</dependency>
<!-- Runtime -->
<!-- WebIdentityTokenProvider requires runtime dependency on aws-java-sdk-sts -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sts</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tests -->
<dependency>
<groupId>junit</groupId>