public static boolean isInstrumentationAccessAllowed(ServletContext servletContext,
    HttpServletRequest request, HttpServletResponse response) throws IOException {
    Configuration conf = (Configuration) servletContext.getAttribute(CONF_CONTEXT_ATTRIBUTE);

    boolean access = true;
    boolean adminAccess = conf
      .getBoolean(CommonConfigurationKeys.HADOOP_SECURITY_INSTRUMENTATION_REQUIRES_ADMIN, false);
    if (adminAccess) {
      access = hasAdministratorAccess(servletContext, request, response);
    }
    return access;
  }
Checks the user has privileges to access to instrumentation servlets.
<p>
If <code>hadoop.security.instrumentation.requires.admin</code> is set to FALSE (default value)
it always returns TRUE.
</p>
<p>
If <code>hadoop.security.instrumentation.requires.admin</code> is set to TRUE it will check
that if the current user is in the admin ACLS. If the user is in the admin ACLs it returns
TRUE, otherwise it returns FALSE.
</p>
@param servletContext the servlet context.
@param request        the servlet request.
@param response       the servlet response.
@return TRUE/FALSE based on the logic decribed above.
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java