为什么客户端计算机需要kerberos服务主体

时间:2018-11-18 12:53:58

标签: kerberos mit-kerberos

我试图了解Kerberos,并与服务主体混淆。 假设我要访问受Kerberos保护的NFS共享。

我有以下三个不同的节点:

  1. 客户端计算机(用户名为 test
  2. KDC(AS / TGS)
  3. NFS服务器

现在,KDC包含主体数据库,该数据库的用户名为 test 。此外,KDC还包含一个 nfs / DOMAINNAMEFROMNFSSERVER 主体。此主体也使用密钥表与NFS服务器共享。为了建立kerberized nfs会话,用户 test 正在向KDC请求TGT。

但是为什么Internet上的所有示例都表明客户端计算机还需要一个密钥表,该密钥表应包含 nfs / DOMAINNAMEFROMNFSSERVER 主体?

我知道服务主体仅需要存在于KDC数据库中,并且可以直接存在于NFS服务器上(使用密钥表)。有人可以说明为什么客户端上也需要密钥表吗?

在此先感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

参考:man rpc.gssd,它包含详细回答问题的答案。顺便说一句,客户端上的主体可以不同于nfs / @ REALM。

手册页中的内容:


   Machine Credentials
   A  user credential is established by a user and is then shared with the kernel and rpc.gssd.  A machine credential is established by rpc.gssd for
   the kernel when there is no user.  Therefore rpc.gssd must already have the materials on hand to establish this credential without requiring user
   intervention.

   rpc.gssd searches the local system's keytab for a principal and key to use to establish the machine credential.  By default, rpc.gssd assumes the
   file /etc/krb5.keytab contains principals and keys that can be used to obtain machine credentials.

   rpc.gssd searches in the following order for a principal to use.  The first matching credential is used.  For the search, <hostname> and  <REALM>
   are replaced with the local system's hostname and Kerberos realm.

      <HOSTNAME>$@<REALM>
      root/<hostname>@<REALM>
      nfs/<hostname>@<REALM>
      host/<hostname>@<REALM>
      root/<anyname>@<REALM>
      nfs/<anyname>@<REALM>
      host/<anyname>@<REALM>
相关问题