Loading…
OWASP, authentication, authorization, OAuth2 & JWT
Security questions span both app-level (OWASP top 10, encryption, secure coding) and Spring-specific (authentication, authorization, OAuth2, JWT, CORS/CSRF). This hub cross-lists both modules so no matter how the interviewer frames the topic, you're covered.
How to use this hub
2 modules cover application security end-to-end. Open the first module, use Open question 1 on its landing page, and use Next at the bottom of each answer to stay in order.
Revision sheet
~12 min · 5 sections · save as PDF
Application security interview questions cover the OWASP top issues every senior backend engineer is expected to know — injection (SQL, command), broken authentication and session management, XSS and CSRF, insecure deserialization, dependency vulnerabilities (CVE triage, Log4Shell-grade incidents), secrets management, secure password storage (bcrypt/argon2), TLS basics, and the secure-by-default patterns in modern Spring Boot. Pair this with the Spring Security page for the auth-specific surface.
Defence in depth, with the OWASP Top 10 as the default threat catalogue:
The interview surface for this module breaks into these focus areas:
"I'd treat input as hostile, parameterise every query, store passwords with BCrypt cost 12+, ship a CSP header, run SCA in CI, rotate secrets via vault, and review the OWASP Top 10 against the design before shipping."
Revision sheet
~12 min · 5 sections · save as PDF
Spring Security interview questions cover the auth layer that protects every modern Java backend — the SecurityFilterChain, authentication providers, password encoding, session vs stateless (JWT) auth, OAuth2 and OpenID Connect, method-level security (@PreAuthorize, @PostAuthorize), CORS and CSRF, and the common pitfalls interviewers love to surface (storing JWTs in localStorage, missing audit fields, leaking principal in logs). This page covers Spring Security with Spring Boot 3, including the modern config-by-bean style and the migration patterns from the older WebSecurityConfigurerAdapter approach.
Spring Security is a chain of filters, then method security on top:
@PreAuthorize, @PostAuthorize, SpEL.BCryptPasswordEncoder).Boot 3 / Security 6 dropped WebSecurityConfigurerAdapter; everything is now bean-style.
The interview surface for this module breaks into these focus areas:
DelegatingSecurityContextRunnable."I'd configure a `SecurityFilterChain` bean, route public/private paths explicitly, choose
based on , encode passwords with BCrypt, and put method-level guards on the service. CSRF stays on for cookie auth, off for stateless JWT APIs."