Skip to content

add aws-java-sdk-sts to aws extension classpath#95

Merged
Naya Chen (CodingParsley) merged 3 commits into
0.22.1-confluentfrom
iam-patch
Apr 22, 2022
Merged

add aws-java-sdk-sts to aws extension classpath#95
Naya Chen (CodingParsley) merged 3 commits into
0.22.1-confluentfrom
iam-patch

Conversation

@CodingParsley

@CodingParsley Naya Chen (CodingParsley) commented Apr 18, 2022

Copy link
Copy Markdown

Fixes apache#11303

Description

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.

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 PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@CodingParsley
Naya Chen (CodingParsley) requested a review from a team as a code owner April 18, 2022 23:01
@CodingParsley Naya Chen (CodingParsley) changed the title add aws-java-sdk-sts to aws module classpath [WIP] add aws-java-sdk-sts to aws module classpath Apr 18, 2022
@CodingParsley Naya Chen (CodingParsley) changed the title [WIP] add aws-java-sdk-sts to aws module classpath [WIP] add aws-java-sdk-sts to aws extension classpath Apr 18, 2022
@CodingParsley Naya Chen (CodingParsley) changed the title [WIP] add aws-java-sdk-sts to aws extension classpath add aws-java-sdk-sts to aws extension classpath Apr 18, 2022
Comment thread cloud/aws-common/pom.xml Outdated

@xvrl Xavier Léauté (xvrl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor request + calling out the other module we need to add the dependency in.

Comment thread cloud/aws-common/pom.xml Outdated
<artifactId>validation-api</artifactId>
</dependency>

<!-- runtime -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's explain why we need this dependency

@xvrl Xavier Léauté (xvrl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still need to add the dependency to the druid-aws-rds-extensions

@CodingParsley

Naya Chen (CodingParsley) commented Apr 20, 2022

Copy link
Copy Markdown
Author

Tested with local image and it's able to connect to RDS successfully. Xavier Léauté (@xvrl) Would appreciate a +1:)

@xvrl

Copy link
Copy Markdown
Member

we should mention in the PR description that this also fixes the token auth for RDS

@CodingParsley
Naya Chen (CodingParsley) merged commit 12ac4b1 into 0.22.1-confluent Apr 22, 2022
@CodingParsley
Naya Chen (CodingParsley) deleted the iam-patch branch April 22, 2022 00:10
@CodingParsley
Naya Chen (CodingParsley) restored the iam-patch branch April 25, 2022 21:46
@CodingParsley
Naya Chen (CodingParsley) deleted the iam-patch branch April 25, 2022 21:46
@CodingParsley
Naya Chen (CodingParsley) restored the iam-patch branch April 25, 2022 21:47
@CodingParsley
Naya Chen (CodingParsley) deleted the iam-patch branch April 25, 2022 21:48
Naya Chen (CodingParsley) added a commit that referenced this pull request Apr 25, 2022
* add sdk to aws common classpath

* add runtime scope for sts dependency

* add comment
Naya Chen (CodingParsley) added a commit that referenced this pull request Apr 27, 2022
* add sdk to aws common classpath

* add runtime scope for sts dependency

* add comment
Naya Chen (CodingParsley) added a commit that referenced this pull request Apr 27, 2022
* add sdk to aws common classpath

* add runtime scope for sts dependency

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues connecting to S3 on EKS

2 participants