aws / aws-msk-iam-auth

Enables developers to use AWS Identity and Access Management (IAM) to connect to their Amazon Managed Streaming for Apache Kafka (Amazon MSK) clusters.
Apache License 2.0
145 stars 68 forks source link

I'm having trouble with 'Cannot change principals during re-authentication from A: B' #104

Open ksundong opened 1 year ago

ksundong commented 1 year ago

Environment

Log

server 2023-01-31 14:05:26.312 ERROR 7 --- [container-0-C-1] o.s.k.l.KafkaMessageListenerContainer   :149 : Authentication/Authorization Exception, retrying in 10000 ms
server
server org.apache.kafka.common.errors.SaslAuthenticationException: Cannot change principals during re-authentication from A: B
amplexus commented 8 months ago

Set AWS_ROLE_SESSION_NAME. See https://github.com/jmaver-plume/kafkajs-msk-iam-authentication-mechanism/issues/20 for more info.

ksundong commented 7 months ago

@amplexus I'll try it, thanks.

hameno commented 2 months ago

Surely this should not be needed to manually configure, no?

taer commented 2 months ago

This pops up also when you use EKS-pod-identity and the session name changes. And you can't as of now set a static session name. Would it be possible to relax the sessionName aspect of the "principals change"?