Skip to content

Support IAM auth for kafka based supervisors and lookups - #17355

Open
zachjsh wants to merge 12 commits into
apache:masterfrom
zachjsh:kafka-lookup-support-iam-auth
Open

zachjsh wants to merge 12 commits into
apache:masterfrom
zachjsh:kafka-lookup-support-iam-auth

Conversation

@zachjsh

@zachjsh zachjsh commented Oct 15, 2024

Copy link
Copy Markdown
Contributor

Previously, IAM auth did not work for kafka based supervisors and lookups, because the needed dependencies were not included. This fixes the issue.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • 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.

</dependency>
<dependency>
<groupId>software.amazon.msk</groupId>
<artifactId>aws-msk-iam-auth</artifactId>

@zachjsh zachjsh Oct 15, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we need to provide a uber jar here. If we dont exclude the dependencies as we're doing here, we could clobber other dependencies we are currently using in the extension. and excluding as we're doing here, will likely cause issue as well, as needed dependencies will be missing. AWS produces an uber jar here: https://github.com/aws/aws-msk-iam-auth/releases/download/v1.1.5/aws-msk-iam-auth-1.1.5-all.jar. But this is not available on the maven repo that this project uses.

@FrankChen021 FrankChen021 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.

Severity Findings
P0 0
P1 1
P2 0
P3 0
Total 1

The blanket exclusions make the newly added IAM authentication dependency non-functional at runtime; see the inline finding for the concrete class-loading path and the required dependency fix.

Reviewed 3 of 3 changed files.


This is an automated review by Codex GPT-5.6-Luna(max)

<version>1.1.5</version>
<exclusions>
<exclusion>
<groupId>*</groupId>

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.

[P1] Do not exclude the IAM plugin's runtime SDKs

This is the regular aws-msk-iam-auth artifact, and excluding every transitive dependency leaves its required AWS SDK v2 classes out of the extension. In v1.1.5, the normal IAMLoginModule required; path constructs MSKCredentialProvider, which eagerly constructs EnhancedProfileCredentialsProvider and therefore needs software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; Druid provides the AWS SDK v1 artifacts but has no AWS SDK v2 dependency. The first IAM-authenticated Kafka consumer will consequently fail with NoClassDefFoundError before loading credentials. Please retain the required runtime dependencies (or use a bundled artifact) and apply the same fix to kafka-indexing-service/pom.xml.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants