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 22:41:42 UTC
[hadoop] branch branch-2 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
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new da85423 Revert "HADOOP-13707. Skip authorization for anonymous user to access Hadoop"
da85423 is described below
commit da854234a244dea4abb7f8b34882a2219abb503f
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.
---
.../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