Add support for AWS IAM Roles for Service Accounts (IRSA) #831
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.AwsWebIdentityTokenCredentialsProvider
which can be set using thes3.credentials.provider.class
connector 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.
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.Does this solution apply anywhere else?
If yes, where?
Any connector that supports instances of
AWSCredentialsProvider
andConfigurable
in 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.