Forum Discussion
iRule to Restrict access based on JSON Parameter Value
Hi all,
I need to restrict access to the application based on the values of two JSON parameters in payload of POST request.
My JSON looks similar to spinet below:
{
"parameter1":null,
"parameter2":"stringX",
"contentType":"application/json",
"parameter3":"stringY",
"timeStamp":"{{todayDate}}",
My goal is to allow request to be forwarded to the pool only when "parameter2" equals "stringX" and "parameter3" equals "stringY". In all other cases I need to RST the connection.
I only have LTM (v13.1) at my disposition.
Had anyone successfully accomplished similar with iRule? Any help greatly appreciated.
Thanks.
- NUT2889Cirrostratus
Hi,
From my perspective. In case you need iRule to inspect HTTP payload. It will impact system performance. Because iRule should be collect & scan HTTP payload.
I'm not sure for your application can be change from validate JSON by validate HTTP header / HTTP cookie instead.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com