pradeepagrawal8184 commented on code in PR #1188:
URL: https://github.com/apache/ranger/pull/1188#discussion_r3871078717
##########
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:
The fallback uses a config key that does not exist anywhere else in the repo:
Ranger’s documented and setup-script-populated property is
ranger.truststore.password (see ranger-admin-default-site.xml and
security-admin/scripts/setup.sh). A typical install will have:
ranger.truststore.file
ranger.truststore.alias
ranger.truststore.password (plain text in site XML)
With the new code, if credential-store decryption fails or returns "none",
the fallback reads a non-existent property, so truststorePass stays blank and
the truststore is never applied — even when ranger.truststore.password is
configured.
--
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]