Class XFrameOptionsFilter

java.lang.Object
org.apache.hadoop.security.http.XFrameOptionsFilter
All Implemented Interfaces:
javax.servlet.Filter

@Public @Evolving public class XFrameOptionsFilter extends Object implements 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.
  • Field Details

  • Constructor Details

    • XFrameOptionsFilter

      public XFrameOptionsFilter()
  • Method Details

    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.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:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • init

      public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • getFilterParams

      public static Map<String,String> getFilterParams(Configuration conf, String confPrefix)
      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 read
      confPrefix - configuration prefix
      Returns:
      mapping of configuration properties to be used for filter initialization