@Override
  protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    // Do the authorization
    if (HttpServer.hasAdministratorAccess(getServletContext(), request,
        response)) {
      // Authorization is done. Just call super.
      super.doGet(request, response);
    }
  }
General servlet which is admin-authorized.
common/src/java/org/apache/hive/http/AdminAuthorizedServlet.java