17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 – Transparent Data Encryptionand test their ability to access the encrypted data. The use of REVERTterminates the impersonation and returns us to our original user account.USE HomeLending;GO-- execute as a user who is a member of Sensitive_high roleEXECUTE AS USER = 'WOLFBA';GOSELECT * FROM dbo.Borrower;GOREVERT;GO-- execute as a user who is a member of Sensitive_medium roleEXECUTE AS USER = 'KELLEYWB';GOSELECT * FROM dbo.Borrower;GOREVERT;GO-- execute as a user who is a member of Sensitive_low roleEXECUTE AS USER = 'JONESBF';GOSELECT * FROM dbo.Borrower;GOREVERT;GOListing 6-11: Verifying TDE using EXECUTE AS queries.Each query in the above script successfully returns the contents of theBorrower table within the HomeLending database. This demonstrates thatthe automatic decryption is functioning as expected, and verifies thatpermissions to the appropriate database objects are not affected.Please note that if the exercises for implementing cell-level encryption,presented in Chapter 5, have been completed within the same database that isbeing used in the TDE exercises, the query in Listing 6-11 will fail sincepermissions to all tables were denied to the Sensitive_high,Sensitive_medium and Sensitive_low database roles. This can beovercome by granting SELECT permissions to these database roles to theBorrower table.143

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!