pradeepagrawal8184 commented on code in PR #1188:
URL: https://github.com/apache/ranger/pull/1188#discussion_r3871096083
##########
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) {
Review Comment:
Truststore password resolution nests the plain-text fallback inside the
providerPath && truststoreAlias block. If either is missing, truststorePass is
never resolved from plain text. That’s inconsistent with keystore behavior and
can block valid configs.
Suggested pattern (aligned with keystore + existing Ranger properties):
`if (providerPath != null && truststoreAlias != null) {
truststorePass = CredentialReader.getDecryptedString(...);
}
if (StringUtils.isBlank(truststorePass) ||
"none".equalsIgnoreCase(truststorePass.trim())) {
truststorePass =
EmbeddedServerUtil.getConfig("ranger.truststore.password");
}`
--
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]