mgranderath commented on code in PR #13645: URL: https://github.com/apache/pinot/pull/13645#discussion_r1683940105
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/service/server/QueryServer.java: ########## @@ -184,4 +211,27 @@ public void cancel(Worker.CancelRequest request, StreamObserver<Worker.CancelRes // we always return completed even if cancel attempt fails, server will self clean up in this case. responseObserver.onCompleted(); } + + private SslContext buildSslContext(TlsConfig tlsConfig) { + LOGGER.info("Building gRPC SSL context"); + SslContext sslContext = CLIENT_SSL_CONTEXTS_CACHE.computeIfAbsent(tlsConfig.hashCode(), tlsConfigHashCode -> { + try { + SSLFactory sslFactory = RenewableTlsUtils.createSSLFactoryAndEnableAutoRenewalWhenUsingFileStores(tlsConfig, + PinotInsecureMode::isPinotInInsecureMode); + SslContextBuilder sslContextBuilder = SslContextBuilder.forClient(); + sslFactory.getKeyManagerFactory().ifPresent(sslContextBuilder::keyManager); + sslFactory.getTrustManagerFactory().ifPresent(sslContextBuilder::trustManager); Review Comment: Does it make sense to extract this from here so it can easily be re-used? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org