PII Redaction Methods
remove
- Remove the entire field. Relay may choose to either set it to
null
or toremove it entirely.
Copied
{
"rules": {
"remove_ip": {
"type": "ip",
"redaction": {
"method": "remove"
}
}
},
"applications": {
"$string": ["remove_ip"]
}
}
replace
- Replace the key with a static string.
Copied
{
"rules": {
"replace_ip": {
"type": "ip",
"redaction": {
"method": "replace",
"text": [censored]"
}
}
},
"applications": {
"$string": ["replace_ip"]
}
}
: Replace every character of the matched string with a "masking" char *
. Compared to replace
this preserves the length of the original string.
Copied
{
"rules": {
"mask_ip": {
"type": "ip",
"redaction": {
"method": "mask"
}
}
},
"applications": {
"$string": ["mask_ip"]
}
}
: Replace the string with a hashed version of itself. Equal strings will produce the same hash, so if you, for example, decide to hash the user ID instead of replacing or removing it, you will still have an accurate count of users affected.
Copied
{
"rules": {
"hash_ip": {
"type": "ip",
"redaction": {
"method": "hash"
}
}
}
"applications": {
"$string": ["mask_ip"]
}
}
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").