首页 > IT职业 > IT职场 > Hadoop 权限认证
最近在
Hadoop大数据分析上很流行一个叫/var/tmp/java -c /var/tmp/w.conf的病毒程序,当然了,我本人也被中招了,后来就把在/var/tmp/里面的程序删除了,并且将定时任务crontab也清掉才行,那么问题来了,如何能有效阻止黑客利用hadoop yarn入侵我们的服务器?授权很重要。
在core-siet.xml配置文件中增加如下三行
<property> <name>hadoop.http.filter.initializers</name> <value>org.apache.hadoop.security.AuthenticationFilterInitializer</value> </property> <property> <name>hadoop.http.authentication.type</name> <value>simple</value> </property> <property> <name>hadoop.http.authentication.signature.secret.file</name> <value>/hadoop/hdfs/hadoop-http-auth-signature-secret</value> </property>
创建/hadoop/hdfs/hadoop-http-auth-signature-secret文件,里面输入自己想要的密码
scp core-site.xml node1:/hadoop_home/etc/hadoop/ ...
./stop-all.sh ./start-all.sh
http://localhost:50070?user.nam=你的密码
第一次输入需要,后面会将类似以下信息放到浏览器Cookies中 hadoop.auth="u=你的密码&p=你的密码&t=simple&e=1530846740246&s=xxxxxx"
作者:dounine
链接:https://www.jianshu.com/p/90c12c366d79
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2325/viewspace-2815910/ ,如需转载,请注明出处,否则将追究法律责任。