Forum Discussion
PhilippeG
Nimbostratus
Oct 25, 2021Define allowed character in ASM for JSON parameter
I'm intercepting a POST with JSON parameter and I want to check the content but I'm not able to see where to define allowed character, length and type of each parameter I defined my parameters as J...
- Nov 03, 2021
Are you sure those are JSON values and not user-input values?
Do you have an OpenAPI Spec file to verify?
Since you are running on 15.1.2.1, as stated - if you have a OpenAPI Spec file can you create a policy "REST API Security (Open API Spec) " with the Guided Configuration?
KR
Daniel
Hi Nathan,
I expect this is a parsing error as the code wrapped in curly braces should force it be interpreted literally. The fact that the iRule loads initially supports the idea that the code is valid, but the parser is choking on it.
With such a long rule, it's a little difficult to spot what syntax might be causing the problem. I'd suggest breaking the iRule into smaller parts and use 'b verify load' to test. You should be able to narrow down the issue to one or more syntax formats. Even if the iRule doesn't function with the smaller pieces, it will help isolate the issue.
Aaron