You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2025/01/07 02:08:00 UTC
[jira] [Assigned] (KAFKA-14604) SASL session expiration time will be overflowed when calculation
[ https://issues.apache.org/jira/browse/KAFKA-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Chen reassigned KAFKA-14604:
---------------------------------
Assignee: PoAn Yang (was: Luke Chen)
> 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)