fix: always use sasl oauthbearer for sarama client #6020
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Community Note
a followup fix for #5822 which broke acceptance test.
this PR always uses sasl oauthbearer to configure sarama/kafka client no matter apikey or refresh token is configured in the session.
and uses
IamAuthenticator
from new platform-sdk to build required token provider for sarama/kafka client, which simplifies the token fetch and validation becauseIamAuthenticator
will be responsible for fetching token from cache or from IAM, and refreshing token when expired.It is also used to support
iam_token_only
parameter when setting to true, in which case sasl plain authentication is disabled thus sasl plain will not work. Related PR in event-streams module.acceptance test
debug logs from the test run when configure apikey
debug log from test run when configure refresh token