---
title: "Data Loss Prevention (DLP) | Speedscale Docs"
description: "How Speedscale finds sensitive data in API traffic and masks it in your cluster before it reaches Speedscale cloud."
canonical: "https://docs.speedscale.com/guides/dlp/"
---

[Documentation index](https://docs.speedscale.com/guides/llms.txt) | [Markdown](https://docs.speedscale.com/guides/dlp/index.md) | [Canonical page](https://docs.speedscale.com/guides/dlp/)

# Data Loss Prevention (DLP)

Speedscale DLP masks sensitive data in captured API traffic before it leaves your infrastructure. The forwarder in your cluster applies a DLP rule to every request and response it captures, so names, card numbers, tokens and other sensitive values reach Speedscale cloud only as `REDACTED-` tokens. No application changes are needed.

DLP helps you keep personal and payment data out of Speedscale storage for regulations such as GDPR, HIPAA and PCI DSS. See [Data Protection](https://docs.speedscale.com/security/data_protection/) for how Speedscale handles the data it does receive.

Enterprise Data Deletion

If sensitive data reaches Speedscale cloud by mistake, Enterprise customers can request its deletion. The deletion SLA depends on your support level. Contact your Speedscale account representative or support team.

<a id="how-a-rule-masks-data"></a>

## How a Rule Masks Data

A DLP rule masks data in two ways, and one rule can use both:

*   **Field names to mask.** A list of field and header names. Each name is masked wherever it appears in HTTP traffic: any depth of a JSON body, form fields, query parameters and headers. One name covers every place the field appears.
*   **Transform chains.** A chain selects one location, such as a field in the body of one endpoint, and replaces its value. Use a chain for a field whose name is too common to mask everywhere, for a replacement other than a hash, or for traffic other than HTTP.

Field names, and the `dlp_field` transform at the end of a chain, replace each value with `REDACTED-<hash>`. The same input always produces the same hash, so distinct values stay distinct and replays and mocks can still match on them. See [Creating DLP Rules](https://docs.speedscale.com/guides/dlp/creating-rules/) for both methods.

<a id="workflow"></a>

## Workflow

1.  [Discover sensitive data](https://docs.speedscale.com/guides/dlp/discovering-pii/) in a snapshot from a test environment, and review the [DLP recommendations](https://docs.speedscale.com/guides/dlp/recommendations/) Speedscale proposes.
2.  [Create a DLP rule](https://docs.speedscale.com/guides/dlp/creating-rules/) from those recommendations, from field names you list, or both.
3.  [Apply the rule](https://docs.speedscale.com/guides/dlp/applying-rules/) to a test forwarder, check a snapshot, then apply it to production.
4.  If several teams share one forwarder, give each its own [group rule](https://docs.speedscale.com/guides/dlp/group-rules/).
5.  [Generate test data](https://docs.speedscale.com/guides/dlp/test-data-generation/) to replace `REDACTED-` tokens before replaying production traffic.

When something does not mask as expected, see [Troubleshooting](https://docs.speedscale.com/guides/dlp/troubleshooting/). To manage rules from the command line, see the [speedctl DLP CLI reference](https://docs.speedscale.com/guides/dlp/cli-reference/). To author and test rules against local recordings, see [proxymock local DLP rules](https://docs.speedscale.com/proxymock/guides/local-rules/).

<a id="terms"></a>

## Terms

*   **DLP rule**: A named document (`DLPConfig`) holding the field names to mask, transform chains and settings. Rules are listed under **DLP Rules** in the dashboard.
*   **Forwarder**: The Speedscale component in your cluster that applies DLP and sends captured traffic to Speedscale cloud.
*   **Baseline rule**: The rule a forwarder applies to all captured traffic, named by its `SPEEDSCALE_DLP_CONFIG` setting. See [The baseline rule](https://docs.speedscale.com/guides/dlp/group-rules/#the-baseline-rule-and-speedscale_dlp_config).
*   **Group rule**: A rule scoped to the namespaces and services one group owns, applied on top of the baseline.
*   **RRPair**: One captured request and its response, the unit DLP masks.
*   **`REDACTED-` token**: The value that replaces masked data.
*   **Snapshot**: A captured set of RRPairs, used to review findings and check that masking works.
