Skip to content

[FEATURE REQUEST] support AWS MSK IAM authentication #256

Description

@jackliu145

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions