protected DelegatingSecurityProvider provider;
private static ThreadLocal<String> originalRequest = new ThreadLocal<String>();
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
<BUG>HttpServletResponse httpResponse = (HttpServletResponse) response;
if (provider == null) {</BUG>
log.warn("No security provider available: disallowing web access to brooklyn");
httpResponse.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
return;

protected DelegatingSecurityProvider provider;
private static ThreadLocal<String> originalRequest = new ThreadLocal<String>();
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
String uri = httpRequest.getRequestURI();
String uid = RequestTaggingFilter.getTag();
String user = Strings.toString(httpRequest.getSession().getAttribute(AUTHENTICATED_USER_SESSION_ATTRIBUTE));
if (provider == null) {
log.warn("No security provider available: disallowing web access to brooklyn");
httpResponse.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
return;
