> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/processors/redact-sensitive-data/mask-sensitive-data-deprecated.md).

# Mask Sensitive Data (Deprecated)

{% hint style="info" %}
**NOTE**

As of Bindplane v1.94.0 this processor has been deprecated and replaced by the [Redact Sensitive Data](/integrations/processors/redact-sensitive-data.md) processor. While it will continue to function, it will no longer receive any enhancements and you should migrate to Redact Sensitive Data.
{% endhint %}

### Description

The Mask Sensitive Data processor can be used to detect and mask sensitive data.

### Supported Types

| Metrics | Logs | Traces |
| ------- | ---- | ------ |
| ✓       | ✓    | ✓      |

### Configuration Table

<table><thead><tr><th width="199.23046875">Parameter</th><th width="125.31640625">Type</th><th>Default</th><th width="373.4453125">Description</th></tr></thead><tbody><tr><td>telemetry_types</td><td><code>strings</code></td><td><code>[Metrics, Logs, Traces]</code></td><td>Which types of telemetry to apply masking rules to.</td></tr><tr><td>default_rules</td><td><code>enums</code></td><td>See <a href="https://github.com/observIQ/bindplane-docs/tree/main/docs/integrations/processors/redact-sensitive-data/mask-sensitive-data.md#default-rules-values">default rules</a></td><td>Commonly used masking rules.</td></tr><tr><td>custom_rules</td><td><code>map</code></td><td>See <a href="https://github.com/observIQ/bindplane-docs/tree/main/docs/integrations/processors/redact-sensitive-data/mask-sensitive-data.md#custom-rules-values">custom rules</a></td><td>Create custom rules with the key being the rule name and the value being a regular expression to match against.</td></tr><tr><td>exclude_resource_keys</td><td><code>strings</code></td><td></td><td>A list of resource keys to exclude from masking.</td></tr><tr><td>exclude_attribute_keys</td><td><code>strings</code></td><td></td><td>A list of attribute keys to exclude from masking.</td></tr><tr><td>exclude_body_keys</td><td><code>strings</code></td><td></td><td>A list of log body keys to exclude from masking.</td></tr></tbody></table>

<mark style="color:red;">\*</mark>*<mark style="color:red;">required field</mark>*

#### Default Rules Values

* Credit Card: `\b(?:(?:(?:\d{4}[- ]?){3}\d{4}|\d{15,16}))\b`
* Date of Birth: `\b(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/(?:\d{2})?\d{2}\b`
* Email: `\b[a-zA-Z0-9._\/\+\-—|]+@[A-Za-z0-9.\-—|]+\.?[a-zA-Z|]{0,6}\b`
* International Bank Account Number (IBAN): `\b[A-Z]{2}\d{2}[A-Z\d]{1,30}\b`
* IPv4 Address: `\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b`
* IPv6 Address: `\b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b`
* MAC Address: `\b([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}\b`
* Phone Number: `\b((\+|\b)[1l][\-\. ])?\(?\b[\dOlZSB]{3,5}([\-\. ]|\) ?)[\dOlZSB]{3}[\-\. ][\dOlZSB]{4}\b`
* Social Security Number (SSN): `\b\d{3}[- ]\d{2}[- ]\d{4}\b`
* US City, State: `\b[A-Z][A-Za-z\s\.]+,\s{0,1}[A-Z]{2}\b`
* US Street Address: `\b\d+\s[A-z]+\s[A-z]+(\s[A-z]+)?\s*\d*\b`
* US Zipcode: `\b\d{5}(?:[-\s]\d{4})?\b`
* UUID/GUID: `\b[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}\b`

### Example Configuration

#### Basic Configuration

Below is an example of configuration using the defaults.

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-c4305e652451210a5ce52dbf7a9ac9e3b1c3a1ed%2Fintegrations-processors-mask-sensitive-data-image-1.png?alt=media" alt="Bindplane docs - Mask Sensitive Data - image 1"><figcaption></figcaption></figure>

**Standalone Processor**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: mask_sensitive_data
  name: mask_sensitive_data
spec:
  type: mask_sensitive_data
  parameters:
    - name: telemetry_types
      value: ['Metrics', 'Logs', 'Traces']
```

#### Custom Rules Values

Here you can add custom rules for masking. The `Key` is the name of the rule and the `Value` is the regular expression to match against.

**Example**

The default rule for Date of Birth masking would not match against a date that is separated by dashes, e.g `01-01-1990`, but we can include a stricter regular expression in the Custom Rules parameter. Here we created a rule called `birth_date_dash` with value `\b(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])-(19|20)\d{2}\b`. This will match against dates separated by dashes.

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-586c31cf428c5e369d168b7a4135e5266205c4eb%2Fintegrations-processors-mask-sensitive-data-image-2.png?alt=media" alt="Bindplane docs - Mask Sensitive Data - image 2"><figcaption></figcaption></figure>

**Standalone Processor**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: mask_sensitive_data
  name: mask_sensitive_data
spec:
  type: mask_sensitive_data
  parameters:
    - name: telemetry_types
      value: ["Metrics", "Logs", "Traces"]
    - name: custom_rules
      value:
      	birth_date_dash: \b(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])-(19|20)\d{2}\b
```

#### Exclusions

You can exclude fields from being masked based on their key by specifying excluded keys in the body, resources, or attributes respectively.

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-a7bf5e793dad89536b45b66b1130323c8135453b%2Fintegrations-processors-mask-sensitive-data-image-3.png?alt=media" alt="Bindplane docs - Mask Sensitive Data - image 3"><figcaption></figcaption></figure>

**Standalone Processor**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: mask_sensitive_data
  name: mask_sensitive_data
spec:
  type: mask_sensitive_data
  parameters:
    - name: telemetry_types
      value: ['Metrics', 'Logs', 'Traces']
    - name: exclude_resource_keys
      value: ['excluded_resource_key']
    - name: exclude_attribute_keys
      value: ['excluded_attribute_key']
    - name: exclude_body_keys
      value: ['excluded_body_key']
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/processors/redact-sensitive-data/mask-sensitive-data-deprecated.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
