Package org.apache.hadoop.security.http
Class XFrameOptionsFilter
java.lang.Object
org.apache.hadoop.security.http.XFrameOptionsFilter
- All Implemented Interfaces:
javax.servlet.Filter
This filter protects webapps from clickjacking attacks that
are possible through use of Frames to embed the resources in another
application and intercept clicks to accomplish nefarious things.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis wrapper allows the rest of the filter pipeline to see the configured value when interrogating the response. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) getFilterParams(Configuration conf, String confPrefix) Constructs a mapping of configuration properties to be used for filter initialization.voidinit(javax.servlet.FilterConfig config)
-
Field Details
-
X_FRAME_OPTIONS
- See Also:
-
CUSTOM_HEADER_PARAM
- See Also:
-
-
Constructor Details
-
XFrameOptionsFilter
public XFrameOptionsFilter()
-
-
Method Details
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
init
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
getFilterParams
Constructs a mapping of configuration properties to be used for filter initialization. The mapping includes all properties that start with the specified configuration prefix. Property names in the mapping are trimmed to remove the configuration prefix.- Parameters:
conf- configuration to readconfPrefix- configuration prefix- Returns:
- mapping of configuration properties to be used for filter initialization
-