[
https://issues.apache.org/jira/browse/DRILL-5431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16182036#comment-16182036
]
ASF GitHub Bot commented on DRILL-5431:
---------------------------------------
Github user sohami commented on a diff in the pull request:
https://github.com/apache/drill/pull/950#discussion_r140588134
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/TestSSLConfig.java ---
@@ -91,10 +123,35 @@ public void testForTrustStore() throws Exception {
ConfigBuilder config = new ConfigBuilder();
config.put(ExecConstants.HTTP_TRUSTSTORE_PATH, "/root");
config.put(ExecConstants.HTTP_TRUSTSTORE_PASSWORD, "root");
- SSLConfig sslv = new SSLConfig(config.build());
+ config.put(ExecConstants.SSL_USE_HADOOP_CONF, false);
+ SSLConfig sslv = new SSLConfigBuilder()
+ .config(config.build())
+ .mode(SSLFactory.Mode.SERVER)
+ .initializeSSLContext(false)
+ .validateKeyStore(true)
+ .build();
assertEquals(true, sslv.hasTrustStorePath());
assertEquals(true,sslv.hasTrustStorePassword());
assertEquals("/root",sslv.getTrustStorePath());
assertEquals("root",sslv.getTrustStorePassword());
}
-}
\ No newline at end of file
+
+ @Test
+ public void testInvalidHadoopKeystore() throws Exception {
+ Configuration hadoopConfig = new Configuration();
+ String hadoopSSLFileProp = MessageFormat
+ .format(HADOOP_SSL_CONF_TPL_KEY,
SSLFactory.Mode.SERVER.toString().toLowerCase());
+ hadoopConfig.set(hadoopSSLFileProp, "ssl-server-invalid.xml");
+ ConfigBuilder config = new ConfigBuilder();
+ config.put(ExecConstants.SSL_USE_HADOOP_CONF, true);
+ SSLConfig sslv = new SSLConfigBuilder()
+ .config(config.build())
+ .mode(SSLFactory.Mode.SERVER)
+ .initializeSSLContext(false)
+ .validateKeyStore(true)
+ .hadoopConfig(hadoopConfig)
+ .build();
+ assertEquals("FAIL", sslv.getKeyStorePassword());
--- End diff --
Shouldn't this test fail while doing `validateKeyStore` since there is no
keystore path but only password in the hadoop config file ?
> Support SSL
> -----------
>
> Key: DRILL-5431
> URL: https://issues.apache.org/jira/browse/DRILL-5431
> Project: Apache Drill
> Issue Type: New Feature
> Components: Client - Java, Client - ODBC
> Reporter: Sudheesh Katkam
> Assignee: Parth Chandra
>
> Support SSL between Drillbit and JDBC/ODBC drivers. Drill already supports
> HTTPS for web traffic.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)