Skip to main content

Built-in transformations

Discover a list of the built-in transformations

Mask transformations

Vault provide these built-in mask transformations:

Data typeTransformation nameTransformed exampleDetails
EMAILmaskj**********@gmail.com
EMAIL_STRICTmaskj**********@gmail.com
SSNmask***-**-4357
BANmask*******7917
PHONE_NUMBERmask***-****-2795
ZIP_CODE_USmask123**"3-digit zip codes transform to 000
TIMESTAMPmask2024-11-08T15:**:**ZThe hour is masked
DATEmask2024-**-**The month and day are masked
DATE_OF_BIRTHmask2024-**-**The month and day are masked
NAMEmaskJ*** D**
GENDERmask**********Same for all values
ADDRESSmask*** **** *** *** ***** ** ***...
CC_NUMBERmask************9573
CC_HOLDER_NAMEmaskJ*** D**Same as NAME
CC_EXPIRATION_STRINGmask**/****
CC_CVVmask***Same for 3- and 4-digit values
US_BANK_ROUTINGmask******789
US_BANK_ACCOUNT_NUMBERmask*****6789
INTEGERmask*****Each digit transform to *
DOUBLEmask-***.**Each digit transform to *
BOOLEANmask*Same for true and false
STRINGmask**** ***
LONG_TEXTmask***** ***** ***** *** ***** *...Same as STRING
JSONmask{"first_name":"****","last_name":"***"}
URLmaskhttps://****domain.com********
BLOBmask<BLOB>Same for all values
TENANT_IDmask*****************************...Same as STRING

More transformations

Vault provide these built-in transformations:

Data typeTransformation nameTransformed example
BLOBsize1024
DATE_OF_BIRTHage35
DATE_OF_BIRTHage_frac35.8

Token transformations

Vault provides a token transformation for all built-in data types. This transformation retrieves the pci token for the property, if one exists for the default scope.

You create a token for SSN using the CLI like this:

pvault token create --props ssn --type pci --collection customers --object-id 05161167-344d-4229-b3f8-5d44daf6780f

And get a response similar to this:

+--------------------------------------+
| token_id |
+--------------------------------------+
| c37e7da2-1f87-4693-8002-e50bcc5fd9ef |
+--------------------------------------+

You can then access the token of SSN using the token transformation like this:

pvault object get --id 05161167-344d-4229-b3f8-5d44daf6780f --collection customers --props id,ssn.token

And get a response similar to this:

Displaying 1 result.
+--------------------------------------+--------------------------------------+
| id | ssn.token |
+--------------------------------------+--------------------------------------+
| c5f7f35e-b3a0-4857-8a8f-a5c83e87d488 | c37e7da2-1f87-4693-8002-e50bcc5fd9ef |
+--------------------------------------+--------------------------------------+

See Tokenize personal data for more information about tokenization.