/** * Perform the filtering that has been configured for this Valve, matching * against the specified request property. * * @param property The request property on which to filter * @param request The servlet request to be processed * @param response The servlet response to be processed * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void process(String property, Request request, Response response) throws IOException, ServletException { if (isAllowed(property)) { getNext().invoke(request, response); return; } // Deny this request denyRequest(request, response); }
/** * Set the comma-delimited set of the <code>allow</code> expressions * configured for this Valve, if any. * * @param allow The new set of allow expressions */ public void setAllow(String allow) { this.allow = allow; allows = precalculate(allow); }
/** * Perform the filtering that has been configured for this Valve, matching * against the specified request property. * * @param property The request property on which to filter * @param request The servlet request to be processed * @param response The servlet response to be processed * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void process(String property, Request request, Response response) throws IOException, ServletException { if (isAllowed(property)) { getNext().invoke(request, response); return; } if (getLog().isDebugEnabled()) { getLog().debug(sm.getString("requestFilterValve.deny", request.getRequestURI(), property)); } // Deny this request denyRequest(request, response); }
/** * Perform the filtering that has been configured for this Valve, matching * against the specified request property. * * @param property The request property on which to filter * @param request The servlet request to be processed * @param response The servlet response to be processed * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void process(String property, Request request, Response response) throws IOException, ServletException { if (isAllowed(property)) { getNext().invoke(request, response); return; } if (getLog().isDebugEnabled()) { getLog().debug(sm.getString("requestFilterValve.deny", request.getRequestURI(), property)); } // Deny this request denyRequest(request, response); }
/** * Perform the filtering that has been configured for this Valve, matching * against the specified request property. * * @param property The request property on which to filter * @param request The servlet request to be processed * @param response The servlet response to be processed * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void process(String property, Request request, Response response) throws IOException, ServletException { if (isAllowed(property)) { getNext().invoke(request, response); return; } // Deny this request denyRequest(request, response); }
/** * Set the comma-delimited set of the <code>deny</code> expressions * configured for this Valve, if any. * * @param deny The new set of deny expressions */ public void setDeny(String deny) { this.deny = deny; denies = precalculate(deny); }
/** * Perform the filtering that has been configured for this Valve, matching * against the specified request property. * * @param property The request property on which to filter * @param request The servlet request to be processed * @param response The servlet response to be processed * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void process(String property, Request request, Response response) throws IOException, ServletException { if (isAllowed(property)) { getNext().invoke(request, response); return; } // Deny this request denyRequest(request, response); }
/** * Set the comma-delimited set of the <code>allow</code> expressions * configured for this Valve, if any. * * @param allow The new set of allow expressions */ public void setAllow(String allow) { this.allow = allow; allows = precalculate(allow); }
/** * Set the comma-delimited set of the <code>deny</code> expressions * configured for this Valve, if any. * * @param deny The new set of deny expressions */ public void setDeny(String deny) { this.deny = deny; denies = precalculate(deny); }
/** * Set the comma-delimited set of the <code>allow</code> expressions * configured for this Valve, if any. * * @param allow The new set of allow expressions */ public void setAllow(String allow) { this.allow = allow; allows = precalculate(allow); }
/** * Reject the request that was denied by this valve. * <p>If <code>invalidAuthenticationWhenDeny</code> is true * and the context has <code>preemptiveAuthentication</code> * set, set an invalid authorization header to trigger basic auth. * * @param request The servlet request to be processed * @param response The servlet response to be processed * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void denyRequest(Request request, Response response) throws IOException, ServletException { if (invalidAuthenticationWhenDeny) { Context context = request.getContext(); if (context != null && context.getPreemptiveAuthentication()) { if (request.getCoyoteRequest().getMimeHeaders().getValue("authorization") == null) { request.getCoyoteRequest().getMimeHeaders().addValue("authorization").setString("invalid"); } getNext().invoke(request, response); return; } } response.sendError(denyStatus); }
/** * Set the comma-delimited set of the <code>deny</code> expressions * configured for this Valve, if any. * * @param deny The new set of deny expressions */ public void setDeny(String deny) { this.deny = deny; denies = precalculate(deny); }
/** * Reject the request that was denied by this valve. * <p>If <code>invalidAuthenticationWhenDeny</code> is true * and the context has <code>preemptiveAuthentication</code> * set, set an invalid authorization header to trigger basic auth. * * @param request The servlet request to be processed * @param response The servlet response to be processed * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ protected void denyRequest(Request request, Response response) throws IOException, ServletException { if (invalidAuthenticationWhenDeny) { Context context = request.getContext(); if (context != null && context.getPreemptiveAuthentication()) { if (request.getCoyoteRequest().getMimeHeaders().getValue("authorization") == null) { request.getCoyoteRequest().getMimeHeaders().addValue("authorization").setString("invalid"); } getNext().invoke(request, response); return; } } response.sendError(denyStatus); }
/** * Set the comma-delimited set of the <code>allow</code> expressions * configured for this Valve, if any. * * @param allow The new set of allow expressions */ public void setAllow(String allow) { this.allow = allow; allows = precalculate(allow); }