aws-msk-iam-auth: 2.1.1 release includes SaslAuthenticationException regression
In #143, I reported an issue in which the first re-authentication failed for the OAUTHBEARER mechanism. This issue was resolved in release 2.0.3 for the case when awsRoleArn was provided. When I upgraded our apps from 2.0.3 to 2.1.1, I noticed our apps were restarting every hour due to a SaslAuthenticationException: Session too short error. The difference between the behavior now vs in #143 is that the failure occurs after one hour, not after 15 minutes when the role first expires.
I reported this in a comment on a related issue for the case where awsRoleArn is not provided, but since that error also occurs in 2.0.3 I’ve created this as a separate issue.
security.protocol=SASL_SSL
sasl.mechanism=OAUTHBEARER
sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required awsRoleArn="<role arn>" awsStsRegion="<region>";
sasl.login.callback.handler.class=software.amazon.msk.auth.iam.IAMOAuthBearerLoginCallbackHandler
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 16 (7 by maintainers)
Have published release 2.2.0. It should be available in the next 12-24 hours.
I added the fix for
awsRoleArnhttps://github.com/aws/aws-msk-iam-auth/pull/183I think something similar is happening for default creds. Will try to fix that today.
We’re also seeing this using version
2.1.0. Looking back through the comments from @jamielwhite, it seems we’re running our services in exactly the same way (pods in a kubernetes cluster with iam credentials assigned via irsa roles). As mentioned above, the error is causing our apps to restart.Thank you for your work on resolving this @sidyag. Do you know when a release tag is likely to be published with the fix?
Interesting. The configuration is provided with
awsRoleArn? Let me try and reproduce it in that way.