阅读 118

hadoop web console配置基于用户名访问

1、配置core-site.xml文件

添加如下配置


    hadoop.http.filter.initializers
    org.apache.hadoop.security.AuthenticationFilterInitializer
  
 
    hadoop.http.authentication.type
    simple
  
 
    hadoop.http.authentication.signature.secret.file
    /data1/hadoop/hadoop/etc/hadoop/hadoop-http-auth-signature-secret
  
 
    hadoop.http.authentication.simple.anonymous.allowed
    false
  
 
    hadoop.http.authentication.token.max-inactive-interval
    60
  

参数说明:

参数 说明 默认值
hadoop.http.filter.initializers 认证的类 org.apache.hadoop.security.AuthenticationFilterInitializer
hadoop.http.authentication.type 认证类型,有Kerberos和simple simple
hadoop.http.authentication.signature.secret.file 授权用户文件,只有存在于这里面的用户才能访问集群 $user.home/hadoop-http-auth-signature-secret
hadoop.http.authentication.simple.anonymous.allowed 是否允许匿名用户访问 true
hadoop.http.authentication.token.max-inactive-interval 多少秒没有操作,token将过期 -1

2、重启集群

3、认证

把要通过访问的用户添加到/data1/hadoop/hadoop/etc/hadoop/hadoop-http-auth-signature-secret文件里面
浏览器输入:

这里本来想使用Kerberos作为web认证,但是死活认证失败,web界面不能正常访问,这里就换成了simple认证,后续在研究一下kerberos认证。不确定是否浏览器的这台主机需要有认证主体,才能进行web访问。
这哥们貌似实在window进行了Kerberos认证,可以进行访问web

借鉴:




原文:https://www.cnblogs.com/yjt1993/p/14780371.html

文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