zoukankan      html  css  js  c++  java
  • hadoop未授权访问漏洞

    Hadoop 默认开放了很多端口来提供 WebUI 服务,通过访问 NameNode WebUI 管理界面的 50070 端口,可以下载任意文件,所以需要对页面增加访问限制。

    修改core-site.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.token.validity</name>
      <value>3600</value>
    </property>
    <property>
      <name>hadoop.http.authentication.signature.secret.file</name>
      <value>/home/huser/hadoop/hadoop-http-auth-signature-secret</value>
      <!-- 可动态配置,主从同样配置,并 生成hadoop-http-auth-signature-secret 文件,放到对应位置,内部为允许访问的用户,用user.name=“”访问 -->
    </property>
    <property>
      <name>hadoop.http.authentication.cookie.domain</name>
      <value></value>
    </property>

    ok问题解决了
    <property>
      <name>hadoop.http.authentication.simple.anonymous.allowed</name>
      <value>false</value>
    </property>:

    再次访问hadoop页面时需要

  • 相关阅读:
    cocos2d-x CSV文件读取 (Excel生成csv文件)
    cocos2d-x 中 xml 文件读取
    String 类的实现
    json 文件解析与应用
    设计模式 之 《简单工厂模式》
    C++ 0X 新特性实例(比较常用的) (转)
    CCSpriteBatchNode CCSpriteFrameCache
    LongAdder
    ConcurrentHashMap源码
    HashMap源码
  • 原文地址:https://www.cnblogs.com/liuyam/p/13226754.html
Copyright © 2011-2022 走看看