Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure SQL database named DB1 that contains a table named Table1. Table1 has a field named Customer_ID that is varchar(22).
You need to implement masking for the Customer_ID field to meet the following requirements:
-> The first two prefix characters must be exposed.
-> The last four suffix characters must be exposed.
-> All other characters must be masked.
Solution: You implement data masking and use a random number function mask.
Does this meet the goal?
Click on the arrows to vote for the correct answer
A. B.B
Must use Custom Text data masking, which exposes the first and last characters and adds a custom padding string in the middle.
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dynamic-data-masking-get-startedThe solution of implementing data masking and using a random number function mask does not meet the goal as specified in the requirements. The solution would mask all characters in the Customer_ID field, except the first two and the last four characters. However, the requirement specifies that the first two prefix characters and the last four suffix characters should be exposed, while all other characters should be masked.
To implement masking that meets the specified requirements, you can use the Partial
masking function in Azure SQL Database. With this function, you can specify the number of characters to expose from the beginning and the end of the field, and mask the remaining characters.
To implement the required data masking, you can use the following T-SQL statement:
sqlALTER TABLE Table1 ALTER COLUMN Customer_ID ADD MASKED WITH (FUNCTION = 'partial(2,"XXXXXX",4)');
In this statement, the partial
function is used to specify that the first two characters should be exposed, the last four characters should be exposed, and all other characters should be masked with 'X'.
Therefore, the correct answer is B. No, the solution does not meet the goal as specified in the requirements.