I am working on developing PII de identification application using data leak prevention(GCP). I am using de identification template for the de-identification rules.
Issue: I am not able to figure out about using custom info types in the deidentification template.
Here is a sample deidentification template:
{
"deidentifyTemplate":{
"displayName":"Email and id masker",
"description":"De-identifies emails and ids with a series of asterisks.",
"deidentifyConfig":{
"infoTypeTransformations":{
"transformations":[
{
"infoTypes":[
{
"name":"EMAIL_ADDRESS"
}
],
"primitiveTransformation":{
"characterMaskConfig":{
"maskingCharacter":"*"
}
}
}
]
}
}
}
}
In the above example, it a bultin info type(email) and in documentation custom info type snippet is like below:
"inspect_config":{
"custom_info_types":[
{
"info_type":{
"name":"CUSTOM_ID"
},
"regex":{
"pattern":"[1-9]{2}-[1-9]{4}"
},
"likelihood":"POSSIBLE"
}
]
}
There is not a valid object definition for inspect_config
in rest documentation of deidentification template, its only valid in inspection template.
Is it possible to use custom info types in de identification template(infoTypeTransformations
)?
Here is the link for rest documentation.
We can use custom info types in
deidentification
template usingstored
info types.We can create
stored
info type using API calls and thatstored
info type can be referenced like a built-in info type.Creating stored info type
How to reference stored infotype
stored_info_type_id
in deidentification template for the operation: