Importing JSON schema files
JSON schema files define JSON data structure and validate JSON data contents in a JSON document. When you use JSON schema files to check JSON contents in HTTP requests, FortiWeb can determine acceptable content and validate that the content is well-formed.
To configure FortiWeb to enforce JSON schema files, create a JSON protection rule and select a JSON schema file for that rule. You can select only one JSON schema file for each JSON protection rule, but you can configure FortiWeb to enforce multiple rules in JSON protection policies.
This section provides instructions to:
- Import a JSON schema file
- Select a JSON schema file in a JSON protection rule
To import a JSON schema file
- Go to API Protection > JSON Protection.
- Select the JSON Schema tab.
- Click Create New.
- Enter a name for the JSON schema file.
- For Upload File, click Choose File.
- Select an acceptable JSON schema file.
- Click OK.
To select a JSON schema file in a JSON protection rule
For details about creating a JSON protection rule, see Creating JSON protection rules.
- Go to API Protection > JSON Protection.
- Select the JSON Protection Rule tab.
- Select an existing JSON protection rule to which you want to add the JSON schema file.
- For Schema Validation, select the JSON schema file from the drop down menu.
- Click OK.