SQL Server 2008 R2 User Permissions

491 views Asked by At

I have a user whose role is db_datareader that needs to be able to execute a stored procedure which decrypts some data using our symmetric key and certificate. I've granted EXECUTE perms on the stored procedure itself for this user, but now it wants access to the symmetric key and certificate. I'm not sure how to grant perms for the key and the certificate while still keeping this user in a SELECT or read-only mode. Is this possible?

1

There are 1 answers

2
AudioBubble On BEST ANSWER

In the header of your stored procedure use WITH EXECUTE AS 'somePrincipal', where somePrincipal has the necessary permissions to access the symmetric key and certificate.