What is least privilege, and how would you apply it to a database-backed application?
Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Saved automatically
Model Answer & Deep-Dive Explanation
Grant each identity only the permissions needed for its purpose and duration. A web application usually should not connect as a database administrator. Give its runtime account the necessary data operations, use a separate migration identity for schema changes, and restrict administrative access. Apply the same idea to file permissions, cloud roles, and support tools. Review permissions as responsibilities change, and log sensitive actions. Least privilege reduces the impact of mistakes and compromise, but still needs secure authentication, monitoring, and a working recovery process.
Related Questions in Cybersecurity & InfoSec
Explain SQL Injection (SQLi) vulnerabilities and defense mechanisms (Prepared Statements vs ORM)
Intermediate level • 1256 views
How do authentication, authorization, and accounting differ?
Easy level • 5 views
Why do parameterized queries prevent SQL injection more reliably than escaping user input?
Medium level • 5 views
How do XSS and CSRF differ, and what controls address each?
Medium level • 5 views
A user changes an invoice ID in the URL and sees another customer’s invoice. What failed?
Medium level • 3 views