fix: mitigate STS assume role throttling in Kafka buffer#6634
Merged
dinujoh merged 3 commits intoMar 13, 2026
Conversation
Prevent excessive STS AssumeRole calls when customers delete their IAM role or misconfigure the trust policy. Previously, one pipeline could generate 12,000 STS calls in 4 minutes due to unbounded retries of non-retryable AccessDeniedException errors. Changes: - KafkaSecurityConfigurer: Fail fast on STS 403 (AccessDenied) in getBootStrapServersForMsk() instead of retrying 360 times - KafkaCustomConsumer: Replace fixed 10s retry with exponential backoff (10s to 5min max) for AuthenticationException errors - KafkaCustomConsumer: Stop consumer after 50 consecutive auth failures to prevent indefinite STS hammering - KafkaCustomConsumer: Reset backoff and failure counter on successful poll to handle transient errors gracefully - Add exponential backoff to outer run() exception handler Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
sb2k16
previously approved these changes
Mar 12, 2026
dlvenable
requested changes
Mar 12, 2026
Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
…ation constants, remove silent shutdown Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
d029b97 to
d44e9e9
Compare
sb2k16
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Prevent excessive STS AssumeRole calls when customers delete their IAM role or misconfigure the trust policy. Previously, one customer could generate 12,000 STS calls in 4 minutes due to unbounded retries of non-retryable AccessDeniedException errors.
Changes:
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.