Skip to content

Feature: Add MSK IAM auth plugin with token refresh #216

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

scottybrisbane
Copy link

The existing MSK IAM auth functionality built in to the proxy doesn't refresh the authentication token before expiry. As such, when the authentication expires, MSK force closes the connection between the proxy and the brokers. This forces the proxy to re-establish new connections with new authentication credentials, which causes unexpected EOF errors in proxy clients before the connection is re-established.

To improve the behaviour of the proxy when working with IAM authentication against MSK clusters, this pull request introduces a new auth token provider plugin that handles IAM based SASL authentication with MSK. The new plugin supports token refresh before expiry, thereby improving the behaviour described above. https://github.com/aws/aws-msk-iam-sasl-signer-go is used to handle the actual token generation.

@scottybrisbane scottybrisbane marked this pull request as ready for review July 31, 2025 05:42
@scottybrisbane
Copy link
Author

Hmmm... on testing this further, it's still not quite solving the problem of connections between the proxy and brokers being closed by MSK. I suspect this is due to authentication on existing open connections not being refreshed, even when the tokens that were used for the initial auth have expired. I'll move this back to a draft state for now whilst I investigate further and consider other options.

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

Successfully merging this pull request may close these issues.

1 participant