Creating an action using Open API

Open API is a popular standard for writing REST APIs in JSON/XML format.

Thanks to the support of this specification, you can quickly and en masse upload actions to the WAF, saving a lot of time at the initial application training stages if ML for some reason does not work/does not have time to work out.

Algorithm for loading actions on WAF:

  1. Get in any convenient way (ELK, Postgres, Burp, manual analysis, something else) data about handles and methods in (URL METHOD) format:

image274

Figure 160 – Handle data format

  1. Sort actions in descending order so that less precise paths are at the bottom of the list.

  2. Prepare actions for loading, cutting off unnecessary paths, deleting root and other actions.

  3. “Wrap” actions in valid JSON using the template above in any convenient way, and save them to a file (see Figure 161).

image275

Figure 161 – Valid JSON

  1. Go to the “Applications” -> “Actions” -> “Business Actions” tab and click on the “Overview” field. Next, you need to specify the path to the file in JSON/XML format containing the necessary actions (see Figure 162).

image276

Figure 162 – Creating actions using Open API