Member-only story
Spring Security Interview Questions and Answer
Spring Security Interview Questions and Answer
29 min readNov 10, 2025
- What is Spring Security?
- What are the core components of Spring Security?
- Explain Authentication vs. Authorization in Spring Security?
- Explain salting and its usage?
- What do you mean by HASHING in spring security?
- How do you configure security in Spring Security?
- What is a SecurityContext?
- What is UserDetailsService?
- Explain PasswordEncoder and its importance?
- Explain method-level security?
- What is CSRF protection?
- What is CORS?
- Explain Spring Security filters?
- Why filters instead of interceptors or controllers?
- What is session fixation protection?
- How does Spring Security handle concurrent logins?
- What is JWT?
- Why use JWT in Spring Boot?
- JWT vs OAuth2
- How does JWT authentication flow work?
- What is inside a JWT?
- Where to store the JWT token?
- How do you handle JWT expiration?
- What is the difference between Access Token and Refresh Token?