Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Spring Security 6 Interview Questions: 45 Real Scenarios
New

Spring Security 6 Interview Questions: 45 Real Scenarios

JWT, OAuth 2.0, OIDC, CSRF, CORS, method security and testing, with every Spring Boot 3 example really run
Created byCracklab .
Last updated 11/2026
English

What you'll learn

  • Explain the Spring Security 6 filter chain, who sends 401 vs 403, and debug filter order, chain shadowing and web.ignoring() mistakes
  • Store and migrate passwords safely with BCrypt and DelegatingPasswordEncoder, and stop timing attacks and user enumeration
  • Secure URLs and methods with hasRole, hasAuthority and @PreAuthorize, and fix IDOR, self-invocation and multi-tenant bypass bugs
  • Design JWT and OAuth 2.0/OIDC security: RS256 and JWKS, PKCE, scopes vs roles, audience checks, refresh token rotation and revocation
  • Configure CSRF, CORS, CSP and session fixation protection correctly, and know exactly when disabling CSRF is safe
  • Write real security tests with MockMvc, @WithMockUser, WebTestClient and JWKS stubs, and answer 45 real Spring Security interview questions

Course content

10 sections • 47 lectures • 2h 17m total length
  • Welcome2:30
  • Course Roadmap2:52

Requirements

  • Working knowledge of Java and basic Spring Boot (controllers, beans, application properties)
  • Basic idea of HTTP: requests, headers, cookies and status codes like 200, 401 and 403
  • Tech leads and reviewers who want to spot common security bugs like IDOR, CORS misconfiguration and disabled CSRF in code reviews

Description

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.

Who this course is for:

  • Java and Spring Boot developers preparing for backend or senior developer interviews where Spring Security questions come up
  • Backend engineers who secure production APIs and microservices with JWT, OAuth 2.0 and OpenID Connect
  • Developers who use Spring Security every day but want to understand what really happens inside the filter chain
  • Tech leads and reviewers who want to spot common security bugs like IDOR, CORS misconfiguration and disabled CSRF in code reviews