nats-io / nats-kafka

NATS to Kafka Bridging
Apache License 2.0
131 stars 32 forks source link

Add support for AWS IAM Authenticated Kafka Instances #101

Closed ChrisDizenzo1047 closed 9 months ago

ChrisDizenzo1047 commented 9 months ago

Description

Currently Nats Kafka does not have support AWS IAM authenticated kafka instances. AWS Managed Streaming for Kafka (MSK) Serverless kafka instances only support IAM authentication for their clients, so using this bridge would not be possible with an MSK Serverless kafka instance.

This PR adds:

Testing

These changes were tested building and deploying using k8 pods on an internal private server, with an AWS MSK Serverless cluster also hosted on the same private VPC.

I am confident these changes will work for our use-case as we are currently using an internal fork with these changes on our dev branches.

Although these changes were only tested with the producer library and were not verified with the consumer library. Although the code is effectively the exact same.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (bd232ef) 66.33% compared to head (50f1e5e) 65.69%.

Files Patch % Lines
server/kafka/consumer.go 0.00% 8 Missing :warning:
server/kafka/producer.go 0.00% 8 Missing :warning:
server/kafka/iam_token_provider.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #101 +/- ## ========================================== - Coverage 66.33% 65.69% -0.65% ========================================== Files 28 29 +1 Lines 1827 1845 +18 ========================================== Hits 1212 1212 - Misses 485 503 +18 Partials 130 130 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.