wallarm/api-firewall

More detailed information in the logs for the event 'Shadow API: undefined parameters found'

0x566164696D opened this issue · 1 comments

The current logs lack sufficient detail to identify which parameters are undefined, where they are passed, and what data type they contain. This lack of information makes it inconvenient to work with such events.

I'll improve the information output as per your request. I suggest specifying:

  • Request method
  • Parameter name
  • Data type
  • Indication of where this parameter is passed (e.g., query, body)

This will provide more clarity and make it easier to work with such events.

Examples of current entries:

message:{"errors":[{"Input":null,"Parameters":["user_data"],"RequestBody":null,"Err":}}],
"host":"api.example.com","level":"error",
"msg":"Shadow API: undefined parameters found","path":"/v1/foo/bar",
"request_id":"c07ab637-158c-4fc8-ad2d-eb45a9459514","time":"2024-03-14T13:01:31Z"},

message:{"errors":[{"Input":null,"Parameters":["limit","no_wait","exclude_expired"],"RequestBody":null,"Err":{}}],
"host":"api.example.com","level":"error",
"msg":"Shadow API: undefined parameters found","path":"/v4/rules/export/events",
"request_id":"7f0eefdb-0f59-4b3d-b754-77fa2dcb7619","time":"2024-03-14T13:00:39Z"},

Will add additional info in the APIFW v0.7.0.