Luke Chen created KAFKA-14604:
---------------------------------

             Summary: SASL session expiration time will be overflowed when 
calculation
                 Key: KAFKA-14604
                 URL: https://issues.apache.org/jira/browse/KAFKA-14604
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 3.3.1
            Reporter: Luke Chen
            Assignee: Luke Chen


When sasl server of client set a large expiration time, the timeout value might 
be overflowed, and cause the session timeout immediately.

 

[Here|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/security/authenticator/SaslServerAuthenticator.java#L694]'s
 the sasl server timeout's calculation

[Here|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/security/authenticator/SaslClientAuthenticator.java#L692]'s
 the sasl client timeout's calculation

 

something like this:
{code:java}
sessionExpirationTimeNanos = authenticationEndNanos + 1000 * 1000 * 
sessionLifetimeMs; {code}
So, if the configured or returned sessionLifetimeMs is a large number, after 
the calculation, it'll be a negative value, and cause the session timeout each 
check.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to