Skip to content
Sharp

Spring Core · interview question

Why is it important to avoid exposing the password field in a User entity via a REST API?

Multiple choiceMediumchapter-9-curatedpremiumspring-coredtos-and-entities
Choose one answer
Answer and explanation

Correct answer

D. It poses a security risk by exposing sensitive data.

Why

Exposing passwords in API responses creates significant security vulnerabilities, potentially allowing unauthorized access if intercepted.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →