lajith2006 commented on code in PR #29357:
URL: https://github.com/apache/flink/pull/29357#discussion_r4676744501


##########
flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/PekkoUtils.java:
##########
@@ -349,14 +350,17 @@ private static void addSslRemoteConfig(
         final String sslCertFingerprints =
                 sslCertFingerprintString != null
                         ? Arrays.stream(sslCertFingerprintString.split(","))
-                                .collect(Collectors.joining("\",\"", "[\"", 
"\"]"))
+                                .map(PekkoUtils::quote)

Review Comment:
   May be good to have  `.map(String::trim): ` . If a user configures` 
security.ssl.internal.cert-fingerprint: "AA:BB:CC, DD:EE:FF", `the second item 
will be quoted as " DD:EE:FF" (preserving the leading space) ?. 
   
   Also I think  if `sslCertFingerprintString` is empty "" or whitespace " ", 
split(",") produces [""], resulting in ["\"\""]. When 
[CustomSSLEngineProvider.java](https://github.com/apache/flink/blob/master/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/CustomSSLEngineProvider.java#L123)
 checks sslCertFingerprints.isEmpty(), it evaluates to false and attempts to 
construct FingerprintTrustManagerFactory with an invalid empty fingerprint 
rather than falling back to the default trust manager ? May be good to have 
`filter(s -> !s.isEmpty())` ?.



-- 
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