hadoop kerberos官方配置详解(8)

这个可执行文件必须有特殊的权限:6050或者–Sr-s—权限被root用户所拥有(super-user)和被特殊组(比如:hadoop)所拥有,这个组中NodeManager Unix用户是他的成员并且没有其他普通应用用户。如果有其他应用的用户属于这个特殊的组,那么安全性就不能得到保证了。这个特殊的组的名字应该被指定在yarn.nodemanager.linux-container-executor.group配置属性中,conf/yarn-site.xml和conf/container-executor.cfg有需要。

比如,假设NodeManager使用yarn用户(是users和hadoop组的一部分,他们中的任何一个都是主要的组)运行。让users组中处理yarn还有另外一个用户alice(应用提交者),并且alice不在hadoop组中。根据以上的描述,setuid/setgid可执行文件一个被设置成6050或者–Sr-s—,user-owner是yarn,group-owner是hadoop,yarn是hadoop的成员(而不是users组,它出了yarn用户外还有一个alice的用户)。

LinuxTaskController要求被指定在yarn.nodemanager.local-dirs和yarn.nodemanager.log-dirs的包含路径和引导到的目录,它就像上面的表格中描述的一样被设置成775权限在权限路径上。

conf/container-executor.cfg

这个可执行文件需要一个叫做container-executor.cfg的配置文件,在配置路径中出现,通过之前提到的MVN target。

这个配置文件必须被运行NodeManager的用户所拥有(比如上面例子中的yarn用户),被任何拥有0400或r——–权限的组所拥有。

这个可执行文件需要以下在conf/container-executor.cfg文件中出现的配置项。这些项目应该被要求成简单的key=value(键值对),每一项一行。

ParameterValueNotes
yarn.nodemanager.linux-container-executor.group   hadoop   Unix group of the NodeManager. The group owner of the container-executor binary should be this group. Should be same as the value with which the NodeManager is configured. This configuration is required for validating the secure access of the container-executor binary.  
banned.users   hdfs,yarn,mapred,bin   Banned users.  
allowed.system.users   foo,bar   Allowed system users.  
min.user.id   1000   Prevent other super-users.  

复习一下,这里是本地文件系统各种与LinuxContainerExecutor相关的路径的权限要求:

FilesystemPathUser:GroupPermissions
local   container-executor   root:hadoop   –Sr-s–*  
local   conf/container-executor.cfg   root:hadoop   r——-*  
local   yarn.nodemanager.local-dirs   yarn:hadoop   drwxr-xr-x  
local   yarn.nodemanager.log-dirs   yarn:hadoop   drwxr-xr-x  
MapReduce JobHistory Server ParameterValueNotes
mapreduce.jobhistory.address   MapReduce   JobHistory Server host:port Default port is 10020.  
mapreduce.jobhistory.keytab   /etc/security/keytab/jhs.service.keytab   Kerberos keytab file for the MapReduce JobHistory Server.  
mapreduce.jobhistory.principal   jhs/_HOST@REALM.TLD   Kerberos principal name for the MapReduce JobHistory Server.  
多宿主

多宿主(每个主机可能在DNS上有多个主机名,比如:不同的主机名对应公共和私有的网络接口)的设置,可需要额外的配置来使kerberos工作。查看HDFS Support for Multihomed Networks

参考

O’Malley O et al. Hadoop Security Design

O’Malley O, Hadoop Security Architecture

Troubleshooting Kerberos on Java 7

Troubleshooting Kerberos on Java 8

Java 7 Kerberos Requirements

Java 8 Kerberos Requirements

Loughran S., Hadoop and Kerberos: The Madness beyond the Gate

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d9d246ed39d4b7719eccfada3af60d5c.html