|
|
The Schema Validation policy only supports REST APIs and currently only supports OpenAPI Specification 3.0 (OAS3) schema validations.
|
|
|
The Schema Validation policy supports a maximum of 64 bits for the number schema data type.
|
Applications processing REST API requests are susceptible to attacks such as header injection and payload injection. Additional vulnerabilities can lead to the access of sensitive information. The Schema Validation policy protects against such attacks and vulnerabilities by validating traffic against a supplied API specification.
There are many ways to upload REST API specifications, but using Exchange is the easiest way. To upload an API specification to Exchange, see Create an Exchange Asset.
Omni Gateway supports schemas defined in JSON or YAML, contained in a single file.
The Schema Validation policy validates request headers, queries, or path parameters.
Requests only include support for JSON format with content type application/json.
You configure the policy to perform one of the following actions:
-
Block the request, and then return the 400 error status code.
-
Allow the request, log the error, and then return the status code of the request.
You can validate content against:
-
The presence of all required properties.
-
The presence or absence of additional properties.
-
The types of all properties.
For example, if a schema specifies a property as an integer, the request must include an integer and not another type, such as a string.
-
The format of the properties.
For example, if the pattern keyword is specified, the policy validates the property as a regular expression.