@Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
      throws IOException, ServletException {
      final String userName = request.getParameter("user.name");
      ServletRequest requestModified = new HttpServletRequestWrapper((HttpServletRequest) request) {
        @Override
        public String getRemoteUser() {
          return userName;
        }
      };
      filterChain.doFilter(requestModified, response);
    }
Dummy filter that mimics as an authentication filter. Obtains user identity from the request
parameter user.name. Wraps around the request so that request.getRemoteUser() returns the user
identity.
hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java