@Override protected void doFilterInternal(HttpServletRequest req, HttpServletResponse res,
      FilterChain chain) throws ServletException, IOException {
      String authHeader = req.getHeader("Authorization");
      if (expectedAuthorization.equals(authHeader)) {
        chain.doFilter(req, res); // Pass on the supplied credentials
        return;
      }
      res.setHeader("WWW-Authenticate", "Basic realm=\"Realm'\"");
      res.sendError(HttpServletResponse.SC_UNAUTHORIZED); // Return 401 otherwise.
    }
Implements BASIC instead of spring-security + CORS, CSRF and management exclusions.
docker/test-images/zipkin-eureka/src/main/java/zipkin/test/EurekaSecurity.java