Filter Sensitive Data with the .NET Agent
By default, the .NET Agent sends transaction data to the Controller that your organization may classify as privileged information. Although this data is useful for diagnosis and troubleshooting, security considerations may require you to filter certain information from view in the Controller. You can use sensitive data filters to exclude environment variables or URLs in the Controller or information in snapshot details.
Sensitive Data Filters are available for the .NET Windows and Linux Agents (as of 21.4).
Add a Sensitive Data Filter
To instrument sensitive data filters, you edit the .NET Agent configuration file. See Administer the .NET Agent.
DB_USER is obfuscated and replaced with an asterisk in the Controller.
Example config.xml file:
</sensitive-data-filters>
<sensitive-data-filter applies-to="environment-variables,system-properties" match-type="STARTSWITH" match-pattern="DB_"/>
</sensitive-data-filters>
Example config.json file:
sensitive-data-filters: [
{
"applies-to": "environment-variables, system-properties",
"match-type": "STARTSWITH",
"match-pattern": "DB_"
}
]
Add a Sensitive URL Filter
You can use sensitive URL filters to configure the agent to obfuscate sensitive information in the URLs in the Controller.
To instrument sensitive URL filters, you edit the .NET Agent configuration file. See Administer the .NET Agent.
myapp".
<!-- Filter URL/URI segments and query parameters -->
<sensitive-url-filters>
<sensitive-url-filter delimiter="/"
segment="2"
match-filter="CONTAINS"
match-pattern="myapp"
param-pattern="[a-z]+"/>
</sensitive-url-filters>
The exit call to https://myapp.example.com/sensitive/data?first_name=abc&last_name=xyz breaks down to three segments:
"https://myapp.example.com""sensitive""data?first_name=abc&last_name=xyz"
Add a Sensitive Message Filter
You can use the sensitive-message-filters element to obfuscate sensitive information contained within text messages collected from exception messages.
match-pattern contains "Sensitive".
<sensitive-message-filters>
<sensitive-message-filter message-type="all"
match-type="CONTAINS"
match-pattern="Sensitive"
redaction-regex="[0-9]+"/>
</sensitive-message-filters>