A review shows that a web application connects to its database with an account that has full administrative rights, although the application only reads and writes rows in six tables. What should the DBA do?
Select an answer to reveal the explanation.
Short Explanation
Giving your app admin rights is like giving the pizza delivery guy the master key to the building; it works, until something goes wrong. Least privilege means the app gets exactly the reads and writes it needs on its six tables and nothing more. Rotating the password is the trap: the key's still a master key.
Full Explanation
The principle of least privilege grants an identity only the permissions required to perform its function. An application that reads and writes rows in six tables needs SELECT, INSERT, UPDATE and possibly DELETE on those tables, or EXECUTE on specific stored procedures, and nothing else. Running it under an administrative account means any flaw, such as SQL injection, lets an attacker drop tables, read every database, create logins or change server settings. Creating a dedicated role with only the necessary DML, assigning it to a new application account, and retiring the administrative connection limits the damage of a compromise to what the application could already do. Rotating the administrative password reduces the window for a stolen credential but leaves full privileges available to anything that runs as the application. Restricting connections to the web servers narrows where the account can be used, yet an attacker exploiting the application already runs from those servers. Auditing records misuse after it happens rather than preventing it. Exam caveat: these hardening steps are all useful as additional layers, but none of them replaces removing excess privilege. Operational check: test the application end to end under the new account in a non-production environment, then confirm that an attempt to run DDL as that account is denied.