Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Kerberos: The Definitive Guide

Posted by timothy on Mon Feb 14, 2005 04:00 PM
from the connecting-stuff dept.
nazarijo (Jose Nazario) writes "Everyone knows that Kerberos is the biggest solution to the single sign-on dilemma. How can you get everyone using one bank of accounts on loads of machines, from UNIX, OS X, and Windows environments, and do so securely? You can shoehorn in a variety of mechanisms, or you can adopt Kerberos. However, Kerberos intimidates a lot of people, somewhat deservedly so, but also somewhat needlessly. Enter Kerberos: The Definitive Guide, one of the latest 'definitive guides' from O'Reilly." Read on for the rest of Nazario's review.

I got started using Kerberos many moons ago, at my university. This is probably how many people got to know about it. While I didn't use it very much, it's there that I learned the basics and experimented a bit with Kerberos. Interest in it took off after Microsoft incorporated Kerberos authentication mechanisms into Windows 2000. Suddenly it wasn't such arcane knowledge.

Two open source Kerberos implementations exist, the MIT reference implementation, and the Heimdal Kerberos implementation. Even then, there are two main versions which you can find, Kerberos IV and Kerberos V. Kerberos IV went away for most environments with the passing of the Y2K mark, but some legacy apps need support. So, you still have to deal with it on occasion.

In writing Secure Architectures with OpenBSD, I got a lot more intimate with Kerberos, and even set up a decently sized realm in my house. Hence, I got to experience the turmoil of setup and debugging. A book like Kerberos: The Definitive Guide (K:TDG) would have been very welcome. Instead, I slogged my way through it, and got it to work for the most part.

K:TDG will help you set up your Kerberos world by introducing you to the complex subject, terminology, and the pieces. Once you learn the basics, you recognize that a simple realm is actually somewhat easy to set up. The author, Jason Garman, uses a mixed Mac OS X, UNIX, and Windows environment, focusing on UNIX most of the time. The bulk of the examples deal with MIT Kerberos 5 version 1.3 (krb5-1.3) but should work for most versions. Some attention is given to the Heimdal implementation (which is integrated with BSD, for example), and for the most part you'll be OK. Windows examples are also pretty copious but always come second. If you're comfortable with UNIX, you'll easily be able to translate these into Windows examples to help bridge the Windows gaps.

Chapter 1 is an obligatory Introduction, a short chapter that introduces the key concepts of Kerberos and what the book will cover. A very quick comparison of Kerberos to DCE, SESAME, and earlier versions of Kerberos is given. This chapter serves as a nice selling point for the book, it's the type of thing you'd flip through in the book store to decide if you should buy the book or not.

Chapter 2 is a decent overview for the new user of Kerberos to the system and how it works. Kerberos is placed into its role in a AAA infrastructure - authentication, authorization, and accounting - as well as some caveats that are commonly made. You'll learn about core Kerberos features like tickets, realms, principles, instances, ticket granting tickets, and the ticket cache. A decent overview for practical purposes is given, but you will definitely want another resource if you're interested in diving headlong into Kerberos.

These pieces come together in Chapter 3, where the actual protocols are described. They're laid out for a non-cryptographer, so go elsewhere if you want to learn the real formal material behind the system. Understanding the protocols is important to understanding the service as a whole. For someone new to Kerberos, you'll probably want to spend a little more time reading this to get oriented in the Kerberos world. The chapter doesn't mess around too much and delivers a fair treatment of the material.

Chapter 4 is the meat of the book's material, setting up your implementation. It all starts with the KDC (key distribution center) and realm initialization. Again, the bulk of the treatment is on the MIT implementation on UNIX, with the Heimdal and then Windows sections following next. Slave KDCs are also introduced, which is useful for large environments. An OS X server is missing, but Kerberos clients for all three (UNIX, Windows and OS X) is given. The role of DNS is also explained well, a useful touch that's missing in some Kerberos documents I've used in the past. This chapter will get you started, and with some of the supplied documentation you should be up and running in no time.

Chapter 5 is devoted to troubleshooting, an all too familiar task for a new Kerberos administrator. Common problems, their diagnosis, and resolution are discussed. I like the presentation of this chapter and think it will be useful for most real-world situations you'll encounter.

