代码之家  ›  专栏  ›  技术社区  ›  phg

自动更新TGT

  •  1
  • phg  · 技术社区  · 7 年前

    我正在自动化一个需要访问kerberized资源的服务。 无密码 kinit 使用按键可以很好地工作。然后连接资源 使用SASL。

    有没有办法(可能通过GSSAPI或libkrb5)确保TGT存在 无论何时访问资源?分叉 基尼特 每次访问之前 似乎是一件务实的事情。然而,两者之间存在着明显的竞争 TGT获取时间及其用于获取我想要避免的TGS。

    我想象一下,接收fd进行身份验证,其有效性是 直到用户关闭为止。

    我更喜欢远离重型解决方案,如 自动续订 TGT。

    1 回复  |  直到 7 年前
        1
  •  2
  •   phg    7 年前

    答案是提供 客户 KRB5_CLIENT_KTNAME 参数:

    If no existing tickets are available for the desired name, but the name
    has an entry in the default client keytab, the krb5 mechanism will
    acquire initial tickets for the name using the default client keytab.
    

    MIT Kerberos docs .

    wiki还有一个 write-up of the implementation .