LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kerberos: Clarification of principals (https://www.linuxquestions.org/questions/linux-software-2/kerberos-clarification-of-principals-921868/)

Dark_Helmet 01-03-2012 05:58 PM

Kerberos: Clarification of principals
 
I've learning how to use Kerberos. I've installed a KDC and it works. I can add user principals and authenticate as any user principal I've added. So my question is NOT about installing/configuring Kerberos for either the server or the client.

My question is a clarification of the different roles of the principals... specifically what a host principal's purpose is.

Before I get a response explaining that a "host" principal is a principal for each host in a realm, a "service" principal is for each service (e.g. ssh, nfs, ldap, etc.), a "user" principal for each user... let me just say (obviously) I know that.

What I don't know is how host principals fit into the overall scheme.

My, very brief, understanding of the Kerberos process is:
1. There is an authentication back-and-forth to start (preauthentication and retrieval of a TGT). My understanding is that preauthentication and issuance of the TGT encrypt the communication based on the user's password.

2. When the user wants to access a service, such as ldap, the user resubmits the TGT to the KDC. As part of the KDC's response, the user gets a ticket for the service. The ticket is encrypted with the service principal key (e.g. keytable entries for ldap/my.host.name@KERB.REALM). In addition, there is a session key included with the ticket that the user and service will use to encrypt their communications with one another.

3. The user submits the service request, encrypted with the session key, along with the service ticket obtained from the KDC to the service provider.

4. If everything decrypts properly and makes sense, the user's request is processed and the response sent back to the user, encrypted by the session key.

At no point in that exchange is any host principal being used--unless my understanding is faulty.

So, what are host principals for? Are they a fallback (e.g. if an ssh server cannot find an ssh-specific principal that it will default to the host principal)? Are they a generic principal (e.g. a non-user principal that would allow a host to perform certain automated tasks--such as queries to an LDAP server for some routine maintenance)?

manyrootsofallevil 01-17-2012 02:26 AM

Quote:

Originally Posted by Dark_Helmet (Post 4565176)
I've learning how to use Kerberos. I've installed a KDC and it works. I can add user principals and authenticate as any user principal I've added. So my question is NOT about installing/configuring Kerberos for either the server or the client.

My question is a clarification of the different roles of the principals... specifically what a host principal's purpose is.

Before I get a response explaining that a "host" principal is a principal for each host in a realm, a "service" principal is for each service (e.g. ssh, nfs, ldap, etc.), a "user" principal for each user... let me just say (obviously) I know that.

What I don't know is how host principals fit into the overall scheme.

My, very brief, understanding of the Kerberos process is:
1. There is an authentication back-and-forth to start (preauthentication and retrieval of a TGT). My understanding is that preauthentication and issuance of the TGT encrypt the communication based on the user's password.

2. When the user wants to access a service, such as ldap, the user resubmits the TGT to the KDC. As part of the KDC's response, the user gets a ticket for the service. The ticket is encrypted with the service principal key (e.g. keytable entries for ldap/my.host.name@KERB.REALM). In addition, there is a session key included with the ticket that the user and service will use to encrypt their communications with one another.

3. The user submits the service request, encrypted with the session key, along with the service ticket obtained from the KDC to the service provider.

4. If everything decrypts properly and makes sense, the user's request is processed and the response sent back to the user, encrypted by the session key.

At no point in that exchange is any host principal being used--unless my understanding is faulty.

So, what are host principals for? Are they a fallback (e.g. if an ssh server cannot find an ssh-specific principal that it will default to the host principal)? Are they a generic principal (e.g. a non-user principal that would allow a host to perform certain automated tasks--such as queries to an LDAP server for some routine maintenance)?

In Windows land, when using the Network Service account the host principal is used.

I'm not entirely sure if the host principal is used, in the same way, in *nix land.

The obvious use of the host principal is to establish that the host is a trusted host, I think.


All times are GMT -5. The time now is 07:14 PM.