vikaskr22 commented on code in PR #1188:
URL: https://github.com/apache/ranger/pull/1188#discussion_r3967201405
##########
embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java:
##########
@@ -200,6 +206,32 @@ public void start() {
ssl.setAttribute("keystorePass", keystorePass);
ssl.setAttribute("keystoreFile", keystoreFile);
+ // Resolve TrustStore & related properties
+ String truststoreCredsAlias =
EmbeddedServerUtil.getConfig("ranger.service.https.attrib.truststore.credential.alias");
+ String truststorePass = null;
+
+ if (providerPath != null && truststoreCredsAlias != null) {
+ truststorePass =
CredentialReader.getDecryptedString(providerPath.trim(),
truststoreCredsAlias.trim(),
EmbeddedServerUtil.getConfig("ranger.truststore.file.type",
RANGER_TRUSTSTORE_FILE_TYPE_DEFAULT));
Review Comment:
In the same file, getKeyManagers() method and getTrustManagers() method,
both are reading the same credentialStore as they are reading the same property
"ranger.credential.provider.path" .
But see the storeType that is being used at two places, in getKeyManagers()
it uses keyStoreType (ranger.keystore.file.type) to read from credStore and in
getTrustStoreManagers(), it uses trustStoreType(ranger.truststore.file.type).
But in our case, I have updated the code as suggested to use the same
storeType, that is, keyStoreType while reading from the credentialStore. Is
something missing there ?
--
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]