jon-wei commented on a change in pull request #6076: Mutual TLS support
URL: https://github.com/apache/incubator-druid/pull/6076#discussion_r218663425
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java
 ##########
 @@ -256,6 +259,32 @@ static Server makeAndInitializeServer(
           sslContextFactory.setExcludeProtocols(
               tlsServerConfig.getExcludeProtocols().toArray(new String[0]));
         }
+
+        
sslContextFactory.setNeedClientAuth(tlsServerConfig.isRequireClientCertificate());
+        if (tlsServerConfig.isRequireClientCertificate()) {
+          if (tlsServerConfig.getCrlPath() != null) {
+            sslContextFactory.setValidatePeerCerts(true);
+            sslContextFactory.setCrlPath(tlsServerConfig.getCrlPath());
+          }
+          if (tlsServerConfig.isValidateHostnames()) {
+            sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
+          }
+          if (tlsServerConfig.getTrustStorePath() != null) {
+            
sslContextFactory.setTrustStorePath(tlsServerConfig.getTrustStorePath());
+            sslContextFactory.setTrustStoreType(
+                tlsServerConfig.getTrustStoreType() == null ?
 
 Review comment:
   Reformatted these areas

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to