When using Sasl.createSaslClient with kerberos, is it possible to modify kerberose configuration options?

266 views Asked by At

I would like to use non-default location for ticket cache. Is it possible to set this value? I checked Krb5LoginModule and it allows for such configuration, but I could not find anything related to Sasl clients.

Any help with this regard will be highly appreciated.

2

There are 2 answers

0
Michael-O On

You cannot do that with the SASL client because SASL is delegating the work to JGSS. What you can you is to obtain a login context with your custom location and perform a Subject.doAs with the subject from the login context with the SASL client. This will give you what you want. (Sample code available)

0
Prafulla On

I found out that if you set KRB5CCNAME environment variable, Kerberos component which SASL client delegates work to, read ticket cache file name/path from this env variable. It resolved my problem.