Security concerns with Kerberos are covered in Chapter 6, which discusses concrete and abstract attacks on the Kerberos scheme. Since all of the security in Kerberos resides in your KDC hosts, obviously this covers some of the material. However, the clients can exposes your Kerberos realm to attacks, as well, and how to circumvent these problems is covered. A decent and practical chapter, and covered on both UNIX and Windows.

In Chapter 7 a number of Kerberos enabled applications are discussed. After all, you can do more than just log on locally with Kerberos, you can use remote login programs like SSH, remote access scenarios like printing, and even control X via Kerberos. While not every application that I would have liked was covered, the treatment was fair and should get you started with a number of Kerberos enabled tools in your new realm.

A strong selling point of the book is given in Chapter 8, titled Advanced Topics. Three main topics are discussed. The first is cross-realm authentication, where you have more than one separate Kerberos realm on your network but you want to have users switch between the two without creating accounts in the other. This can get tricky, and the book does a decent job of introducing it, but it's not as complete as it could be. The second main topic in this chapter is Kerberos 4 and 5 interoperability, which is relatively straightforward. Most Kerberos 5 implementations come with tools to process Kerberos 4 ticket scenarios to handle legacy applications. And finally, a really valuable section covers UNIX and Windows Kerberos interoperability, a hairy issue. Again, incomplete but strong enough that you should be able to get it working with some elbow grease. This is probably the most valuable chapter of the book, which does a decent job at the introductory level, but you'll be left to tie up a few loose ends on your own.

An obligatory case study is given in Chapter 9, where you can see a number of configuration samples and even a mixed Windows-UNIX environment. Not terribly useful when compared to chapters 4 and 8, but overall worthwhile. It may answer some of your questions, even. Chapter 10 wraps up the book with looking at Kerberos futures, which isn't all that useful, honestly. What gets more useful is the appendix, which gives an administration reference. Lots of commands are given for MIT, Heimdal and even for Windows, so you can quickly jump there to refresh your memory on a topic.

Overall this book is recommended if you need a place to start working on Kerberos, especially in a mixed environment. The MIT and Heimdal documents are a fair place to start for a UNIX only Kerberos realm, but if you find they aren't enough, this is probably the right book for you. The book's main strength is that it covers Kerberos on the three main platforms in use (Windows, OS X, and UNIX), although it could provide a deeper treatment to the mixed environment than it gives. Still, you should be able to use this as a starting point, and it's probably the best treatment I've seen so far on Kerberos setup and administration.


You can purchase Kerberos: The Definitive Guide from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page

