Re: Use ssh key to acquire TGT?



Adam Megacz <megacz@xxxxxxxxx> wrote:
"Christopher D. Clausen" <cclausen@xxxxxxx> writes:
How exactly is having a private key password different from simply
telling the user to kinit ONCE on their local machine before
attempting to SSH to your Kerberized machines?

Because you have to kinit once **per realm**.

Well, if the passwords are differnet you can't get around that. If the
passwords are manually syncronized, it should be possible to have some
process that takes a single password and gets multiple tickets from it.

And wouldn't a user need to enter multiple passwords if the passphrases
were different on seperate private keys?

Most users also have many accounts on many machines that are not part
of HCOOP. Sadly, the world does not revolve around our KDC.

Ask for realm trusts. (Or wait for $bigcompany to create a single huge
world-wide Kerberos realm.)

That's the nice part about ssh public keys -- you can use the same
private key to log into any number of servers, even if the server
admins don't have the logistical bandwidth (or political leverage) to
negotiate complicated cross-realm arrangements with each other. Or
even if some of the servers don't use kerberos.

You can similarly set your password to be the same for multiple realms.

Also, you could rig up a login script (or PAM) that used a local
keytab file to obtain AFS tickets automatically at sucessful login.

Yes, unfortunately this would mean that anybody who hacked local root
on any one of the shell servers would instantly have keytabs for every
user. Not good.

Anyone who hacked local root would be able to just copy all the tickets
in the krbcc in /tmp when users login anyway. Yes, immediate access to
all principals would be bad, but having access to even some tickets
would be bad enough. Or replace the login process with something that
grabs tickets / passwords.

I don't know know enough about sshd and private keys to know if its
possible to use something locally on a shell server to decrypt a keytab
at login and then use it for AFS access. I suspect such an a sshd / PAM
modification is possible, but I have no idea how to go about
implementing it.

Also, I don't know if MIT KDC supports having both a password and a
keytab for a user. I know it's possible in theory, but I think that
feature just isn't there -- creating a keytab erases their password.

It should be possible. Use the addent ktutil function.

kinit username
Password for username@REALM:
kvno username
username@REALM: kvno = 1
kdestroy

($kvno = 1)

ktutil
ktutil: addent -password -p username -k $kvno -e des-cbc-crc
Password for username@REALM:
ktutil: addent -password -p username -k $kvno -e des3-cbc-sha1
Password for username@REALM:
ktutil: wkt username.keytab
ktutil: quit

(and enc_types as needed)

<<CDC


________________________________________________
Kerberos mailing list Kerberos@xxxxxxx
https://mailman.mit.edu/mailman/listinfo/kerberos

.



Relevant Pages

  • RE: Group membership / Kerberos tickets
    ... Group membership / Kerberos tickets ... Have you tried using Kerbtray or another utility to purge the servers' ... or you have to reboot the servers. ...
    (Focus-Microsoft)
  • Re: pamkrbval: KDC policy rejects request for this entry
    ... If so can you do a kvno host/unix_client.domain.host.com and compare the number with the one in the keytab? ... Audit with a result code from the request of 0xC which from some ... The client libraries are based on MIT Kerberos V5 1.3.5 release. ... Connecting to default Realm ...
    (comp.protocols.kerberos)
  • MITKRB5-SA-2003-004: Cryptographic weaknesses in Kerberos v4 protocol
    ... A cryptographic weakness in version 4 of the Kerberos protocol allows ... an attacker to use a chosen-plaintext attack to impersonate any ... containing tickets for the target client principal. ... service key, then the attacker can fabricate a ticket. ...
    (Bugtraq)
  • Re: kerberos AD: keytab and service principal not needed?
    ... I posted details about the kerberos udp/tcp packets. ... By creating the keytab, you have a "shared secret" between the KDC ... I did run tcpdump on two hosts, looking for kerberos protocol packets. ...
    (comp.unix.aix)
  • Re: [modauthkerb] mod_auth_kerb, virtualhost and Firefox/Safari
    ... then the krb5_rd_req will look in the keytab for the principal ... Kerberos list a few years ago but never acted on by MIT. ... +Krb4Srvtab options are used to specify the filename with the keytab. ... +qualified server name from the URL without canonicalization. ...
    (comp.protocols.kerberos)