Class NegSecFilter

java.lang.Object
waffle.servlet.NegotiateSecurityFilter
com.github.farmgeek4life.jenkins.negotiatesso.NegSecFilter
All Implemented Interfaces:
jakarta.servlet.Filter

public final class NegSecFilter extends waffle.servlet.NegotiateSecurityFilter
Take a NegotiateSecurityFilter, and add a couple of items needed for Jenkins. Also, add an ability to configure the FilterProviders to use, outside of init(FilterConfig)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain)
    Add call to advertise Jenkins headers, as appropriate.
    void
    setAllowLocalhost(boolean allow)
     
    void
    setRedirect(boolean doEnable, String redirectTo)
     

    Methods inherited from class waffle.servlet.NegotiateSecurityFilter

    destroy, getAuth, getPrincipalFormat, getProviders, getRoleFormat, init, isAllowGuestLogin, isImpersonate, setAuth, setImpersonate, setPrincipalFormat, setRoleFormat

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • NegSecFilter

      public NegSecFilter()
  • Method Details

    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      Add call to advertise Jenkins headers, as appropriate.
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Overrides:
      doFilter in class waffle.servlet.NegotiateSecurityFilter
      Parameters:
      request - The request - used to check for not authorized paths, check for localhost, redirect, and chain filters
      response - The response - used to redirect, advertise headers, or chain filters
      chain - The filter chain
      Throws:
      IOException - pass-through from request/response/chain
      jakarta.servlet.ServletException - pass-through from request/response/chain
    • setRedirect

      public void setRedirect(boolean doEnable, String redirectTo)
      Parameters:
      doEnable - if redirect should be enabled
      redirectTo - the site to redirect to
    • setAllowLocalhost

      public void setAllowLocalhost(boolean allow)
      Parameters:
      allow - if localhost should bypass the SSO authentication