+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by zyridium (676524) on Monday February 14 2005, @04:03PM (#11671666)
    When are people going to realise that the problem with single sign on isn't a technical one....
    • by Anonymous Coward on Monday February 14 2005, @04:05PM (#11671698)
      Large corporations and educational institutions benefit greatly from single-sign-on ... Consider a college - When you have 10 computer labs with 4-5 operating systems and N SANs all mounting common home directories, the ability to log in to all of them with the same username/password saves a LOT of support headaches. We used to implment (S)LDAP, which worked great for everything but the Win2k boxes - SSO for OSX+Linux with NFS mounted homes actually made a lot of people happy.
      • by DrZaius (6588) <gary.richardson+slashdot@gmail.com> on Monday February 14 2005, @04:25PM (#11671911) Homepage
        There is a big difference between SSO and having a central account database.

        Single Sign On means your enter your username/password once and you can connect to any resources you are allowed to.

        For example, you'd log into your Windows XP PC. Without entering your password again, you can browse other computers in the AD Domain. You start Outlook and you never have to enter your login info for your exchange server. From there, you point IE at your intranet server and it uses the kerberos ticket to log you in without a password.

        In the unix world, it means getting a ticket with kinit. From there, ssh, ftp, mozilla and so forth should be smart enough to not require you to log in again.
    • single sign on is a damn useful thing for an enterprise network. where you have direct control (as the administrator at least i do) over all the places your employees might ever log on. and where they should only log on for company-related stuff. privacy never enters the equation in those cases

      out of the enterprise, it's a whole different game
    • Never.

      It is an article of faith that all technical problems have technical solutions. It is a further article of faith that if a problem can be called "technical" it will be -- no matter whether or not that's accurate. Because technical problems can by definition be solved by technology, and everyone wants problems to be solved, all problems are therefore technical.

      God forbid we have to change the way we do business to fix an issue. No! Just put a technical band-aid on it!
    • by fm6 (162816) on Monday February 14 2005, @04:17PM (#11671829) Homepage Journal
      You started to say something interesting and useful, then your attention wandered. Inquiring minds want to know: if the problem with SSO isn't technical, what is it?
    • I think you're confusing the single sign on presented here, which is an intra-enterprise sign-on, with universal single-sign on systems like Passport.
    • by slamb (119285) * on Monday February 14 2005, @05:09PM (#11672361) Homepage
      When are people going to realise that the problem with single sign on isn't a technical one....

      The biggest one I see is technical: there's no good single sign-on system designed for the Internet.

      Kerberos is the only widely implemented system I'm aware of that implements one key criterium: service providers can't use the credentials passed to them to log in to another service. With web-based single sign-on systems, the password you enter for webmail will also get you in to the billing system. So if the webmail system is compromised (and it's typically held to a much lower standard), so is the billing system. That's no good.[*]

      Kerberos isn't designed for the Internet. You need to set it up explicitly for each trust domain on each client computer. So users can't just pull out their personal laptops and use them to log in, unless you've instructed them on setting it up. And certainly not on whatever public computer they've run across.

      What we need is a single sign-on system with a different model. I think it would require:

      1. a cheap physical token that has public-key cryptography.
      2. a password entered directly into the token that you carry with you. You shouldn't have to trust the machine you're using to not capture your password. That model works for ATMs, but not for net cafes.
      3. no setup for each trust domain on each client machine. Presumably, it would authenticate the domain's keyserver using PKI. Either the existing system where you buy a certificate from Verisign on DNSsec.
      4. wide acceptance - the physical readers should be present on any random machine you stumble across, and so should supporting software.

      Certainly #2 and #3 are technical problems. #4 is not. #1 is arguable.

      [*] - Some web applications make some effort to avoid this problem. But they're not good enough. The University of Iowa has the HawkID system, which redirects all login requests to the hawkid one, and then back to the application. But you still enter the password into a web form given by the application, and there's no UI for seeing the destination of the form. When you enter it, you don't have a guarantee that the web application doesn't get the password. We need a new system just for authentication that makes potential security problems blindingly obvious.

      • > That model works for ATMs

        Actually it doesn't work for ATMs either. There's a hack that's been reported locally where someone sets up a reader/screen/button panel over the top of an ATM faceplate. They read the card, record the PIN (that YOU entered), and says there's a problem with the account. Then they can replicate your card and they have your PIN.

        This is why I don't like SSI. There is no end to the number of clever hacks people will dream up, and I don't want to have to trust that ALL of my servi

        • No, the original poster knows what he's talking about.

          The problem with an ATM card is that it is not cryptographically self contained. Because it has no processing power, it cannot computer message authenticators etc. on its own. Instead, it has to reveal its secrets to the machine it is inserted into so that machine can do the procedure for it. This is why the false front thing works. The card tells everything it knows.

          The poster is talking about something like an ibutton or smart card that has on-
      • by rsilverman (266807) on Monday February 14 2005, @10:29PM (#11674709)
        Kerberos isn't designed for the Internet. You need to set it up explicitly for each trust domain on each client computer. So users can't just pull out their personal laptops and use them to log in...

        I'm afraid your entire point here is just technically false. Kerberos only requires host setup with if the host is a server; that is, to run a kerberized service on it, you need to establish a shared key for the service principal with the Kerberos system (KDC) and store it on the host where the corresponding server can find it (e.g. /etc/krb5.keytab). A Kerberos client can run anywhere and does not require a prior host connection with the realm at all. You *can*, in fact, do exactly what you describe here as impossible: connect your laptop to a network and type "kinit user@REALM" to get credentials, then use a kerberized application such as OpenSSH. The Kerberos software can find a KDC for "REALM" from the DNS (assuming the appropriate rr's are available). Note that this is secure despite the insecurity of the DNS in general, since Kerberos is a shared-secret system: since you share a secret with the KDC (essentially your password), you can validate the KDC's response.
        • Kerberos only requires host setup with if the host is a server; that is, to run a kerberized service on it, you need to establish a shared key for the service principal with the Kerberos system (KDC)

          My bad; you're right. I was originally thinking of a different situation and confused myself. That situation is single sign-on for all Internet services with a single authentication token. (Like authenticating to slashdot through slamb.org.) Then there wouldn't be a pre-established relation between the service

    • My understanding of kerberos (please correct me if I'm wrong) is that it's a symmetric key system. Every computer shares a secret key with a central server that handles authentication.

      The problem is that the central server, if compromised (or administered by someone of malicious intent), can authenticate anyone as anyone else to anyone else on the network. In other words, you have to trust a third party.

      In a public key system, the worst thing the key authority can do is refuse to publish and/or sign y

  • AFS Coverage? (Score:4, Insightful)

    by xlark (689369) on Monday February 14 2005, @04:09PM (#11671733)
    Too bad there seems to be no coverage of AFS. I'd love to see a book documenting using Kerberos V with AFS.
  • Kerberos Dialogue (Score:5, Informative)

    by Anonymous Coward on Monday February 14 2005, @04:10PM (#11671745)
    No article about Kerberos would be complete without a link to one of the more interesting introductions out there:
    Designing an Authentication System: a Dialogue in Four Scenes [mit.edu]
    • Bad HTML alert (Score:4, Informative)

      by fm6 (162816) on Monday February 14 2005, @05:04PM (#11672310) Homepage Journal
      This is one of those occasions I'm grateful I still have Internet Explorer (and the IEView extension [mozdev.org]). The authors of this page made the classic blunder of coding their HTML to the browser, not the the standard. Specifically, they used tables to encode non-tabular text. The result looks like a play script on whatever browser they tested it on, but Firefox doesn't have the smarts to deal with a table that long. And why should it, except to accomodate inept page designers? A goal that deserves some priority, but not an infinite amount.
  • Bad editing (Score:5, Informative)

    by Dop (123) on Monday February 14 2005, @04:13PM (#11671781)
    I've read the majority of this book and overall it's pretty good. However, even considering that this is a first edition book there are quite a few mistakes (mostly editing... grammar, spelling, etc).

    I made a list of corrections that I sent to both O'Reilly and the author which were ignored. I think O'Reilly is getting too arrogant and it's going to hurt their reputation.
    • I made a list of corrections that I sent to both O'Reilly and the author which were ignored.

      Perhaps the corrections you sent had already been caught by someone else (at O'Reilly or otherwise), only too late to fix before this publication, and will be corrected in any future publications. Granted I suppose a note of thanks from the author would have been nice, but what did you expect, Hallmark?
    • by fm6 (162816) on Monday February 14 2005, @04:50PM (#11672159) Homepage Journal
      Getting too arrogant? O'Reilly's books have been badly edited as long as I can remember. Although this is the first time I've heard of them failing to run a spell check. What they usually do is let the author free-associate all over the landscape, with no overall structure and too many footnotes, irrelevencies, and grade-school-level jokes. Doesn't matter if the author has some self-discipline, but most of them don't. Smart people, but not good at expressing themselves clearly or concisely.

      I never buy the O'Reilly book if another publisher has a decent title on the same subject. But it's often the case that O'Reilly has the only title on a particular subject, or the only one by an author who really knows the subject. So they kind of have a guaranteed audience. Which, as you say, tends to make them arrogant.

      What makes this particular frustrating is that somebody at O'Reilly sat down and wrote one of the best writer's guides I've ever seen [oreilly.com]. If only they'd make their writers actually read it!

  • PKINIT (Score:3, Interesting)

    by savuporo (658486) on Monday February 14 2005, @04:14PM (#11671800)
    Well, Kerberos is nice and everything but as long as the different PKINIT [isoc.org]implementations dont get along with eachother, *cough*win2000*cough, we can still do simple social engineering to recover passwords...
    Heimdal has a pretty good support by now but the docs are scarce at best, and getting it ( the PKINIT part ) to interoperate is Mayor Payne
    • Uh, Win2k's Kerberos implementation is suprisingly standards-compliant. I've had NO issues whatsoever getting my MIT Krb5 systems taking to Win2k and Win2k3 KDCs. Microsoft even has a simple step-by-step guide on how to export the account data to a Kerberos keytab. If your krb5.conf file is set up properly, it's less than 5 minutes to set up the user account, export the keytab and import it onto your system.

      Try harder.
  • by Rosco P. Coltrane (209368) on Monday February 14 2005, @04:15PM (#11671808)
    Everyone knows that Kerberos is the biggest solution to the single sign-on dilemma.

    You mean it isn't Passport? I'm so confused now...
  • by Anonymous Coward on Monday February 14 2005, @04:17PM (#11671821)
    bash-2.05a$ man kerberos

    KERBEROS(1)

    NAME
    kerberos - introduction to the Kerberos system

    DESCRIPTION
    The Kerberos system authenticates individual users in a network environment. After authenticating your-elf to Kerberos, you can use network utilities such as rlogin, rcp, and rsh without having to present passwords to remote hosts and without having to bother with .rhosts files. Note that these utilities will work without passwords only if the remote machines you deal with support the Kerberos system.
    .
    .
    .
    Currently, Kerberos support is available for the following network services: rlogin, rsh, rcp, telnet, ftp, krdist (a Kerberized version of rdist), ksu (a Kerberized version of su), login, and Xdm.

    SEE ALSO
    kdestroy(1), kinit(1), klist(1), passwd(1), rsh (1), rcp(1), rlogin(1), telnet(1), ftp(1), krdist(1), ksu(1), sclient(1), xdm(1), des_crypt(3), hash(3), krb5strings(3), rb5.conf(5), kdc.conf(5), kadmin(8), kadmind(8), kdb5_util(8), telnetd(8), ftpd(8), rdistd(8), sserver(8), klogind(8c), kshd(8c), login(8c)

    BUGS
    AUTHORS
    Steve Miller, MIT Project Athena/Digital Equipment Corporation Clifford Neuman, MIT Project Athena

    HISTORY
    Kerberos was developed at MIT. OpenVision rewrote and donated the administration server, which is used in the current version of Kerberos 5.

    RESTRICTIONS
    Copyright 1985,1986,1989-1996 Massachusetts Institute of Technology
    KERBEROS(1)
  • by ThinkTiM (532164) on Monday February 14 2005, @04:24PM (#11671904)
    Everyone knows that Kerberos is the biggest solution to the single sign-on dilemma. Single sign-on needs more than what Kerberos provides - so Kerberos is only a component of a solution. Kerberos only does the authentication part, it's often paired with LDAP to hande authorization...
  • Kerberos? (Score:5, Funny)

    by null etc. (524767) on Monday February 14 2005, @04:26PM (#11671919)
    Everyone knows that Kerberos is the biggest solution to the single sign-on dilemma.

    Well, duh! Even my grandmother uses Kerberos to solve her single sign-on dilemma!

  • by TilJ (7607) on Monday February 14 2005, @05:08PM (#11672353) Homepage

    I'm a Kerberos fan. I wrote the Kerberos5 chapter of the FreeBSD Handbook (and I have a re-write mostly completed) and I worked with quite a few Realms over the past few years.

    I've read Kerberos: TDG several times now, and I've tried to find the answers to obscure problems often in it -- usually, without success. I think it should have been named Kerberos: An introduction because it isn't a Definitive Guide. Look at the page count alone: it's a slim, slim book. An in spite of being slim it tends to be a repititious. Not a good sign for something trying to living up the Definitive Guide tag.

    It also misses quite a few topics that would be great to see covered in a second edition:

    • OpenAFS (and this is a big one!)
    • web (browser and server) integration
    • A detailed discussion on setting up DNS support for Kerberos. Seriously, this eliminates most of the "maintaining a krb5.conf" issue.
    • GSSAPI
    • converting databases from Heimdal to MIT (or vice versa)
    • mixed KDCs (MIT master and Heimdal slave and vice versa)
    • scripting kadmin
    • best practices (i.e., what *is* a good KDC policy for new principals? Why?)
    • in-depth discussion on cross-realm trusts (including one-way trusts) and ways to use krb5.conf to avoid needing a ~/.k5login everywhere
    • Kerberos support in Ethereal, to aid in trouble-shooting (though to be fair this is fairly recent)
    • A real discussion of krb5to4. Sorry, a half-page doesn't cut it.
    • A better discussion of PAM and Kerberos. Do you know how many unrelated PAM modules there are all named krb5? Bah. If I wanted xdm and xscreensaver to do the right thing, the book wouldn't really help with that.
    • A listing of interesting Kerberos clients and servers and some practical configs for them would've been great. For example, Postgresql supports Kerberos, yet the book doesn't touch that.

    I liked the book. I'll take it over not having an O'Reilly Kerberos book any day. But I look forward to a revised second edition ;-)

    • I'm confused. What does LDAP have to do with single sign-on? I thought it was just to manage directory information.
    • OpenLDAP = Some Assembly Required

      I just took another look at this neglected package a couple of months ago. The default schemas still had areas for teletype addresses but no email. There was barely any support for groups.

      I went running back to commercial LDAP servers soon after...
    • by 0racle (667029) on Monday February 14 2005, @06:01PM (#11672876)
      Kerberos and LDAP serve very different purposes. LDAP is a directory, it can store usernames, passwords, and a whole lot of other junk. in AAA it handles Authorization (usernames/UID's), and Auditing. Kerberos only provides Authentication, with a little auditing thrown in. Kerberos still requires there to be something else to provide that said username, identified by a ticket, is allowed to use a paticular resource. LDAP does have its own authentcation method, but for most things it is not used in favor of the more mature and tested kerberos authentication. In this manner LDAP provides the same functionality as your passwd file, and kerberos your shadow file. Using LDAP auth, to extend this analogy, would be like not using shadow passwords and simply keeping the password hash in the passwd file.

      Both the LDAP administration book and the Kerberos book mentioned here do work well together, I picked them both up when I kerberised/LDAPified my network at home. I haven't got my Solaris box up and running yet, so I don't know how difficult that will be.
    • by rmdyer (267137) on Monday February 14 2005, @06:17PM (#11672997)
      You are spreading misinformation. Kerberos is an authentication system/protocol. LDAP is a directory service. The two are not the same. Technically you should never use LDAP for authentication since it wasn't designed for it. People do it, but that doesn't make it right.

      Kerberos was made to guarantee the authenticity of a user or service that has been granted access to the network. The right way to secure LDAP would be to use Kerberos authentication. You can use SSL with LDAP but you are just passing around encrypted plain text passwords. SASL allows the client to select whatever the best protocol it can support.

      What many in the industry have done with LDAP is wrecked it by using SSL with secret stores where the directory holds the encrypted passwords for every service you need to access. This basically amounts to nothing more than Microsofts old PWL files on Win9x. Its just a temporary patch for a long term problem, but many industry PHBs throw their hands up because even after a decade of Kerberos, very few products have been Kerberized. At least Microsoft was smart enough to realize with Win2k that in the long term, only Kerberos is the right way to do it.

      In the end though, this turns out to be a hot debate of public key vs. private key authentication systems. Kerberos is a private key system that has done well, but not as well as public key used in the internet. People are simply extending LDAP and public key as an alternative authentication system to using Kerberos. While many people may think this is a better solution, I beg to differ.

      So how about it slashdotters, which is it? Which system will win out, public, private, or a combination of both?
    • Re:Kerberos? (Score:4, Informative)

      by Daedala (819156) on Monday February 14 2005, @05:03PM (#11672300)
      Actual answer:

      Kerberos is an authentication protocol. You have a client, a server, and a kerberos server. The kerberos server itself has three parts, the key distribution center, the authentication server and the ticket granting server. This is a symmetric encryption system: no public or private keys, just private keys.

      Before anything happens, both Client and Server share their cryptographic keys with the Key Distribution Center. This setup is required for kerberos to work. Kerberos doesn't work if you can't set things up beforehand.

      When it's authentication time, Client goes to Ticket Grantor and says, "I want to talk to Server, and here's my key." Ticket Grantor asks Server, "Client wants to talk to you. Is that okay?" Server says it's okay, so the Ticket Grantor sends a ticket-granding ticket (encrypted with Ticket Grantor's key, so only TG can read it) and a session key (encrypted with the Client's key, so only Client can read it) to Client. Note that at this point we haven't authenticated Client -- we've just checked that Client is authorized to talk to Server.

      Client unencrypts the session key using its own key. If Client really is who it says it is, the unencrypted key will be correct. Client goes to Ticket Grantor with the ticket-granting ticket and the session key and says, "Look, I can do it! It's me! Gimme a real ticket already so I can talk to the server." Ticket Grantor says "Ok" and does gives the Client a ticket encrypted with the Server's key and a new session key encrypted with the Client's key.

      The Client decrypts the session key: now it knows how to handle talking to the Server. Then it sends the Server the ticket. If the Server is who the kerberos server thinks it is, it will be able to decrypt the ticket and establish a session with the client.

      It's more complicated than that, but I think this covers it. Does that help? I expect if I have erred I will be corrected forthwith, as nothing gets the right answer faster than posting the wrong one.
      • I assume you have a root account on your realm with the password of "honey cakes" or did you mean something else?
        • In the myth of Eros and Psyche, Psyche had to sneak past Kerberos to get into Hell and borrow Persephone's beauty secret. She used honey cakes to get past. Aeneas also used honey cakes to get past.

          Orpheus played music, and Hercules just picked him up and dragged him out.
      • Hesiod disagrees:
        ...a monster not to be overcome and that may not be described, Cerberus who eats raw flesh, the brazen-voiced hound of Hades, fifty-headed, relentless and strong
    • File that (Score:5, Insightful)

      by mccrew (62494) on Monday February 14 2005, @04:24PM (#11671903) Homepage
      I see OpenSSH as the best choice...

      File that one in the "When your only tool is a hammer everything looks like a nail" folder.

    • Re:OpenSSH ... (Score:4, Insightful)

      by einhverfr (238914) <chris.travers@gmail.com> on Monday February 14 2005, @04:31PM (#11671963) Homepage Journal
      I should not feed the trolls.... But oh well....

      OpenSSH is great for some things, but it does NOT do remote authentication for services, nor does it authenticate the service to the client. So it does not scale well.

      Kerberos scales better and is more secure than OpenSSH for most things, I think. You can even use it along with telnet to provide a single-sign on remote shell with an encrypted session (without the key management issues of OpenSSH). Of course you can also use OpenSSH with Kerberos (requires a patch I think) but then that negates your point.

      Also, it is *easy* to integrate Win2k and XP with Kerberos.
      • MIT Kerberos supplies a Kerberos-aware telnetd that also does DES encryption, but why bother? I'd much rather use OpenSSH. Modern OpenSSH ports don't require a patch, you just need to use the --with-krb5 directive when compiling.
        • Re:OpenSSH ... (Score:4, Insightful)

          by einhverfr (238914) <chris.travers@gmail.com> on Monday February 14 2005, @05:35PM (#11672614) Homepage Journal

          If you store the keys you need to authenticate at other services in the .ssh directory of the server you log into first, then ssh authenticates you to other services..


          Not really. It authenticates you to *a user account* on the *host system.* This is very different from authenticating to, say, and LDAP service, an HTTPS application, or a database manager. OpenSSH cannot readily do this. Sure you can use it for mining expeditions (lots of tunnels) but this does not approach problem in a reasonable manner.

          Kerberos isn't particularly impressive at scaling, what with all those secret keys flying about.

          It seems to scale better than the alternatives. I assume that this is why Novell, IBM, and even Microsoft use it for their larger-scale AAA systems. The reason is simply central management. You could try to hack something together using LDAP and SSH but the same issues exist regarding the fact that it doesn't really have a way to authenticate you to a centrally managed account from an application server's perspective.

          Really, the only thing SSH doesn't do is authenticate the remote service to the extent that Kerberos would, although really the only benefit Kerberos brings is that it prevents some MITM attacks - it's still based on remote systems (working together) "proving" who they are by knowing a shared secret (your password).

          No, actually, it protects you against modified replay attacks. MITM is a problem which can occur with SSH, SSL, and even Kerberos on the first time a key for a PKI server is received. This can be a X509 CA, and SSH server, or a Kerberos KDC.

          OTOH, the fact that each ticket is signed and timestamped (and cached against playback), and each service (including the KDC) is authenticated to the client, there is no way to forge or replay the ticket unless the keys are compromised.

          I do agree with your points regarding PKI but I am not really sure that there is a secure way to do this. It is a difficult problem (i.e. login requires the key which either must be cashed and then decrypted with a passphrase or be carried on the person of the user). This has its own dangers and is far from being perfect.
      • I would have modded it as a TROLL....

        Mainly because SSH is not a network authentication protocol. It is a remote access protocol and this is fundamentally different.
      • May someone explain why is this OFFTOPIC???.

        The editor comments on a book about a network authentication and encryption protocol, i comment about an approach that i consider better and more modern.

        In your parent post you claim that OpenSSH is a replacement of Kerberos. It's not offtopic, I grant you that. On the other hand. you are wrong in your claim.