Mask Emails in Logs with Edge Delta
2 minute read
Overview
The Mask node obfuscates sensitive information within log data to help meet data protection and privacy regulations without affecting the utility of logs for monitoring and analysis. By using regex patterns to identify which data to mask and replacing it with asterisks or custom strings, the mask node ensures that logs can be shared or analyzed without exposing sensitive information. For instance, consider a tool with logs that regularly contain user emails. While not as sensitive as passwords or personal identification numbers, user emails still constitute personal information that should be protected to comply with privacy laws like the General Data Protection Regulation (GDPR) in the EU or the California Consumer Privacy Act (CCPA). In this example, a mask node is set up in the observability pipeline to match and obfuscate email addresses in the logs, before the logs are stored or further transmitted.
Prerequisites
To obfuscate data in logs using a mask node you need an Edge Delta account with a Pipeline configuration already created. This is the configuration in which you will create the node.
Create a Mask Node
- In the Edge Delta App, click Pipelines.
- Click the pipeline you want to add the mask node to.
- Click View/Edit Pipeline.
- Click Edit Mode.
- Click Add Processor, expand Transformations and select Mask.
- Specify a Name for the node.
- Enter a Mask String which will replace any emails.
- Enter a pattern in the Pattern field, for example
\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b
- Click Save Changes
- Connect the mask node to an upstream node and a downstream node.
- Click Review Changes.
- Click Save Changes.
Logs passing through the mask node that contain email addresses will now be obfuscated.