sink: support AWS IAM authentication for Amazon MSK - #5874
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThis PR adds AWS MSK IAM authentication to Kafka sink configuration. It exposes IAM settings through API and TOML models, validates provider-specific options, generates AWS SigV4 tokens, and integrates the provider with Sarama OAuth SASL configuration. ChangesAWS MSK IAM authentication
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant KafkaOptions
participant SaramaConfig
participant AWSMSKIAMTokenProvider
KafkaOptions->>SaramaConfig: apply OAUTHBEARER and AWS_MSK_IAM settings
SaramaConfig->>AWSMSKIAMTokenProvider: create provider with IAM configuration
AWSMSKIAMTokenProvider->>AWSMSKIAMTokenProvider: generate SigV4 access token
AWSMSKIAMTokenProvider-->>SaramaConfig: return Sarama access token
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What problem does this PR solve?
Issue Number: close #5872
What is changed and how it works?
TiCDC supports Kafka authentication through SASL/SCRAM and standard SASL/OAUTHBEARER token endpoints, but it cannot connect to Amazon MSK Serverless or MSK Provisioned clusters that use IAM access control.
Amazon MSK IAM authentication requires non-Java Kafka clients to generate short-lived AWS SigV4 tokens for the SASL/OAUTHBEARER mechanism. The existing OAuth client ID, client secret, and token URL configuration cannot generate these tokens.
This PR adds an Amazon MSK IAM OAuth token provider backed by the official AWS MSK IAM signer. It supports the AWS SDK default credential provider chain and optional STS AssumeRole credentials, including role session name and external ID.
configuration
Create changefeed.toml:
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Summary by CodeRabbit
New Features
Bug Fixes