Aiven-Open / Aiven-Open/cloud-storage-connectors-for-apache-kafka

MSK Connect Auth Issue

未关闭
#427 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
58
派生
39
平均合并
2 天 10 小时
30 天内合并 PR
5

描述

I am trying to use IAM auth with MSK with aws.credentials.provider set to class software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider from https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/auth/credentials/DefaultCredentialsProvider.html

I know its using the aws.credentials.provider due to the first part of the log

Connector use aws.credentials.provider as credential Provider, when configuration for {aws.access.key.id, aws.secret.access.key} OR {aws.sts.role.arn, aws.sts.role.session.name} are absent

But then right after that

org.apache.kafka.common.KafkaException: class com.amazonaws.auth.DefaultAWSCredentialsProviderChain is not an instance of software.amazon.awssdk.auth.credentials.AwsCredentialsProvider

I tried setting aws.sts.role.arn, aws.sts.role.external.id, and aws.sts.role.session.name but then get java.lang.NullPointerException: STS client must not be null. I see an old issue https://github.com/aws/aws-sdk-java-v2/issues/3998 which the source matches to the error https://github.com/aws/aws-sdk-java-v2/blob/master/services/sts/src/main/java/software/amazon/awssdk/services/sts/auth/StsCredentialsProvider.java#L73 not sure if its related.

I see that the client is being set on https://github.com/Aiven-Open/cloud-storage-connectors-for-apache-kafka/blob/dbf13885f20c1cbda42cf66746ced90ed283a5d1/s3-commons/src/main/java/io/aiven/kafka/connect/iam/AwsCredentialProviderFactory.java#L60

I am using msk connector using the latest release https://github.com/Aiven-Open/cloud-storage-connectors-for-apache-kafka/releases/download/v3.2.0/s3-source-connector-for-apache-kafka-3.2.0.zip

Any help or insight would be greatly appreciated.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。