Skip to content
Sharp

Spring Security · interview question

Which component of the Spring Security Filter Chain is responsible for preventing unauthorized access to protected resources by returning HTTP 403?

Multiple choiceMediumchapter-17-curatedpremiumspring-securityspring-security-filter-chain
Choose one answer
Answer and explanation

Correct answer

B. AccessDeniedHandler

Why

The AccessDeniedHandler is responsible for handling access control violations, such as unauthorized access to protected resources, by returning an HTTP 403 Forbidden status. This ensures that unauthorized users cannot access secured endpoints.

Test yourself on Spring Security

A free test with instant, explained results. No account needed.

Start free test
All Spring Security questions →