Hello,
I was running a few tests with Zookeeper (3.4.5) lately and found this
message continuously in my log files:
DEBUG [main-SendThread(localhost:55694):ZooKeeperSaslClient@519][] - Could
not retrieve login configuration: java.lang.SecurityException: Unable to
locate a login configuration.
I was actually just running one of the examples (LeaderSelectorExample) in
the Curator package.
When trying to find the origin or the problem, it seemed to me that the in
the previous lines of the corresponding method, there is an error. In line
487 it checks if the environment property exists, but there is an "||"
instead of an "&&" after it, so it does not skip the rest of the JAAS
configuration checking if the property is not there. Here is the code:
484 // variable or method in this class to determine whether the
client is
485 // configured to use SASL. (see also ZOOKEEPER-1455).
486 try {
487 if ((System.getProperty(Environment.JAAS_CONF_KEY) != null) ||
488
((javax.security.auth.login.Configuration.getConfiguration() != null) &&
489
(javax.security.auth.login.Configuration.getConfiguration().
490 getAppConfigurationEntry(System.
491
getProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY,"Client"))
492 != null))) {
493 // Client is configured to use a valid login
Configuration, so
494 // authentication is either in progress, successful, or
failed.
495
Did I interpret this wrongly or is this something that should be fixed?
Regards,
Germán.