Package no.nsd.qddt.configuration
Class AnnotatingHttpFirewall
- java.lang.Object
-
- org.springframework.security.web.firewall.StrictHttpFirewall
-
- no.nsd.qddt.configuration.AnnotatingHttpFirewall
-
- All Implemented Interfaces:
org.springframework.security.web.firewall.HttpFirewall
public final class AnnotatingHttpFirewall extends org.springframework.security.web.firewall.StrictHttpFirewall
Overrides the StrictHttpFirewall to log some useful information about blocked requests.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
HTTP_HEADER_REQUEST_REJECTED
The name of the HTTP header representing a request that has been rejected by this firewall.
-
Constructor Summary
Constructors Constructor Description AnnotatingHttpFirewall()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.web.firewall.FirewalledRequest
getFirewalledRequest(javax.servlet.http.HttpServletRequest request)
Provides the request object which will be passed through the filter chain.javax.servlet.http.HttpServletResponse
getFirewalledResponse(javax.servlet.http.HttpServletResponse response)
Provides the response which will be passed through the filter chain.
-
-
-
Field Detail
-
HTTP_HEADER_REQUEST_REJECTED
public static final java.lang.String HTTP_HEADER_REQUEST_REJECTED
The name of the HTTP header representing a request that has been rejected by this firewall.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFirewalledRequest
public org.springframework.security.web.firewall.FirewalledRequest getFirewalledRequest(javax.servlet.http.HttpServletRequest request) throws org.springframework.security.web.firewall.RequestRejectedException
Provides the request object which will be passed through the filter chain.- Specified by:
getFirewalledRequest
in interfaceorg.springframework.security.web.firewall.HttpFirewall
- Overrides:
getFirewalledRequest
in classorg.springframework.security.web.firewall.StrictHttpFirewall
- Throws:
org.springframework.security.web.firewall.RequestRejectedException
- if the request should be rejected immediately.
-
getFirewalledResponse
public javax.servlet.http.HttpServletResponse getFirewalledResponse(javax.servlet.http.HttpServletResponse response)
Provides the response which will be passed through the filter chain. This method isn't extensible because the request may already be committed. Furthermore, this is only invoked for requests that were not blocked, so we can't control the status or response for blocked requests here.- Specified by:
getFirewalledResponse
in interfaceorg.springframework.security.web.firewall.HttpFirewall
- Overrides:
getFirewalledResponse
in classorg.springframework.security.web.firewall.StrictHttpFirewall
- Parameters:
response
- The original HttpServletResponse.- Returns:
- the original response or a replacement/wrapper.
-
-