Add support for AWS IAM Roles for Service Accounts (IRSA)#831
Conversation
Introduce `io.confluent.connect.s3.auth.AwsWebIdentityTokenCredentialsProvider` which can be referenced in the connector property `s3.credentials.provider.class`. `AwsWebIdentityTokenCredentialsProvider` configuration properties: - `irsa.role.arn`: Role ARN to use when starting a session - `irsa.session.name`: Role session name to use when starting a session - `irsa.token.file`: Path to the web identity token file
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
|
Thanks Rodrigo Molina (@rodrigo-molina) -
|
|
hey ashwinpankaj Thanks for the quick response! 🙌
The feature is intended for use in a Self-Hosted Kafka Connect deployment and could be valuable for anyone running Kafka Connect on EKS. Could you please clarify what
I currently don’t have access to that repository. Let me know if there’s a way to proceed or if I should request access. |
|
We're looking forward to this feature here. How can this proceed ashwinpankaj Tarun Jain (@tarunjain-confluent) ? |
|
Hey Philipp Trulson (@der-eismann), When I submitted this pull request, I also wrote some documentation on the process here: Hope it helps! |
|
A much needed feature, wonder why is it lingering? |
Hey ashwinpankaj Tarun Jain (@tarunjain-confluent), Any suggestions on how to move this forward? The change itself respects the current repository structure: it extends an existing |
Problem
AWS IAM roles for service accounts (IRSA) is a recommended approach for applications such as Kubernetes to authenticate with AWS services without managing static credentials.
From AWS's docs:
Solution
Introduce
io.confluent.connect.s3.auth.AwsWebIdentityTokenCredentialsProviderwhich can be set using thes3.credentials.provider.classconnector property.This provider is a wrapper around AWS’s native WebIdentityTokenCredentialsProvider, similar to how AwsAssumeRoleCredentialsProvider is implemented. It enables configuring IRSA credentials directly via connector properties.
AwsWebIdentityTokenCredentialsProviderconfiguration properties:irsa.role.arn: Role ARN to use when starting a session.irsa.session.name: Role session name to use when starting a session.irsa.token.file: Path to the web identity token file.Does this solution apply anywhere else?
If yes, where?
Any connector that supports instances of
AWSCredentialsProviderandConfigurablein its configurations.Test Strategy
The Confluent S3 Sink connector allows custom AWS credential providers via configuration. We have tested this change by deploying a JAR containing the proposed class and using it within the connector's classpath (confluentinc-kafka-connect-avro-converter-7.8.0/lib).
Testing done:
Release Plan
This change has no external release dependencies.