Logging missing keytab file in Krb5LoginModule

Horváth Péter Gergely horvath.peter.gergely at gmail.com
Tue Aug 17 20:19:59 UTC 2021


Dear All,

I am wondering if someone would be kind enough to sponsor the following
small change:

When debugging is enabled for com.sun.security.auth.module.Krb5LoginModule
and the file specified by "keyTab" is not found, Krb5LoginModule simply
emits a generic message, similar to this:
"Key for the principal foobar at acme.com not available in
/home/foobar/foobar.keytab"

This message can be quite confusing and counterintuitive if the file is
actually not there, because, based on the message, one would think that the
JVM probed the file, found it, loaded the data, but still could not use the
keytab data for authentication.

I would propose adding further debug logging to Krb5LoginModule so as to
emit a warning in case the key was not found, due to the file not being
present, readable or a being a directory.

Please find attached the patch file: it is trivial, and only affects a
debug branch of the code.

Please let me know what you think.

Thanks,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20210817/29ccda41/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keyTab_file_checks.patch
Type: text/x-patch
Size: 1934 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20210817/29ccda41/keyTab_file_checks.patch>


More information about the security-dev mailing list