vikaskr22 commented on code in PR #1188:
URL: https://github.com/apache/ranger/pull/1188#discussion_r3894113743


##########
embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java:
##########
@@ -187,6 +187,17 @@ public void start() {
                 keystorePass = 
EmbeddedServerUtil.getConfig("ranger.service.https.attrib.keystore.pass");
             }
 
+            String truststoreAlias = 
EmbeddedServerUtil.getConfig("ranger.truststore.alias");
+            String truststorePass  = null;
+
+            if (providerPath != null && truststoreAlias != null) {
+                truststorePass = 
CredentialReader.getDecryptedString(providerPath.trim(), 
truststoreAlias.trim(), 
EmbeddedServerUtil.getConfig("ranger.truststore.file.type", 
RANGER_TRUSTSTORE_FILE_TYPE_DEFAULT));
+
+                if (StringUtils.isBlank(truststorePass) || 
"none".equalsIgnoreCase(truststorePass.trim())) {
+                    truststorePass = 
EmbeddedServerUtil.getConfig("ranger.service.https.attrib.truststore.pass");

Review Comment:
   @pradeepagrawal8184 , I have tried to follow the pattern of 
getTrustManager() method along with introduction of a new property named 
**ranger.service.https.attrib.truststore.pass** .
   
   First it tries to read password from CredentialStore and if it's empty, then 
fallbacks to above property.  
   
   Should we add above property in the ranger-admin-default-site.xml as well ? 
And should we also need to update the setup.sh script to populate this new 
property ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to