ModSecurity allows us to use different request body processors (e.g. for XML or JSON). My question is, is it possible to first decode a body that holds a base64 encoded string
eyJuYW1lIjoiSm9obiIsICJhZ2UiOjI1fQ==
which translates to
{"name":"John", "age":25}
and after that use requestBodyProcessor=JSON
?
I tried different rules with transformations and so on, but couldn't get it to work.
Unfortunately, this isn't possible, because:
There IS a way how to achieve what you need but it's a little complex and not backward compatible with existing rules using parsed JSON data. You can do this: