Revert "HADOOP-13707. Skip authorization for anonymous user to access Hadoop"
This reverts commit 7993fb5b81
.
This commit is contained in:
parent
665cad03f3
commit
da854234a2
|
@ -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,12 +109,7 @@ 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,
|
||||
if (!HttpServer2.isInstrumentationAccessAllowed(getServletContext(),
|
||||
request, response)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue