|
| 1 | +--- |
| 2 | +title: How to mask sensitive data on Azure Web Application Firewall on Azure Front Door (preview) |
| 3 | +description: Learn how to mask sensitive data on Azure Web Application Firewall on Azure Front Door. |
| 4 | +author: vhorne |
| 5 | +ms.author: victorh |
| 6 | +ms.service: web-application-firewall |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 04/09/2024 |
| 9 | +--- |
| 10 | + |
| 11 | +# How to mask sensitive data on Azure Web Application Firewall on Azure Front Door (preview) |
| 12 | + |
| 13 | +> [!IMPORTANT] |
| 14 | +> Web Application Firewall on Azure Front Door Sensitive Data Protection is currently in PREVIEW. |
| 15 | +> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability. |
| 16 | +
|
| 17 | +The Web Application Firewall's (WAF) Log Scrubbing tool helps you remove sensitive data from your WAF logs. It works by using a rules engine that allows you to build custom rules to identify specific portions of a request that contain sensitive data. Once identified, the tool scrubs that information from your logs and replaces it with _*******_. |
| 18 | + |
| 19 | +> [!NOTE] |
| 20 | +> When you enable the log scrubbing feature, Microsoft still retains IP addresses in our internal logs to support critical security features. |
| 21 | +
|
| 22 | +The following table shows examples of log scrubbing rules that can be used to protect your sensitive data: |
| 23 | + |
| 24 | +| Match Variable | Operator | Selector | What gets scrubbed | |
| 25 | +| --- | --- | --- | --- | |
| 26 | +| Request Header Names | Equals | keytoblock | {"matchVariableName":"HeaderValue:keytoblock","matchVariableValue":"****"} | |
| 27 | +| Request Cookie Names | Equals | cookietoblock | {"matchVariableName":"CookieValue:cookietoblock","matchVariableValue":"****"} | |
| 28 | +| Request Post Arg Names | Equals | var | {"matchVariableName":"PostParamValue:var","matchVariableValue":"****"} | |
| 29 | +| Request Body JSON Arg Names | Equals | JsonValue | {"matchVariableName":"JsonValue:key","matchVariableValue":"****"} | |
| 30 | +| Query String Arg Names | Equals | foo | {"matchVariableName":"QueryParamValue:foo","matchVariableValue":"****"} | |
| 31 | +| Request IP Address* | Equals Any | NULL | {"matchVariableName":"ClientIP","matchVariableValue":"****"} | |
| 32 | +| Request URI | Equals Any | NULL | {"matchVariableName":"URI","matchVariableValue":"****"} | |
| 33 | + |
| 34 | +\* Request IP Address and Request URI rules only support the *equals any* operator and scrubs all instances of the requestor's IP address that appears in the WAF logs. |
| 35 | + |
| 36 | +For more information, see [What is Azure Web Application Firewall on Azure Front Door Sensitive Data Protection?](waf-sensitive-data-protection-frontdoor.md) |
| 37 | + |
| 38 | +## Enable Sensitive Data Protection |
| 39 | + |
| 40 | +Use the following information to enable and configure Sensitive Data Protection. |
| 41 | + |
| 42 | +### Portal |
| 43 | + |
| 44 | +To enable Sensitive Data Protection: |
| 45 | + |
| 46 | +1. Open an existing Front Door WAF policy. |
| 47 | +1. Under **Settings**, select **Sensitive data**. |
| 48 | +1. On the **Sensitive data** page, select **Enable log scrubbing**. |
| 49 | + |
| 50 | +To configure Log Scrubbing rules for Sensitive Data Protection: |
| 51 | + |
| 52 | +1. Under **Log scrubbing rules**, select a **Match variable**. |
| 53 | +1. Select an **Operator** (if applicable). |
| 54 | +1. Type a **Selector** (if applicable). |
| 55 | +1. Select **Save**. |
| 56 | + |
| 57 | +Repeat to add more rules. |
| 58 | + |
| 59 | +## Verify Sensitive Data Protection |
| 60 | + |
| 61 | +To verify your Sensitive Data Protection rules, open the Front Door firewall log and search for _******_ in place of the sensitive fields. |
| 62 | + |
| 63 | +## Next steps |
| 64 | + |
| 65 | +- [Use Log Analytics to examine Application Gateway Web Application Firewall (WAF) logs](../ag/log-analytics.md) |
0 commit comments