This is an automated email from the ASF dual-hosted git repository. richardantal pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git
The following commit(s) were added to refs/heads/master by this push: new 4b22faa PHOENIX-6810 Make SSL key-store type configurable (#114) 4b22faa is described below commit 4b22faa55b5e35974951cc7f41b7e84eeba261dd Author: richardantal <richardan...@apache.org> AuthorDate: Tue Jan 24 09:58:08 2023 +0100 PHOENIX-6810 Make SSL key-store type configurable (#114) and bump Avatica version to 1.23 --- .../java/org/apache/phoenix/queryserver/QueryServerProperties.java | 4 ++++ .../main/java/org/apache/phoenix/queryserver/server/QueryServer.java | 4 +++- pom.xml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/QueryServerProperties.java b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/QueryServerProperties.java index 9945da4..dda88cf 100644 --- a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/QueryServerProperties.java +++ b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/QueryServerProperties.java @@ -58,6 +58,10 @@ public class QueryServerProperties { "phoenix.queryserver.remoteUserExtractor.param"; public static final String QUERY_SERVER_DISABLE_KERBEROS_LOGIN = "phoenix.queryserver.disable.kerberos.login"; + public static final String QUERY_SERVER_TLS_KEYSTORE_TYPE_KEY = + "phoenix.queryserver.tls.keystore.type"; + public static final String QUERY_SERVER_TLS_KEYSTORE_TYPE_DEFAULT = + "jks"; public static final String QUERY_SERVER_TLS_ENABLED = "phoenix.queryserver.tls.enabled"; public static final String QUERY_SERVER_TLS_KEYSTORE = diff --git a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java index 45ead51..2add30e 100644 --- a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java +++ b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java @@ -284,6 +284,8 @@ public final class QueryServer extends Configured implements Tool, Runnable { final boolean useTls = getConf().getBoolean(QueryServerProperties.QUERY_SERVER_TLS_ENABLED, QueryServerOptions.DEFAULT_QUERY_SERVER_TLS_ENABLED); if(useTls) { final String tlsKeystore = getConf().get(QueryServerProperties.QUERY_SERVER_TLS_KEYSTORE); + final String keystoreType = getConf().get(QueryServerProperties.QUERY_SERVER_TLS_KEYSTORE_TYPE_KEY, QueryServerProperties.QUERY_SERVER_TLS_KEYSTORE_TYPE_DEFAULT); + final String tlsKeystorePassword = getConf().get(QueryServerProperties.QUERY_SERVER_TLS_KEYSTORE_PASSWORD, QueryServerOptions.DEFAULT_QUERY_SERVER_TLS_KEYSTORE_PASSWORD); final String tlsTruststore = getConf().get(QueryServerProperties.QUERY_SERVER_TLS_TRUSTSTORE); final String tlsTruststorePassword = getConf().get(QueryServerProperties.QUERY_SERVER_TLS_TRUSTSTORE_PASSWORD, QueryServerOptions.DEFAULT_QUERY_SERVER_TLS_TRUSTSTORE_PASSWORD); @@ -295,7 +297,7 @@ public final class QueryServer extends Configured implements Tool, Runnable { throw new Exception(String.format("if %s is enabled, %s must be specfified" , QueryServerProperties.QUERY_SERVER_TLS_ENABLED, QueryServerProperties.QUERY_SERVER_TLS_TRUSTSTORE)); } final File tlsTruststoreFile = new File(tlsTruststore); - builder.withTLS(tlsKeystoreFile, tlsKeystorePassword, tlsTruststoreFile, tlsTruststorePassword); + builder.withTLS(tlsKeystoreFile, tlsKeystorePassword, tlsTruststoreFile, tlsTruststorePassword, keystoreType); } } diff --git a/pom.xml b/pom.xml index b2d5ce9..740cbe3 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ <sqlline.version>1.9.0</sqlline.version> <slf4j.version>1.7.36</slf4j.version> <reload4j.version>1.2.19</reload4j.version> - <avatica.version>1.21.0</avatica.version> + <avatica.version>1.23.0</avatica.version> <servlet.api.version>3.1.0</servlet.api.version> <jsr305.version>3.0.0</jsr305.version>