webMethods API Gateway Q&A - Masking sensitive data in the payload in JSON Array

Product/components used and version/fix level:

Version: 10.7 and above
Operating System Family: ZS
Operating System: Hosted Software

Detailed explanation of the problem:

In the following example, how to mask all the ‘id’ parameter values from response payload?

{ 
"stages": [ 
{ 
"id": "92ab2d05-9f1a-4521-a7cc-64fb57dced52", 
"name": "aaaaaaaaaaaa", 
"description": "aaaaaaaaaaaan", 
"url": "http://aaaaaaaaaaaa.com", 
"password": "********************************" 
}, 
{ 
"id": "04d38ee6-af62-4c6a-bc7c-59b04aef1556", 
"name": "aaaaaaaaaaaa", 
"description": "aaaaaaaaaaaa", 
"url": "http://aaaaaaaaaaaa.com", 
"password": "********************************" 
} 
] 
} 

Use Response Processing > “Data Masking” policy with the following Query expression

Query Expression: $.stages[*].id
Masking Type: Mask
Mask Value: ****

1 Like