
This course contains the use of artificial intelligence.
Spring Security is the topic where many good Java developers get stuck in interviews. Not because they have never used it, but because the questions go one level deeper: Who sends 401 and who sends 403? Why does PreAuthorize do nothing here? Why does a PATCH request fail before it even reaches the controller?
This course answers 45 real Spring Security interview questions, one per lecture, in about 3 minutes each. Every lecture shows the problem, explains the idea with animated diagrams, and then proves it with real code. Every example was really compiled and run on Spring Security 6, Spring Boot 3, embedded Tomcat 10, Spring WebFlux and Nimbus JOSE. The output you see on screen is real, not invented.
What you will cover:
- Request pipeline: the security filter chain, DelegatingFilterProxy vs FilterChainProxy, SecurityContextHolder and ThreadLocal, multiple chains, web ignoring vs permitAll
- Authentication and passwords: BCrypt vs SHA-256, cost factor, timing attacks, AuthenticationManager and providers, legacy hash migration
- Authorization: URL vs method security, hasRole vs hasAuthority, IDOR, the self-invocation bypass, multi-tenant RBAC
- JWT: anatomy, HS256 vs RS256 and JWKS, token bloat, refresh token rotation, revocation, the "none" algorithm attack
- OAuth 2 and OpenID Connect: the four roles, ID token vs access token, PKCE, scopes vs roles, audience validation
- Browser defenses: CSRF, double submit cookies, CORS preflight, CSP, SRI and clickjacking
- Production: Vault dynamic secrets, spoofed X-Forwarded-For headers, distributed rate limiting, SpEL injection, Spring Boot Actuator, session fixation, sessions across pods, lessons from Spring4Shell
- Testing: MockMvc, WithMockUser and CSRF, method security tests, WebTestClient, and real JWT tests with a JWKS stub
Along the way the course also corrects popular myths, for example what really happens when a custom filter forgets to call doFilter, and why a heap dump can leak a password that the Actuator env endpoint hides.
By the end, you will be able to explain Spring Security clearly in an interview, and spot real security bugs in your own code.