【问题标题】:Why does a client machine need a kerberos service principal为什么客户端机器需要 kerberos 服务主体
【发布时间】:2019-04-21 00:18:15
【问题描述】:

我试图了解 Kerberos,但对服务主体感到困惑。 假设我想访问由 Kerberos 保护的 NFS 共享。

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

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

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

但是为什么互联网上的所有示例都告诉客户端机器还需要一个应该包含 nfs/DOMAINNAMEFROMNFSSERVER 主体的密钥表?

我了解服务主体只需要存在于 KDC 数据库中并直接存在于 NFS 服务器上(使用密钥表)。有人可以澄清为什么密钥表也需要出现在客户端上吗?

提前感谢您的帮助!

【问题讨论】:

  • 你错了。 Keytabs 不会只在服务器上的客户端上运行,除非服务器充当另一台服务器的客户端,例如在服务到服务架构中。
  • @T-Heron 将其放入答案中。没错。

标签: kerberos mit-kerberos


【解决方案1】:

参考: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>

【讨论】:

    猜你喜欢
    • 2012-09-25
    • 2013-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多