smiklosovic commented on code in PR #3908:
URL: https://github.com/apache/cassandra/pull/3908#discussion_r1974978920
##########
src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java:
##########
@@ -294,5 +301,38 @@ protected boolean passwordMatchesIfPresent(String
keyPassword)
{
return StringUtils.isEmpty(password) ||
keyPassword.equals(password);
}
+
+ private static String resolvePassword(String keystoreFilePath, String
password, String passwordFilePath)
+ {
+ if (password != null)
+ return password;
+
+ if (StringUtils.isEmpty(passwordFilePath))
+ return password;
Review Comment:
Having logic
if (password != null)
return password;
if (StringUtils.isEmpty(passwordFile))
return null;
Then having this in yaml returns:
# password:
# password_file:
In this case, it will return null
password:
# password_file
in this case it will return null
password: ""
# password_file
in this case it will return empty
# password
password file: abc
in this case it will return what is in abc or null if file is empty.
Do you want to say that we need to cover a case when a file specified and
exists but its length is zero? That way it should be returning null.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]