Mongo ObjectId Key (ObjectIdPkGenerator)
The Mongo ObjectId Key generator generates values to de-identify fields that contain MongoDB
ObjectId
values. The column value must be 12 bytes long.The ObjectId Key generator does not support linking. It can be self-consistent, but not consistent with another column. You cannot configure differential privacy.
The
metadata
object is populated from the ObjectIdPkMetadata
object. preserveTimetampAndCounter
indicates whether to only change the random value portion of the identifier, but keep the timestamp and incremented counter portions.There is no generator-specific configuration.
{
"presetId": "string",
"generatorId": "ObjectIdPkGenerator",
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string", //MongoDB only
"metadata": {
"isConsistent": false,
"preserveTimestampAndCounter": false
},
"encryptionProcessor": "x-on", //To use configured Tonic data encryption
"customValueProcessor": "string" //If custom value processor applied
}
In the following example replacement for the Mongo ObjectId Key generator, consistency is disabled. Only the random value portion of the identifier is changed.
{
"name": "userid",
"schema": "public",
"table": "users",
"links": [
{
"presetId": "ObjectIdPkGenerator",
"generatorId": "ObjectIdPkGenerator",
"schema": "public",
"table": "users",
"column": "user_id",
"dataType": "ObjectId",
"metadata": {
"isConsistent": false,
"preserveTimestampAndCounter": true
}
}
]
}
Last modified 1mo ago