- All Implemented Interfaces:
- javax.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.web.context.ServletContextAware
public class NodeAuthorizedUserFilter
extends org.springframework.web.filter.GenericFilterBean
Custom filter to extract a user's authorities from the request where the user
was authenticated by the cluster manager and populate the threadlocal with
the authorized user. If the request contains the appropriate header with
authorities and the application instance is a node connected to the cluster,
then the authentication/authorization steps remaining in the filter chain are
skipped.
Checking if the application instance is a connected node is important because
it prevents external clients from faking the request headers and bypassing
the authentication processing chain.