Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12625

Add a config to disable the /logs endpoints

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: security
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      We should add a config to disable the /logs endpoint in HttpServer2. Listing a directory like this can be dangerous from a security perspective. We can keep it enabled by default for compatibility though.

        Issue Links

          Activity

          Hide
          rkanter Robert Kanter added a comment -

          The patch adds a "hadoop.http.logs.enabled" config that defaults to true for core-default/site; and unit tests. I've also verified it manually.

          Show
          rkanter Robert Kanter added a comment - The patch adds a "hadoop.http.logs.enabled" config that defaults to true for core-default/site; and unit tests. I've also verified it manually.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 9m 18s trunk passed
          +1 compile 10m 46s trunk passed with JDK v1.8.0_66
          +1 compile 10m 37s trunk passed with JDK v1.7.0_91
          +1 checkstyle 0m 20s trunk passed
          +1 mvnsite 1m 15s trunk passed
          +1 mvneclipse 0m 17s trunk passed
          +1 findbugs 2m 15s trunk passed
          +1 javadoc 1m 7s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 17s trunk passed with JDK v1.7.0_91
          +1 mvninstall 1m 52s the patch passed
          +1 compile 10m 45s the patch passed with JDK v1.8.0_66
          +1 javac 10m 45s the patch passed
          +1 compile 10m 41s the patch passed with JDK v1.7.0_91
          +1 javac 10m 41s the patch passed
          -1 checkstyle 0m 19s Patch generated 2 new checkstyle issues in hadoop-common-project/hadoop-common (total was 241, now 243).
          +1 mvnsite 1m 14s the patch passed
          +1 mvneclipse 0m 16s the patch passed
          -1 whitespace 0m 0s The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 xml 0m 1s The patch has no ill-formed XML file.
          +1 findbugs 2m 25s the patch passed
          +1 javadoc 1m 8s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 16s the patch passed with JDK v1.7.0_91
          -1 unit 8m 19s hadoop-common in the patch failed with JDK v1.8.0_66.
          -1 unit 8m 12s hadoop-common in the patch failed with JDK v1.7.0_91.
          +1 asflicense 0m 27s Patch does not generate ASF License warnings.
          100m 1s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.fs.shell.TestCopyPreserveFlag
            hadoop.metrics2.impl.TestGangliaMetrics
          JDK v1.7.0_91 Failed junit tests hadoop.metrics2.impl.TestMetricsSystemImpl
            hadoop.security.ssl.TestReloadingX509TrustManager
            hadoop.metrics2.impl.TestGangliaMetrics



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12776455/HADOOP-12625.001.patch
          JIRA Issue HADOOP-12625
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle xml
          uname Linux c9c1ab3d6a6d 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / ada9c2c
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt
          whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/whitespace-eol.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt
          unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt
          JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Max memory used 76MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 9m 18s trunk passed +1 compile 10m 46s trunk passed with JDK v1.8.0_66 +1 compile 10m 37s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 20s trunk passed +1 mvnsite 1m 15s trunk passed +1 mvneclipse 0m 17s trunk passed +1 findbugs 2m 15s trunk passed +1 javadoc 1m 7s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 17s trunk passed with JDK v1.7.0_91 +1 mvninstall 1m 52s the patch passed +1 compile 10m 45s the patch passed with JDK v1.8.0_66 +1 javac 10m 45s the patch passed +1 compile 10m 41s the patch passed with JDK v1.7.0_91 +1 javac 10m 41s the patch passed -1 checkstyle 0m 19s Patch generated 2 new checkstyle issues in hadoop-common-project/hadoop-common (total was 241, now 243). +1 mvnsite 1m 14s the patch passed +1 mvneclipse 0m 16s the patch passed -1 whitespace 0m 0s The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 xml 0m 1s The patch has no ill-formed XML file. +1 findbugs 2m 25s the patch passed +1 javadoc 1m 8s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 16s the patch passed with JDK v1.7.0_91 -1 unit 8m 19s hadoop-common in the patch failed with JDK v1.8.0_66. -1 unit 8m 12s hadoop-common in the patch failed with JDK v1.7.0_91. +1 asflicense 0m 27s Patch does not generate ASF License warnings. 100m 1s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.fs.shell.TestCopyPreserveFlag   hadoop.metrics2.impl.TestGangliaMetrics JDK v1.7.0_91 Failed junit tests hadoop.metrics2.impl.TestMetricsSystemImpl   hadoop.security.ssl.TestReloadingX509TrustManager   hadoop.metrics2.impl.TestGangliaMetrics Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12776455/HADOOP-12625.001.patch JIRA Issue HADOOP-12625 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle xml uname Linux c9c1ab3d6a6d 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / ada9c2c findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/whitespace-eol.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Max memory used 76MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8210/console This message was automatically generated.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          LGTM
          +1

          Show
          stevel@apache.org Steve Loughran added a comment - LGTM +1
          Hide
          rkanter Robert Kanter added a comment -

          Thanks for the review Steve Loughran. I fixed the whitespace during the commit.

          Committed to trunk and branch-2!

          Show
          rkanter Robert Kanter added a comment - Thanks for the review Steve Loughran . I fixed the whitespace during the commit. Committed to trunk and branch-2!
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8948 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8948/)
          HADOOP-12625. Add a config to disable the /logs endpoints (rkanter) (rkanter: rev e27fffdb9036d9ed9759d59b964020423b982e22)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServerLogs.java
          • hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8948 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8948/ ) HADOOP-12625 . Add a config to disable the /logs endpoints (rkanter) (rkanter: rev e27fffdb9036d9ed9759d59b964020423b982e22) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServerLogs.java hadoop-common-project/hadoop-common/src/main/resources/core-default.xml hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #680 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/680/)
          HADOOP-12625. Add a config to disable the /logs endpoints (rkanter) (rkanter: rev e27fffdb9036d9ed9759d59b964020423b982e22)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServerLogs.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #680 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/680/ ) HADOOP-12625 . Add a config to disable the /logs endpoints (rkanter) (rkanter: rev e27fffdb9036d9ed9759d59b964020423b982e22) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/resources/core-default.xml hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServerLogs.java

            People

            • Assignee:
              rkanter Robert Kanter
              Reporter:
              rkanter Robert Kanter
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development