Skip to content

Commit

Permalink
add aws-java-sdk-sts to aws-common classpath (apache#12482)
Browse files Browse the repository at this point in the history
Fixes apache#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.
  • Loading branch information
CodingParsley authored May 3, 2022
1 parent fb08bac commit 35a7d86
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cloud/aws-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 35a7d86

Please sign in to comment.