You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "imcdo (via GitHub)" <gi...@apache.org> on 2023/03/17 21:29:02 UTC

[GitHub] [kafka] imcdo commented on a diff in pull request #13415: KAFKA-14816: Only load SSL properties when issuing cross-worker requests to HTTPS URLs

imcdo commented on code in PR #13415:
URL: https://github.com/apache/kafka/pull/13415#discussion_r1140725883


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java:
##########
@@ -97,7 +98,11 @@ public <T> HttpResponse<T> httpRequest(String url, String method, HttpHeaders he
     public <T> HttpResponse<T> httpRequest(String url, String method, HttpHeaders headers, Object requestBodyData,
                                                   TypeReference<T> responseFormat,
                                                   SecretKey sessionKey, String requestSignatureAlgorithm) {
-        HttpClient client = httpClient();
+        // Only try to load SSL configs if we have to (see KAFKA-14816)
+        SslContextFactory sslContextFactory = url.startsWith("https://")

Review Comment:
   Having no background here it does seem strange that we use our connect worker ssl properties for its own internal communication for rest ssl properties, we probably would want to seperate them out to their own set of properties but thats coming from someone with minimal context.  (Example here being we use our own private ca for interworker communication but may want a publicly signed ca cert for rest)
   
   All that being said - this is a fix for a regression so no need to go ahead and change the world



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org