Why this feature?
The current Kafka configuration supports username/password authentication, and #141 adds configurable PLAIN and SCRAM mechanisms. AWS MSK IAM authentication is a separate mechanism that cannot be enabled by setting a username and password.
AWS MSK IAM requires SASL/OAUTHBEARER, a dynamic SigV4 token provider, TLS, an AWS region, and credentials resolved through the AWS default credential chain.
Suggested Solution
Add a backward-compatible AWS_MSK_IAM authentication mechanism that:
- maps to Sarama
OAUTHBEARER
- generates tokens with the official
github.com/aws/aws-msk-iam-sasl-signer-go package
- requires an AWS region
- uses the AWS default credential chain without adding static access keys to Kafka configuration
- enables TLS automatically
- is shared by producer, consumer, topic verification, and health checks
- supports unit testing through an injectable token generator without requiring a real AWS account
This should use a separate issue and branch from #141 according to the OpenIM one-issue-one-branch contribution workflow. The implementation can build on #141 and be rebased onto main after #141 is merged.
Additional Information
AWS reference: https://github.com/aws/aws-msk-iam-sasl-signer-go
Why this feature?
The current Kafka configuration supports username/password authentication, and #141 adds configurable PLAIN and SCRAM mechanisms. AWS MSK IAM authentication is a separate mechanism that cannot be enabled by setting a username and password.
AWS MSK IAM requires SASL/OAUTHBEARER, a dynamic SigV4 token provider, TLS, an AWS region, and credentials resolved through the AWS default credential chain.
Suggested Solution
Add a backward-compatible
AWS_MSK_IAMauthentication mechanism that:OAUTHBEARERgithub.com/aws/aws-msk-iam-sasl-signer-gopackageThis should use a separate issue and branch from #141 according to the OpenIM one-issue-one-branch contribution workflow. The implementation can build on #141 and be rebased onto
mainafter #141 is merged.Additional Information
AWS reference: https://github.com/aws/aws-msk-iam-sasl-signer-go