Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MSK IAM authentication in rdkafka2 output type #522

Open
madebydna opened this issue Dec 2, 2024 · 3 comments
Open

Add support for MSK IAM authentication in rdkafka2 output type #522

madebydna opened this issue Dec 2, 2024 · 3 comments
Labels
enhancement Feature request

Comments

@madebydna
Copy link

madebydna commented Dec 2, 2024

Is your feature request related to a problem? Please describe.

One of the supported authentication & authorization methods for AWS MSK is IAM based authentication with OAUTHBEARER sending in a signed token. This is currently not supported by the plugin so there is no way to authenticate FluentD to send messages to an MSK cluster that only allows that method of authn/z.

Previously, a similar suggestion was made but in the context of the ruby-kafka library which is deprecated. This feature could, however, be supported using the rdkafka2 output type.

Describe the solution you'd like

I created a fork that adds basic support for MSK IAM authentication with the help of the aws-msk-iam-sasl-signer-ruby library. I essentially adapted the example code from the signer library for the token generation when using rdkafka as the underlying Kafka library.

However, I'm not sure if this approach is solid enough, so I was wondering if someone could rework the code (or suggest improvements) so that it could be merged into the official plugin. For instance, my solution requires using the shared producer (config share_producer true) which is not the default. I wasn't able to use the multi-threaded producer feature as it led to a ThreadError due to recursive locking.

Describe alternatives you've considered

Since I need this feature for use in our production environment, I'm planning on using my own fork for the time being. However, I would be more comfortable if this feature was officially supported and did not require using a modified fork of this plugin.

Additional context

No response

@Watson1978
Copy link

#521 is the PR for this issue?

@daipom
Copy link

daipom commented Dec 4, 2024

If you could leave it open, it would be easier for someone familiar with it to advise you.

@madebydna
Copy link
Author

madebydna commented Dec 4, 2024

Yes, that is the PR. I actually opened it accidentally, as I wanted to ask general advice beforehand, but I can certainly reopen it again if that would make things easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request
Projects
None yet
Development

No branches or pull requests

3 participants