Mainly in the security filter chain, before the request reaches controllers. Filters build the `SecurityContext` (authentication), then authorization checks decide if access is allowed (URL rules, method security, etc.).
Advanced answer
Deep dive
Spring Security sits in front of your MVC layer as a chain of servlet filters (Security Filter Chain). Every request flows through filters before hitting controllers.