You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/01 21:24:08 UTC

[GitHub] [pinot] jasperjiaguo commented on a change in pull request #7653: Adding config for keystore types, switching tls to native implementation, and adding authorization for server-broker tls channel

jasperjiaguo commented on a change in pull request #7653:
URL: https://github.com/apache/pinot/pull/7653#discussion_r740540089



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/util/TlsUtils.java
##########
@@ -101,23 +112,26 @@ public static TlsConfig extractTlsConfig(PinotConfiguration pinotConfig, String
    * @return KeyManagerFactory
    */
   public static KeyManagerFactory createKeyManagerFactory(TlsConfig tlsConfig) {
-    return createKeyManagerFactory(tlsConfig.getKeyStorePath(), tlsConfig.getKeyStorePassword());
+    return createKeyManagerFactory(tlsConfig.getKeyStorePath(),
+        tlsConfig.getKeyStorePassword(), tlsConfig.getKeyStoreType());
   }
 
   /**
    * Create a KeyManagerFactory instance for a given path and key password
    *
    * @param keyStorePath store path
    * @param keyStorePassword password
-   *
+   * @param keyStoreType keystore type for keystore
    * @return KeyManagerFactory
    */
-  public static KeyManagerFactory createKeyManagerFactory(String keyStorePath, String keyStorePassword) {
+  public static KeyManagerFactory createKeyManagerFactory(String keyStorePath, String keyStorePassword,
+      String keyStoreType) {
     Preconditions.checkNotNull(keyStorePath, "key store path must not be null");
     Preconditions.checkNotNull(keyStorePassword, "key store password must not be null");
+    keyStoreType = StringUtils.isBlank(keyStoreType) ? KeyStore.getDefaultType() : keyStoreType;
 
     try {
-      KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
+      KeyStore keyStore = KeyStore.getInstance(keyStoreType);

Review comment:
       `keyStoreType = StringUtils.isBlank(keyStoreType) ? KeyStore.getDefaultType() : keyStoreType;`
   It will be set to the default keystore type. Same logic applies for the truststore type.




-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org