openimsdk / openimsdk/tools

[FEATURE REQUEST] support AWS MSK IAM authentication

Open
#256 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
25
Forks
103
Avg merge
29m
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by reviewing the implementation from #141 and the AWS MSK IAM SASL signer reference package, then trace where Kafka configuration is shared by producers, consumers, topic verification, and health checks. Done means adding the backward-compatible AWS_MSK_IAM mechanism with region and default-credential handling, automatic TLS, and injectable token generation suitable for unit tests without a real AWS account.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go, kafka
Domain
authentication, cloud, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.