request/response is not remained masked when assigned to new variable using Assign message

I have masked the request.content and response.content using below

{

"jSONPathsRequest": ["ccNum","ccExpiry","CVV"],

"jSONPathsResponse":["ccNum","ccExpiry","CVV"],

"name": "default",

"xPathsRequest": ["//ccNum","//ccExpiry","//CVV"],

"xPathsResponse":["//ccNum","//ccExpiry","//CVV"],

"variables": ["ccNum","ccExpiry","CVV"],

}

but when i assigned the response.content to new variable named creditcardrequest.content then the values of masked parameters are getting printed in trace log in new variable.

Please help with policy or stargegy to achived the masking in new varible

0 2 47
2 REPLIES 2

Not applicable

Try using

private.creditcardrequest.content

In place of

creditcardrequest.content

What you are observing is expected behavior.

the jSONPathsRequest and xPathsRequest etc. in the datamasking configuration... these apply to the variables "request" and "response". If you assign to some other variable , those mask configurations do not apply.

If you want to mask the entire variable, you can do that by including it in the "variables" list in the datamask configuration. See this question from yesterday.