1. 问题
在使用大数据组件时, 会遇到一些奇怪的问题
1.1 HDFS: Failed to find any Kerberos tgt
1.2 Kafka: Could not login…asked for a password
1.3 Yarn: cannot perform operation MODIFY_APP on application…
1.4 Hive: No valid credentials provided…
2. Kerberos介绍
它的形象是地狱三头犬, 在希腊神话中是看守冥界入口的恶犬, 寓意着看门人的作用
Kerberos is a protocol for authenticating service requests between trusted hosts across an untrusted network, such as the internet.
三颗头分别对应三种角色
- Client 客户端
- Server 服务端
- KDC 密钥分发中心
3. 工作原理
- Step1: 客户端向KDC的AS申请TGT(船票)
- Step2: 客户端拿着TGT向KDC的TGS申请特定服务的凭证
- Step3: 客户端拿着凭证访问服务端
KDC = Key Distribution Center
AS = Authentication Service
TGS = Ticket Granting Service