两个Hadoop集群开启Kerberos验证后,集群间不能够相互访问,需要实现Kerberos之间的互信,使用Hadoop集群A的客户端访问Hadoop集群B的服务(实质上是使用Kerberos Realm A上的Ticket实现访问Realm B的服务)。
先决条件:
1)两个集群(IDC.COM和HADOOP.COM)均开启Kerberos认证
2)Kerberos的REALM分别设置为IDC.COM和HADOOP.COM
步骤如下:
实现和之间的跨域互信,例如使用的客户端访问中的服务,两个REALM需要共同拥有名为krbtgt/的principal,两个Keys需要保证密码,version number和加密方式一致。默认情况下互信是单向的, 的客户端访问的服务,两个REALM需要有krbtgt/的principal。
向两个集群中添加krbtgt principal
#IDC CLUSTER
kadmin.local: addprinc –e “aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal ” krbtgt/HADOOP.COM@IDC.COM
kadmin.local: addprinc –e “aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal ” krbtgt/IDC.COM@HADOOP.COM
#HADOOP CLUSTER
kadmin.local: addprinc –e “aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal ” krbtgt/HADOOP.COM@IDC.COM
kadmin.local: addprinc –e “aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal ” krbtgt/IDC.COM@HADOOP.COM
要验证
因篇幅问题不能全部显示,请点此查看更多更全内容