acsaki opened a new pull request, #12179:
URL: https://github.com/apache/kafka/pull/12179

   
   
   Clients remain connected and able to produce or consume despite an expired 
OAUTHBEARER token.
   
   The problem can be reproduced using the 
https://github.com/acsaki/kafka-sasl-reauth project by starting the embedded 
OAuth2 server and Kafka, then running the long running consumer in 
OAuthBearerTest and then killing the OAuth2 server thus making the client 
unable to re-authenticate.
   
   Root cause seems to be 
SaslServerAuthenticator#calcCompletionTimesAndReturnSessionLifetimeMs failing 
to set ReauthInfo#sessionExpirationTimeNanos when tokens have already expired 
(when session life time goes negative), in turn causing 
KafkaChannel#serverAuthenticationSessionExpired returning false and finally 
SocketServer not closing the channel.
   
   The issue is observed with OAUTHBEARER but seems to have a wider impact on 
SASL re-authentication.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to