I assume you use SegmentedMapping ? Yes, that could be a possibility .. even so complex to configure.
Another option is to use RegexDecompose framework where you create multiple groups to match a segement (for each segment one) and can assign per group one algorithm.
The easiest option is possibly to use the Professional Services developed billable plugin SSN which contains specific SSN frameworks for :
- Canadian SSN
- US SSN
- US NPI code
- German SSN
- Kingdom of Saudi Arabia SSN
- Swedish SSN
- Turkish SSN
- UK SSN
- South African SSN
- (Italian SSN coming soon).
Each of those frameworks is configurable, e.g. allows to create one or multiple separate instances of algorithms and they follow ALL SSN rules per framework.
For US the below applies: (and it will be almost impossible to support ALL rules using SegmentedMapping or RegexDecompose)
The logic suports inputs like
"AAA-GG-SSSS"
or
"AAAGGSSSS"
and if the input is any invalid input (contains alpha chars or is shorter/longer than allowed it has a built in fallback logic tha twill make sure the values does always get changed (even so it cannot forcibly convert an invalid value into a valid SSN value)
/*
The Social Security number is a nine-digit number in the format "AAA-GG-SSSS".
The number is divided into three parts: the first three digits, known as the area number because
they were formerly assigned by geographical region; the middle two digits, known as the group number;
and the final four digits, known as the serial number.
Some special numbers are never allocated:
Numbers with all zeros in any digit group (000-##-####, ###-00-####, ###-##-0000).[38][39]
Numbers with 666 or 900–999 (Individual Taxpayer Identification Number) in the first digit group.[38]
*/
------------------------------
Tino Pironti
Masking SME
Technical Manager
Delphix
------------------------------
Original Message:
Sent: 04-14-2025 06:40:55 PM
From: Poornima Dhanasekaran
Subject: Generate a valid masked US SSN using Delphix algorithm framework
I tried this in Delphix 2025.1 version, but could not keep the segment 1 with two parts of segments (
- 1st Segment - set a range of 1,2,3,4,5,6,7,8 for the first digit
- 1st Segment - set a range of 0,1,2,3,4,5,7,8,9 for second (or third) digit). Is there any other option in this delphix version?
------------------------------
Poornima Dhanasekaran
Gainwell Technologies LLC
Original Message:
Sent: 01-18-2022 11:05:11 AM
From: Himanshu Pawar
Subject: Generate a valid masked US SSN using Delphix algorithm framework
Q. How to create a valid SSN using Delphix ?
A. It is very easy to generate a valid SSN using Delphix while de-identifying data. This can be achieved using the "Segmented Mapping" Type of algorithm.
Read more here - https://maskingdocs.delphix.com/6.0.11/Securing_Sensitive_Data/Algorithms/Algorithm_Frameworks/Segment_Mapping/
The specification is relevant to the US SSA number format as per the guidance here - https://www.ssa.gov/employer/randomization.html
Create a Segmented Mapping Algorithm
- Choose 3 Segments 3,2,4 - Alpha Numeric
- 1st Segment - set a range of 1,2,3,4,5,6,7,8 for the first digit
- 1st Segment - set a range of 0,1,2,3,4,5,7,8,9 for second ( or third) digit
- 2nd segment - set a range of 1,2,3,4,5,6,7,8,9 for first ( or second) digit
- Last segment - set a range of 1,2,3,4,5,6,7,8,9 for one of the last 4 digits
Save and use.
Please comment on any improvements or enhancements.
------------------------------
Himanshu Pawar
Principal Solutions Engineer
Delphix
------------------------------