Layer7 API Management

Expand all | Collapse all

Data Masking

Jump to Best Answer
  • 1.  Data Masking

    Posted 05-15-2017 06:24 AM



    There is a requirement to mask the PII data before logging the response from the backend API. Can I write some custom code or use any policy to mask data? Please guide.



  • 2.  Re: Data Masking
    Best Answer

    Posted 05-15-2017 06:26 PM

    Good afternoon,


    You may want to look at Audit Message Filter (AMF) Policy outlined here in the documentation to mask the data being logged. Internal Use Policies - CA API Gateway - 9.2 - CA Technologies Documentation 




    Stephen Hughes

    Director, CA Support

  • 3.  Re: Data Masking

    Posted 05-17-2017 01:08 AM

    Hi Stephen,

    Thanks for the response.


    We have verified the AMF policy, in that we are able to encode the complete response before logging it.

    Do we have the option to selectively mask a part of the response? Can I write a Java Script to do it?

    For example, in a JSON response, we would like to mask the data of a field called phone-number to XXXXX.



  • 4.  Re: Data Masking

    Posted 05-20-2017 03:34 PM

    You should be able to add in regular expressions and such to convert the values to whatever text you like.




    Stephen Hughes

    Director, CA Support