[ https://issues.apache.org/jira/browse/KAFKA-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dyingjiecai reopened KAFKA-14604: --------------------------------- > 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 > Reporter: Luke Chen > Assignee: PoAn Yang > Priority: Major > > 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, the `sessionExpirationTimeNanos` will be a negative value, > and cause the session timeout on each check. > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)