Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Social security number format missing under masking field format

I implemented the dynamic data masking in my current project, for that I created the Azure SQL database and table. After that I went to dynamic data masking option in azure portal, then click on dynamic data masking option it will open snapshot like this below figure.

enter image description here

But in the above image there is no social security number format under masking field format.

How can I see the social security number format under masking field format option?

like image 586
Pradeep Avatar asked Nov 30 '25 07:11

Pradeep


2 Answers

After did R & D on how to mask the social security number in azure SQL database. I think Dynamic data masking provides for four different built in masking functions (default, Email, Custom String, and Random) see the below for more information.

SQL Server 2016 New Features: Security and Encryption

https://www.teamscs.com/2016/01/sql-server-2016-new-features-security-encryption/

That’s why we are not able see the social security number format under masking filed format option in Azure Portal.

So, I followed below link to implement the above concept.

Dynamic Data Masking

https://msdn.microsoft.com/en-us/library/mt130841.aspx

For Example:-

 ALTER TABLE [dbo].[CustomerTables]
 ALTER COLUMN [SSN] ADD MASKED WITH (FUNCTION = 'partial(0,"XXX-XX-",4)');

Pradeep

like image 63
Pradeep Avatar answered Dec 02 '25 22:12

Pradeep


Thanks Pradeep - indeed this is valid way to implement a relevant masking function for Social Security Numbers which exposes the last 4 digits. We currently don't support a built-in function that applies this format, though as you can see it is very easy to create such a format using the Custom string/ partial masking function. Please do reach out if you have any additional questions. Thanks!

like image 37
user7453088 Avatar answered Dec 02 '25 22:12

user7453088



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!