hadoop - Hadoop 集群交互式用户的永久 Kerberos 票证

标签 hadoop ssh active-directory ubuntu-16.04 kerberos

我有一个 Hadoop 集群,它使用公司的 Active Directory 作为 Kerberos 领域。节点和最终用户 Linux 工作站都是 Ubuntu 16.04。它们使用 PowerBroker PBIS 加入同一个域,因此工作站和网格节点之间的 SSH 登录是单点登录。最终用户从他们的工作站运行长时间运行的脚本,这些脚本重复使用 SSH 首先在集群上启动 Spark/Yarn 作业,然后跟踪他们的进度,这些脚本必须在晚上和周末保持运行,远远超过 10 小时Kerberos 票证的生命周期。

我正在寻找一种方法来为用户安装永久的、服务式的 Kerberos key 表,从而使他们无需处理 kinit。我知道这意味着任何人都可以作为特定用户通过 shell 访问网格,从而能够以该用户的身份进行身份验证。

我还注意到,使用密码执行非 SSO SSH 登录会自动创建从登录时起有效的网络票证。如果可以为 SSO 登录启用此行为,那将解决我的问题。

最佳答案

您只需要求用户将 --principal--keytab 参数添加到他们的 Spark 作业中。然后 Spark(实际上是 YARN)代码会自动为你更新票证。我们有使用这种方法运行数周的作业。

参见示例 https://spark.apache.org/docs/latest/security.html#yarn-mode

For long-running apps like Spark Streaming apps to be able to write to HDFS, it is possible to pass a principal and keytab to spark-submit via the --principal and --keytab parameters respectively. The keytab passed in will be copied over to the machine running the Application Master via the Hadoop Distributed Cache (securely - if YARN is configured with SSL and HDFS encryption is enabled). The Kerberos login will be periodically renewed using this principal and keytab and the delegation tokens required for HDFS will be generated periodically so the application can continue writing to HDFS.

当 Yarn 更新 Kerberos 票证时,您可以在 Spark 驱动程序日志中看到。

关于hadoop - Hadoop 集群交互式用户的永久 Kerberos 票证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50924033/

相关文章:

apache-spark - spark over kubernetes vs yarn/hadoop 生态系统

github - 是否可以重命名 GitHub SSH key ?

authentication - 无需代理转发的 SSH 跳转主机

c# - 如何确定计算机是否连接到 novell eDirectory 或 Microsoft ActiveDirectory?

apache-spark - 无法使用SparkSQL在Hive中写入数据

java - 增加 Hadoop 2 中 Hive 映射器的数量

java - 如何从 Windows 上的 Java 程序与 Unix 终端进行通信

windows - Active Directory 中是否存在任何主键(或)唯一键?

powershell - 如何使用 powershell 对 Active Directory 中的用户进行身份验证

hadoop - 增加Hadoop工作节点上的磁盘空间