Securing Sensitive Data Using Cloud Data Loss Prevention API - Custom InfoType

Lab Details:

  1. This lab walks you through Cloud DLP API.

  2. You will create Inspect Template using Custom Info-Types and Create a Job to test it.

  3. Region: us-central1 

  4. Duration: 45 minutes

Note: Do not refresh the page after you click Start Lab, wait for up to 45 seconds to get the credentials.
In case while login into Google, if it asks for verification, please enter your mobile number and verify with OTP, Don't worry this Google Account will be deleted after the lab.

What is Cloud DLP?

GCP Data Loss Prevention API, a SAAS (Software as a Service) helps you to de-identify and protect sensitive figures. It reduces the potential risk and takes informed decisions to prevent data loss. DLP API uses informationTypes also known as infoTypes which determine the sensitive content.
Let's say the end-user enters personal information like email address, credit card details, and password in an application. These are known as built-in infoTypes which we use in DLP API. To avoid threats, we can choose the DLP API to mask the data. There are multiple ways to implement this -

  • Inspect  - which predicts that the given information contains sensitive information. Example: CC number - 4111-8888-8888-8118
  • Mask - In order to hide this sensitive content, DLP API will mask each instance of data with some special character. Example: CC number - ####-####-####-####
  • Replace - Replacing the data using a predetermined key i.e. replace the text with a fixed string value. Example: CC number - [CreditCardNumber]
  • Redact - Hiding the sensitive content completely. Example: CC number -

What are Regex Patterns:

A Regular Expression is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings, or string matching. Regular expressions are a generalized way to match patterns with sequences of characters. For example, the pattern used in this lab [1-9]{3}-[1-9]{1}-[1-9]{5}  will match the strings/patterns which have the digits 1 to 9 for 3 times, followed by a dash (-), followed by digits 1 to 9 for 1 time, followed by a dash (-), followed by digits 1 to 9 for 5 times. For Instance, 123-4-56789 is the string that matches the pattern, on the contrary, 122-0-21010 is the string that doesn't match the pattern.

Lab Tasks:

  1. Create a stored InfoType.

  2. Creating a Bucket and uploading a CSV File for identification.

  3. Creating and Testing the Job.



Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses

Open Console