# Create a DLP Policy

### Overview

This guide provides instructions on creating and editing a Data Loss Prevention (DLP) policy. Define a new policy by specifying a name, description, and selecting a predefined data pattern. US-PII Data Pattern. Configure actions for detected data, review settings, and save the policy.

<figure><img src="https://1733114811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lclpq021Ai9jH1_X4gO%2Fuploads%2F4HN2XyW2W4lPESWEOn3v%2F25-03-2025-11-29-10.png?alt=media&#x26;token=d9265ebe-b067-4b0c-800d-434846bb0884" alt="" width="563"><figcaption></figcaption></figure>

***

### **Creating a New DLP Policy**

Click the **Create New Policy** button located in the top right of the screen to access the **Create New Policy** menu.

<figure><img src="https://1733114811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lclpq021Ai9jH1_X4gO%2Fuploads%2FSRZO5f2RpiFfqdGOa1B4%2F25-03-2025-11-31-44.png?alt=media&#x26;token=c670042d-ed38-4b09-a95e-730e74d35907" alt="" width="563"><figcaption></figcaption></figure>

Enter a **name** and **description** for the policy, then click **Next**.

<figure><img src="https://1733114811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lclpq021Ai9jH1_X4gO%2Fuploads%2FLM8RidO0iOP63yFK8KvH%2F02-09-2025-02-00-22.png?alt=media&#x26;token=db177fb7-d940-42ab-a831-ae55ea00a0f3" alt="" width="563"><figcaption></figcaption></figure>

In the next step, select a **data pattern** from the list.&#x20;

| US - PII Data Pattern                                                                                                                                                                                                             | US - Financial Data Patterns                                                                                                   | Custom                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p></p><ul><li>US Social Security Number (SSN)</li><li>US Passport Number</li><li>US Driver’s License Number</li><li>US Taxpayer Identification Number (ITIN)</li><li>US Bank Account Number</li><li>Credit Card Number</li></ul> | <p></p><ul><li> US Taxpayer Identification Number (ITIN)</li><li> US Bank Account Number</li><li> Credit Card Number</li></ul> | <p></p><ul><li>Enter Regular Expressions</li><li>Max 5 regular expressions allowed. One expression per line.</li><li>For more information, click <a href="https://guides.mangoapps.com/admin-guide/compliance/dlp-policies/create-a-dlp-policy#q.-how-do-i-define-a-custom-pattern-for-specific-data-types-like-a-us-passport-number-or-ssn">here</a>.</li></ul> |

In the **Action** section, select checkboxes to define the response when a match is found, then click **Next**.

This action will always populate to the **Matches Log**.

In the final section, review the information entered in Steps 1 and 2. To make edits, click **Edit** next to the relevant field or use the **Back** button to return to a previous step.

<figure><img src="https://1733114811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lclpq021Ai9jH1_X4gO%2Fuploads%2F0rtnJpHLDInW27vA9wg4%2F25-03-2025-11-59-28.png?alt=media&#x26;token=12b1aee5-00cb-425f-b9f7-76abdec94fa7" alt="" width="563"><figcaption></figcaption></figure>

Once everything is correct, click **Save Policy** to save and activate the new policy.

***

### **FAQ**

#### **Q. How do I define a custom pattern for specific data types like a US Passport Number or SSN?**

A. To create a custom DLP pattern, use **regular expressions (regex)** to match the specific format of the data you want to detect.

**Example: US Passport Number**

US passport numbers are **9-character alphanumeric codes** (uppercase letters and numbers only). Use the following regex pattern to detect them:

```
\b[0-9A-Z]{9}\b
```

**Explanation:**

* `\b` ensures the number is a separate word.
* `[0-9A-Z]` matches any **digit (0-9) or uppercase letter (A-Z)**.
* `{9}` specifies **exactly 9 characters**.

***

**Example: US Social Security Number (SSN)**

US SSNs follow the **XXX-XX-XXXX** format. Use this regex pattern:

```
\d{3}-\d{2}-\d{4}
```

**Explanation:**

* `\d{3}` matches **three digits**.
* `-` matches the **hyphen separator**.
* `\d{2}` matches **two digits**.
* Another `-` matches the second hyphen.
* `\d{4}` matches **four digits**.

You can test these patterns using tools like **Rubular**, which allows you to verify that your regex correctly identifies the intended data.
