1. Which principle should guide database permission design for application users?
Least privilege shrinks blast radius. If a credential leaks, the attacker is limited to the granted actions. Start with read-only and add specific INSERT, UPDATE, or EXECUTE rights as needed. Prefer role-based grants over per-user grants.
CREATE ROLE app_read; GRANT SELECT ON ALL TABLES IN SCHEMA public TO app_read;