70-465 · Question #81
You need to enable users to modify data in the database tables using UPDATE operations. You need to implement a solution that meets the design requirements. What should you configure?
The correct answer is D. You should configure stored procedures that use the EXECUTE AS statement.. To enable users to modify database data using UPDATE operations while meeting specific design requirements, configuring stored procedures with the EXECUTE AS statement provides a secure and controlled solution.
Question
Options
- AYou should configure a server role.
- BYou should configure a database role.
- CYou should configure functions that use the EXECUTE AS statement.
- DYou should configure stored procedures that use the EXECUTE AS statement.
How the community answered
(28 responses)- A14% (4)
- B18% (5)
- C7% (2)
- D61% (17)
Why each option
To enable users to modify database data using UPDATE operations while meeting specific design requirements, configuring stored procedures with the EXECUTE AS statement provides a secure and controlled solution.
Server roles grant broad permissions at the server level, which is excessive and inappropriate for granting granular table modification access to end-users.
While database roles can grant UPDATE permissions, this typically provides direct table modification access to all members of the role, which might not align with design requirements for controlled, indirect data manipulation through specific application logic.
User-Defined Functions (UDFs) are primarily for computations and returning values, and generally cannot perform data modification operations like UPDATE, even when combined with the EXECUTE AS statement.
Stored procedures are designed to encapsulate SQL statements, including UPDATE operations, and the EXECUTE AS statement allows the procedure to run under a specific security context. This enables users with limited direct permissions to execute the stored procedure, which then performs the UPDATE using the elevated permissions of the user specified in the EXECUTE AS clause, upholding the principle of least privilege.
Concept tested: Secure data modification using stored procedure impersonation
Source: https://learn.microsoft.com/en-us/sql/t-sql/statements/execute-as-transact-sql
Topics
Community Discussion
No community discussion yet for this question.