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.

8 – ObfuscationASSELECTdbo.Character_Mask(ln.Lender_Case_Number,4,'X')AS Lender_Case_Number,dbo.Character_Scramble(bn.Borrower_FName + ' '+ bn.Borrower_LName)AS Borrower_NameFROMdbo.Loan lnINNER JOIN dbo.Loan_Borrowers lbON ln.Loan_ID = lb.Loan_IDAND lb.Borrower_Type_ID = 1 -- Primary Borrowers OnlyINNER JOIN dbo.Borrower_Name bnON lb.Borrower_ID = bn.Borrower_ID;GO-- Grant permissions to viewGRANT SELECT ON dbo.vwLoanBorrowersTO Sensitive_high, Sensitive_medium;GOListing 8-5: The vwLoanBorrowers View.The vwLoanBorrowers view, without the use of the masking user definedfunctions, would have returned the data set shown in Table 8-1.Lender Case Number9646384387HSW8054957254EZEBorrower NameDamion BookerDanny WhiteTable 8-1: The non-obfuscated result set.However, with the user defined functions in place the masked data set shown inTable 8-2 is returned:Lender Case NumberXXXXXXXXX7HSWXXXXXXXXX4EZEBorrower Nameo akdenbimrni ahtydweTable 8-2: The results returned after character masking and scrambling.Numeric Variance179

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

Saved successfully!

Ooh no, something went wrong!