Class RequestAuthenticationFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.apache.nifi.web.server.log.RequestAuthenticationFilter
All Implemented Interfaces:
jakarta.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

public class RequestAuthenticationFilter extends org.springframework.web.filter.OncePerRequestFilter
Request Authentication Filter sets Jetty Request Authentication using Spring Security Authentication as Principal
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String[]
     
    private static final Subject
     
    private static final org.slf4j.Logger
     
    private static final String
     

    Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

    ALREADY_FILTERED_SUFFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doFilterInternal(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, jakarta.servlet.FilterChain filterChain)
    Read Authentication username from request attribute and set Jetty Authentication when found

    Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

    doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch

    Methods inherited from class org.springframework.web.filter.GenericFilterBean

    addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_SUBJECT

      private static final Subject DEFAULT_SUBJECT
    • DEFAULT_ROLES

      private static final String[] DEFAULT_ROLES
    • METHOD

      private static final String METHOD
      See Also:
    • logger

      private static final org.slf4j.Logger logger
  • Constructor Details

    • RequestAuthenticationFilter

      public RequestAuthenticationFilter()
  • Method Details

    • doFilterInternal

      protected void doFilterInternal(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException
      Read Authentication username from request attribute and set Jetty Authentication when found
      Specified by:
      doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
      Parameters:
      httpServletRequest - HTTP Servlet Request
      httpServletResponse - HTTP Servlet Response
      filterChain - Filter Chain
      Throws:
      jakarta.servlet.ServletException - Thrown on FilterChain.doFilter()
      IOException - Thrown on FilterChain.doFilter()