hadoop web ui 简单权限验证

hadoop web ui 简单权限验证

1,在中加入如下代码

        <!-- 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>
        <property>
                <name>hadoop.http.authentication.signature.secret.file</name>
                <value>/www/hadoop-2.9.2/secret/hadoop-http-auth-signature-secret</value>
        </property>
        <property>
                <name>hadoop.http.authentication.cookie.domain</name>
                <value></value>
        </property>
        <property>
                <name>hadoop.http.authentication.simple.anonymous.allowed</name>
                <value>false</value>
        </property>

/www/hadoop-2.9.2/secret/hadoop-http-auth-signature-secret 这个为密码所在的位置

2,向hadoop-http-auth-signature-secret 写入字符串test

前台用户可以使用地址进行访问

http://localhost:50070/?user.name=test


爆款云服务器s6 2核4G 低至0.46/天,具体规则查看活动详情Blog Img