Use regex-replace-attributes
to specify a regex to search for
attributes in a request or response body and replace their values with a regex replacement
string.
Applicable to |
All, although you cannot apply the Regex Replace Attributes advice directly to a System for Cross-domain Identity Management (SCIM) search. |
||||||||||
Additional information |
The payload for this advice is either a JSON object or an array of JSON objects. Each
object represents a single replacement operation and has up to four
keys.
PingDataGovernance replaces any portion of the attribute value that matches the regular
expression in the The regular expression and replacement string must be valid as described in the API documentation for the java.util.regex.Pattern class, including support for capture groups. |
{
"id":5,
"username":"jsmith",
"description":"Has a registered ID number of '123-45-6789'.",
"secrets":{
"description":"Has an SSN of '987-65-4321."
}
}
{
"path":"$.secrets",
"regex":"(\\\\d{3}-\\\\d{2})-\\\\d{4}",
"replace":"$1-XXXX"
}
"secrets.description"
value.{
"id":5,
"username":"jsmith",
"description":"Has a registered ID number of '123-45-6789'.",
"secrets":{
"description":"Has an SSN of '987-65-XXXX."
}
}