IP anonymization enrichment - chuwy/snowplow-ci GitHub Wiki
HOME > SNOWPLOW SETUP GUIDE > Step 3: Setting up Enrich > Configurable enrichments > IP anonymization enrichment
JSON Schema iglu:com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-0
Compatibility 0.9.6+
The IP anonymization enrichment lets you anonymize the IP addresses found in the user_ipaddress
field by replacing a certain number of octets with "x"s. For example, anonymizing one octet would change the address 255.255.255.255
to 255.255.255.x
, and anonymizing three octets would change it to 255.x.x.x
.
{
"schema": "iglu:com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-0",
"data": {
"name": "anon_ip",
"vendor": "com.snowplowanalytics.snowplow",
"enabled": true,
"parameters": {
"anonOctets": 2
}
}
}
The anonOctets
field is set to two, so the last two octets of each IP address will be obscured.
###Data sources
The input value for the enrichment comes from ip
parameter which is mapped to user_ipaddress
field in atomic.events
table.
###Algorithm
This enrichment algorithm is straightforward. The value of anonOctets
set in JSON
indicates how many octets of the IPv4 address are to be masked with x
s starting from the last octet. The value of the ip
parameter is masked accordingly.
###Data generated
The masked (anonymized) value of the IP address will be recorded in user_ipaddress
field of atomic.events
table.