Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting default client keytab with -U #9

Open
michael-o opened this issue Jun 23, 2022 · 2 comments
Open

Consider supporting default client keytab with -U #9

michael-o opened this issue Jun 23, 2022 · 2 comments

Comments

@michael-o
Copy link

michael-o commented Jun 23, 2022

Many years ago MIT Kerberos introduced the usage of client keytabs. Either with default location (krb5-config --defcktname) or with KRB5_CLIENT_KTNAME. When doing k5start -U it forces me to provide a keytab. MIT Kerberos has the same semantics here, using the first entry of the keytab.
My feature request is to make -f optional, query env var for keytab, then obtain default location and the ultimately fail when both does not work. When -f is provided proceed as usual. This would make usage consistent between both. kinit supports this too:

       -k [-i | -t keytab_file]
              requests a ticket, obtained from a key in the local host's keytab.  The location of the
              keytab  may be specified with the -t keytab_file option, or with the -i option to spec‐
              ify the use of the default client keytab; otherwise the default keytab  will  be  used.

In my case I would not do:

k5start -U -f /var/kerberos/krb5/user/1000/client.keytab -a -q -L -- {command} ...

but simply

k5start -U -a -q -L -- {command} ...
@michael-o michael-o changed the title Consider supporting client keytab with -U Consider supporting default client keytab with -U Jun 23, 2022
@rra
Copy link
Owner

rra commented Jun 29, 2022

Looks like the necessary API is krb5_kt_client_default, which doesn't appear to be supported by Heimdal. So this will probably have to be an optional feature depending on what underlying Kerberos library is used.

@michael-o
Copy link
Author

Correct, that'd MIT only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants