Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Trouble encrypting json data in Apigee X

I am trying to return an encrypted string as a response, replacing the original json value returned from the target server. This data will be a json structure looking like this.

 

 

 

{
    "apis": [
    {
      "resId": "nksjdna090232nnasd2092dfsdff",
      "api": "/api/v1/abc?cde=blue",
      "action": [
        "GET",
        "POST"
      ]
    },
    {
      "resId": "nksjdna090232nnasd2092dfsdff",
      "api": "/api/v1/abc?cde=green",
      "action": [
        "GET",
        "PUT",
        "POST"
      ]
    },
    {
      "resId": "nksjdna090232nnasd2092dfsdff",
      "api": "/api/v1/abc?cde=yellow",
      "action": [
        "GET",
        "PUT",
        "POST"
      ]
    }]
}

 

 

 

Question is , can I accomplish this using Key value map? If not, is there any other built in policies to do this. If both are not an option I was thinking of using JavaScript and cryptojs since I am not familiar with Java. Is it recommended ?
0 6 311
6 REPLIES 6