🟢 Beginner Level
- What is Spring Security and how does it work with Spring Boot?
- How do you enable Spring Security in a Spring Boot application?
- What are the default configurations provided by Spring Security?
- What is the difference between @PreAuthorize and @Secured annotations?
- How do you configure in-memory authentication in Spring Boot?
- What is the purpose of the
WebSecurityConfigurerAdapter
class?
🟡 Intermediate Level
- How do you secure REST APIs using Spring Security?
- What is the difference between Authentication and Authorization?
- How do you configure a custom login form with Spring Security?
- How do you implement role-based access control (RBAC) in Spring Boot?
- What is CSRF and how does Spring Security handle it?
- How can you disable CSRF protection for certain endpoints (e.g., APIs)?
🔴 Advanced Level
- How do you integrate JWT (JSON Web Token) with Spring Boot Security?
- What are stateless vs. stateful authentication in Spring Security?
- How do you implement OAuth2 authentication in a Spring Boot app?
- Explain how to secure a microservices architecture using Spring Cloud Gateway and Spring Security.
- How do you manage user sessions and session timeouts in Spring Security?
- How do you secure endpoints based on dynamic permissions from a database?
✅ Bonus Practical Questions:
- “Walk me through securing a REST API using JWT and Spring Boot.”
- “How would you prevent brute-force attacks in a Spring Boot app?”
- “What tools do you use for monitoring and auditing security events?”