You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ey...@apache.org on 2019/02/21 23:06:48 UTC

[hadoop] branch branch-2.9 updated: Revert "HADOOP-13707. Skip authorization for anonymous user to access Hadoop"

This is an automated email from the ASF dual-hosted git repository.

eyang pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-2.9 by this push:
     new 568ff1f  Revert "HADOOP-13707. Skip authorization for anonymous user to access Hadoop"
568ff1f is described below

commit 568ff1f46777a0f11d77fef7940f9f7ae8eaead8
Author: Eric Yang <ey...@apache.org>
AuthorDate: Thu Feb 21 17:35:19 2019 -0500

    Revert "HADOOP-13707. Skip authorization for anonymous user to access Hadoop"
    
    This reverts commit 7993fb5b8127a219e6c936206b5c5c0790e82946.
    
    (cherry picked from commit da854234a244dea4abb7f8b34882a2219abb503f)
    (cherry picked from commit f545b6b765c267a8a0004e1fda591dad20eac193)
---
 .../main/java/org/apache/hadoop/metrics/MetricsServlet.java    | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
index 275fa81..b330613 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
@@ -25,7 +25,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -110,13 +109,8 @@ public class MetricsServlet extends HttpServlet {
   public void doGet(HttpServletRequest request, HttpServletResponse response)
       throws ServletException, IOException {
 
-    // If user is a static user and auth Type is null, that means
-    // there is a non-security environment and no need authorization,
-    // otherwise, do the authorization.
-    final ServletContext servletContext = getServletContext();
-    if (!HttpServer2.isStaticUserAndNoneAuthType(servletContext, request) &&
-        !HttpServer2.isInstrumentationAccessAllowed(servletContext,
-            request, response)) {
+    if (!HttpServer2.isInstrumentationAccessAllowed(getServletContext(),
+                                                   request, response)) {
       return;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org