I also faced this exception not long ago. I think it is an edge case, most
probably you have something else, but still... maybe it helps:

I tried to write a unit test which dynamically generated multiple jaas.conf
files. Then I was setting the java.security.auth.login.config system
property to the config file I needed in the given testcase, and when I
tried to establish a ZooKeeper connection in the unit test, I also got
the same exception that you got.

The problem was, that the security configuration file I referred in the
java.security.auth.login.config system property file was read only once,
then stored in memory. And it haven't got reloaded, even if the file (or
its path in the system property) changed. Maybe the best in this case is to
specify separate JAAS config sections for each tests and use a single
JAAS.conf file per JVM.

Mate

On Thu, Jan 9, 2020 at 2:56 PM Damien Diederen <[email protected]>
wrote:

>
> Hi Arpit,
>
> > I am trying to do SASL authentication between ZK and curator. […]
>
> Okay.
>
> > I am also setting -Dzookeeper.sasl.clientconfig="Client" system
> > variable.
>
> Looking at my deployments, I am specifying the location of the
> configuration file using another system property:
>
>     -Djava.security.auth.login.config=/path/to/jaas.conf
>
> > SASL configuration failed: javax.security.auth.login.LoginException: No
> > JAAS configuration section named 'Client' was found in specified JAAS
> > configuration file: '/<path to>/jaas.conf'.
>
> It looks like your "JAAS config key" is explicitly set to a bogus value
> (via the aforementioned system property or some other config file):
>
>     /<path to>/jaas.conf
>
> HTH, -D
>

Reply via email to