Most developers can configure Spring Security. Far fewer can explain what actually happens when a protected request hits the application.
In this video, I break down the full Spring Security architecture step by step — from the moment a request enters your application, through the filter chain, all the way to how authentication is established in the SecurityContext. No magic, no guessing — just a clear mental model you can use to debug and customize Spring Security with confidence.
What you'll learn:
How the SecurityFilterChain intercepts every incoming request
What the AuthorizationFilter does and when it returns a 401 or 403
How UsernamePasswordAuthenticationFilter handles login
How AuthenticationManager delegates to DaoAuthenticationProvider
How UserDetailsService and PasswordEncoder work together to validate credentials
How the authenticated principal is stored in the SecurityContext
How subsequent requests bypass re-authentication using session-based auth
Who this is for:
Intermediate to senior Java developers who want to stop copying Spring Security configuration and start understanding the internal architecture behind it.
Key components covered:
SecurityFilterChain · FilterChainProxy · AuthorizationFilter · UsernamePasswordAuthenticationFilter · AuthenticationManager · ProviderManager · DaoAuthenticationProvider · UserDetailsService · InMemoryUserDetailsManager · PasswordEncoder · SecurityContext
⏱️ Chapters:
0:00 – Introduction
0:40 – Spring Security Architecture Overview
11:08 – What happens when a protected resource is accessed
15:38 – How the AuthorizationFilter intercepts the request
18:50 – The login flow: UsernamePasswordAuthenticationFilter
23:28 – AuthenticationManager and DaoAuthenticationProvider
26:12 – UserDetailsService and PasswordEncoder
29:43 – Wrap up and what's next
📌 Connect:
🔔 Subscribe for production-grade Spring Boot and Spring Security tutorials
💼 Available for contracts: [email protected]
🐦 Linkedin: www.linkedin.com/in/hossain-md-iftekhar
💻 GitHub: https://github.com/learnwithiftekhar
► Join Discord: / discord
🔗 BONUS
🔐 (free guide) Secure 3 Spring Boot endpoints in 30 minutes : https://learnwithiftekhar.kit.com/sec...