-
Notifications
You must be signed in to change notification settings - Fork 484
Return false when java.security.auth.login.config is unreadable #78
Copy link
Copy link
Open
Description
In the ZkClient#isZkSaslEnabled, the method fails when the file represented by java.security.auth.login.config is unreadable:
String loginConfigFile = System.getProperty(JAVA_LOGIN_CONFIG_PARAM);
if (loginConfigFile != null && loginConfigFile.length() > 0) {
LOG.info("JAAS File name: " + loginConfigFile);
File configFile = new File(loginConfigFile);
if (!configFile.canRead()) {
throw new IllegalArgumentException("File " + loginConfigFile + "cannot be read.");
}
...Another 3rd-party library I'm using in the classpath, unfortunately, sets the java.security.auth.login.config system property to gss.conf, which causes ZkClient to fail when checking whether Sasl is enabled.
Will it be alright to replace this with a logger warning instead (i.e., return false on cases where the config file is unreadable)? If not, what're your recommendations?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels