You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2023/01/07 10:28:00 UTC
[jira] [Created] (KAFKA-14604) SASL session expiration time will be overflowed when calculation
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)