concept chain in category spring

This is an excerpt from Manning's book Spring Security in Action.
In Spring Security, the HTTP filters delegate the different responsibilities that apply to an HTTP request. In chapters 3 through 5, where we discussed the HTTP Basic authentication and authorization architecture, I’ve often referred to filters. You learned that there is a component we named authentication filter, which delegates the authentication responsibility to the authentication manager. You learned as well that a certain filter takes care of the authorization configuration after successful authentication. In general, in Spring Security, the HTTP filters manage each responsibility that must be applied to the request. The filters form a chain of responsibilities. A filter receives the request, executes its logic, and eventually delegates the request to the next filter in the chain (figure 9.1).
Figure 9.1 The filters chain receives the request. Each filter uses a manager to apply specific logic to the request and, eventually, delegates the request further in the chain to the next filter.
![]()
It is important to understand that an application doesn’t necessarily have instances of all these filters in the chain. The chain is longer or shorter, depending on how you configure the application. For example, in chapters 2 and 3, you learned that you need to call the httpBasic() method of the HttpSecurity class if you want to use the HTTP Basic authentication method. What happens actually is that if you call the httpBasic() method an instance of the BasicAuthenticationFilter will be added to the chain. Similarly, depending on the configurations you write, the definition of the filter chain is affected.
You add a new filter to the chain relative to another one. You can either add a filter before, after, or at the position of a known one. Each position is, in fact, an index (a number), and you might find it also referred to as “order”.