Does JsonThreatProtection & RegEx policy work for Base64 encoded payload?

Hi,

I am implementing HATEOAS. My GET returns two links to PUT with payload encoded Base64. Now if the PUT triggered with that content then how apigee JsonThreatProtection & RegEx Policy work on the payload.

What is the best strategy I can consider.

Thanks In Advance!

-Krish

Solved Solved
0 2 326
1 ACCEPTED SOLUTION

JsonThreatProtection works on unencoded JSON payloads.

if you have JSON that is base64-encoded, then JsonThreatProtection will not work to analyze that. You will have to base64 decode it first.

RegEx works on strings. If your payload is base64-encoded, then the RegEx threat protection isn't going to be much help. you will need to decode it into a string before applying the regex test on it.

Does this help?

View solution in original post

2 REPLIES 2

JsonThreatProtection works on unencoded JSON payloads.

if you have JSON that is base64-encoded, then JsonThreatProtection will not work to analyze that. You will have to base64 decode it first.

RegEx works on strings. If your payload is base64-encoded, then the RegEx threat protection isn't going to be much help. you will need to decode it into a string before applying the regex test on it.

Does this help?

Yup. Thank you @Dino