默认情况下,Hadoop HTTP Web控制台(ResourceManager,NameNode,NodeManagers和DataNodes)允许访问而无需任何形式的身份验证。
官网连接:https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/HttpAuthentication.html
1、配置core-site.xml
<configuration>
<!-- Authentication for Hadoop HTTP web-consoles -->
<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.token.validity</name>
<value>3600</value>
</property>
&l