Mask United States Social Security Numbers

The mask United States Social Security Numbers policy generates a random Social Security Number (SSN) that includes the source area number.

An SSN is made of 3 subfields. The first 3 digits (area) represent an area generally determined by the state in which the SSN is issued. The next 2 digits (group) define a group number corresponding to the area number. The last 4 digits (serial) are a sequential serial number. The policy generates a masked SSN with a group number appropriate to the area number.

When this policy is run as a part of a data management service on the executor platform, the executor validates group values by using a high-group file from the U.S. Social Security Administration web site: http://www.socialsecurity.gov/employer/highgroup.txt. If the executor machine cannot access www.socialsecurity.gov, or if you wish to change the location of this file, you must edit the executor eclipse.ini file.

JavaScript policy syntax

This policy is available with the functions SSNMask.randomSSN() and SSNMask.maskSSN().

To generate a random value not based on an input value, use the function: SSNMask.randomSSN()

To generate a value based on an input value, use the function: SSNMask.maskSSN(record.getItem('<arg.inputAttribute>'))

For example, to generate a random value based on an input value, use the following:

SSNMask.maskSSN(record.getItem('/DEMO/CUSTOMERS/NATIONAL_ID'))

To generate a value based on the input value and mask an additional attribute in which all instances of the input value are masked, use the function: SSNMask.maskSSN(record.getItem('<arg.inputAttribute>'), '<arg.additionalAttribute>')

For example, to generate a value based on the NATIONAL_ID attribute and mask additional instances of the input value found in the CUST_ID attribute, use the following:

SSNMask.maskSSN(record.getItem('/DEMO/CUSTOMERS/NATIONAL_ID'), '/DEMO/CUSTOMERS/CUST_ID')

Argument Description
inputAttribute The attribute containing the input value to mask.
additionalAttribute The additional attribute in which all instances of the input value are masked.