muralibasani commented on code in PR #24070:
URL: https://github.com/apache/kafka/pull/24070#discussion_r4514104151


##########
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/secured/HttpJwtRetriever.java:
##########
@@ -121,8 +123,22 @@ public void configure(Map<String, ?> configs, String 
saslMechanism, List<AppConf
 
         this.loginRetryBackoffMs = 
cu.validateLong(SASL_LOGIN_RETRY_BACKOFF_MS);
         this.loginRetryBackoffMaxMs = 
cu.validateLong(SASL_LOGIN_RETRY_BACKOFF_MAX_MS);
-        this.loginConnectTimeoutMs = 
cu.validateInteger(SASL_LOGIN_CONNECT_TIMEOUT_MS, false);
-        this.loginReadTimeoutMs = 
cu.validateInteger(SASL_LOGIN_READ_TIMEOUT_MS, false);
+        // The timeouts are normally defaulted by the config definition, but 
the configs can also come from a plain
+        // map (for example in tools), so fall back to the documented defaults 
to never wait indefinitely.
+        Integer connectTimeoutMs = 
cu.validateInteger(SASL_LOGIN_CONNECT_TIMEOUT_MS, false);
+        this.loginConnectTimeoutMs = connectTimeoutMs != null ? 
connectTimeoutMs : DEFAULT_SASL_LOGIN_CONNECT_TIMEOUT_MS;

Review Comment:
   As sasl.login.retry.backoff.max.ms is also 10s, this login would fail 
without any retry if first attempt fails.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to