Goal: Redact Sensitive Data prior to sharing.
-
This function redactSharedData will remove sensitive data and write "safe" redacted records.
-
Requires Eventing Storage (or metadata collection), a "source" collection, and a "destination" collection.
-
Will operate on all documents where doc.type === "master_profile".
-
Will create redacted documents in real-time of doc.type === "shared_profile".
-
The "destination" collection can be shared (or replicated via XCDR to a business partner) too the cloud (AWS, Azure or GCP).
-
Input Data/Mutation
-
Output Data/Mutation
INPUT: KEY master_profile::80927079070
{
"type": "master_profile",
"first_name": "Peter",
"last_name": "Chang",
"id": 80927079070,
"basic_profile": {
"partner_id": 80980221,
"services": [
{
"music": true
},
{
"games": true
},
{
"video": false
}
]
},
"sensitive_profile": {
"ssn": "111-11-1111",
"credit_card": {
"number": "3333-333-3333-3333",
"expires": "01/09",
"ccv": "111"
}
},
"address": {
"home": {
"street": "4032 Kenwood Drive",
"city": "Boston",
"zip": "02102"
},
"billing": {
"street": "541 Bronx Street",
"city": "Boston",
"zip": "02102"
}
},
"phone": {
"home": "800-555-9201",
"work": "877-123-8811",
"cell": "878-234-8171"
},
"locale": "en_US",
"timezone": -7,
"gender": "M"
}
UPDATED/OUTPUT: KEY shared_profile::80927079070
{
"type": "shared_profile",
"first_name": "Peter",
"id": 80927079070,
"basic_profile": {
"partner_id": 80980221,
"services": [
{
"music": true
},
{
"games": true
},
{
"video": false
}
]
},
"timezone": -7
}