forked from lendly-telus-com/GSP-LC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProtect Sensitive Data with Data Loss Prevention: Challenge Lab ARC116
More file actions
54 lines (37 loc) 路 1.53 KB
/
Copy pathProtect Sensitive Data with Data Loss Prevention: Challenge Lab ARC116
File metadata and controls
54 lines (37 loc) 路 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
------------------------------------------------------------------------------------------------------------------------------------------------------------------
export BUCKET_NAME=
cat > redact-request.json <<EOF
{
"item": {
"value": "Please update my records with the following information:\n Email address: foo@example.com,\nNational Provider Identifier: 1245319599"
},
"deidentifyConfig": {
"infoTypeTransformations": {
"transformations": [{
"primitiveTransformation": {
"replaceWithInfoTypeConfig": {}
}
}]
}
},
"inspectConfig": {
"infoTypes": [{
"name": "EMAIL_ADDRESS"
},
{
"name": "US_HEALTHCARE_NPI"
}
]
}
}
EOF
curl -s \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
https://dlp.googleapis.com/v2/projects/$DEVSHELL_PROJECT_ID/content:deidentify \
-d @redact-request.json -o redact-response.txt
gsutil cp redact-response.txt gs://$BUCKET_NAME
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Congratulations, you're all done with the lab 馃槃 Don't forget to subscribe our YouTube Channel馃槃
Thank You!!!!
-------------------------------------------------------------------------------------------------------------------------------------------------------------------