IP anonymization enrichment
This enrichment replaces the end of the user's IP address with "x"s, on a configurable length. The user IP is tracked in the user_ipaddress field of the atomic event.
For example, anonymizing one IPv4 octet would change an address of 255.255.255.255 to 255.255.255.x, and anonymizing three octets would change it to 255.x.x.x.
Both IPv4 and IPv6 are supported.
This enrichment runs after the IP lookup enrichment.
Configuration
The enrichment takes these parameters:
| Parameter | Required | Description |
|---|---|---|
anonOctets | ✅ | Number of IPv4 octets to anonymize. |
anonSegments | ❌ | Number of IPv6 segments to anonymize. |
- Console
- Self-Hosted
Configure the parameters in the Console enrichment editor. For example:
{
"anonOctets": 1,
"anonSegments": 1
}
For Self-Hosted, provide a complete JSON. For example:
{
"schema": "iglu:com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-1",
"data": {
"name": "anon_ip",
"vendor": "com.snowplowanalytics.snowplow",
"enabled": true,
"parameters": {
"anonOctets": 1,
"anonSegments": 1
}
}
}
Unsure if your enrichment configuration is correct or works as expected? You can easily test it using Snowplow Micro, either through Console or on your machine.
Output
The anonymized value of the IP address is updated in-place in the user_ipaddress field, before ever being stored.