Package waffle.spring

Class DelegatingNegotiateSecurityFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
waffle.spring.NegotiateSecurityFilter
waffle.spring.DelegatingNegotiateSecurityFilter
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 DelegatingNegotiateSecurityFilter extends NegotiateSecurityFilter
Supports optional injection of spring security entities, allowing Waffle to act as an interface towards an identity provider(the AD).

Below mentioned entities are verified to be set before invoked, inherited entities are not.

  • The AuthenticationManager allows for the service provider to authorize the principal.
  • The authenticationSuccessHandler allows for the service provider to further populate the Authentication object.
  • The AuthenticationFailureHandler is called if the AuthenticationManager throws an AuthenticationException.
  • The AccessDeniedHandler is called if the AuthenticationManager throws an AccessDeniedException.
Example configuration:
 
 <bean id="waffleNegotiateSecurityFilter"
      class="waffle.spring.DelegatingNegotiateSecurityFilter"
      scope="tenant">
      <property name="allowGuestLogin" value="false" />
      <property name="Provider" ref="waffleSecurityFilterProviderCollection" />
      <property name="authenticationManager" ref="authenticationManager" />
      <property name="authenticationSuccessHandler" ref="authenticationSuccessHandler" />
      <property name="authenticationFailureHandler" ref="authenticationFailureHandler" />
      <property name="accessDeniedHandler" ref="accessDeniedHandler" />
      <property name="defaultGrantedAuthority">
          <null />
      </property>
 </bean>