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


如果您觉得本文章对您有用,也为了更好的运营博客,您可以点击这里捐助

评论 抢沙发

昵称 (必填) 邮箱 (必填)
表情