GuideReference
TrainingSupportCommunity
Reference

input_​validation

  • Property Manager name: Input Validation Cloudlet
  • Behavior version: The v2023-01-05 rule format supports the input_​validation behavior v1.5.
  • Rule format status: GA, stable
  • Access: Read/Write
  • Allowed in includes: No (temporarily)

The Input Validation Cloudlet detects anomalous edge requests and helps mitigate repeated invalid requests. You can configure it using either the Cloudlets Policy Manager application, available within Control Center under Your services <> Edge logic Cloudlets, or the Cloudlets API.

Use this behavior to specify criteria that identifies each unique end user, and optionally supplement the Input Validation policy with additional criteria your origin uses to identify invalid requests. Specify the threshold number of invalid requests that triggers a penalty, and the subsequent response. Also specify an ordinary failure response for those who have not yet met the threshold, which should not conflict with any other behavior that defines a failure response.

OptionTypeDescriptionRequires
enabledboolean

Applies the Input Validation Cloudlet behavior.

{"displayType":"boolean","tag":"input","type":"checkbox"}
cloudlet_​policyobject

Identifies the Cloudlet policy.

{"displayType":"object","tag":"input","todo":true}
{"if":{"attribute":"enabled","op":"eq","value":true}}
cloudlet_​policy.idnumber

Identifies the Cloudlet.

cloudlet_​policy.namestring

The Cloudlet's descriptive name.

labelstring

Distinguishes this Input Validation policy from any others within the same property.

{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
user_​identification_​by_​ipboolean

When enabled, identifies users by specific IP address. Do not enable this if you are concerned about DDo​S attacks from many different IP addresses.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
user_​identification_​by_​headersboolean

When enabled, identifies users by specific HTTP headers on GET or POST requests.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
user_​identification_​key_​headersstring array

This specifies the HTTP headers whose combined set of values identify each end user.

user_​identification_​by_​headers is true
{"displayType":"string array","tag":"input","todo":true}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"userIdentificationByHeaders","op":"eq","value":true}]}}
user_​identification_​by_​paramsboolean

When enabled, identifies users by specific query parameters on GET or POST requests.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
user_​identification_​key_​paramsstring array

This specifies the query parameters whose combined set of values identify each end user.

user_​identification_​by_​params is true
{"displayType":"string array","tag":"input","todo":true}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"userIdentificationByParams","op":"eq","value":true}]}}
allow_​large_​post_​bodyboolean

Fails POST request bodies that exceed 16 KB when enabled, otherwise allows them to pass with no validation for policy compliance.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
reset_​on_​validboolean

Upon receiving a valid request, enabling this resets the penalty_​threshold counter to zero. Otherwise, even those series of invalid requests that are interrupted by valid requests may trigger the penalty_​action.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
validate_​on_​origin_​withenum

For any validation that edge servers can't perform alone, this specifies additional validation steps based on how the origin identifies an invalid request. If a request is invalid, the origin can indicate this to the edge server.

{"displayType":"enum","options":["DISABLED","RESPONSE_CODE","RESPONSE_CODE_AND_HEADER"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
DISABLED

Specify if no additional validation is necessary.

RESPONSE_​CODE

Use a response code.

RESPONSE_​CODE_​AND_​HEADER

Use a response code and header.

validate_​on_​origin_​header_​namestring

If validate_​on_​origin_​with is set to RESPONSE_​CODE_​AND_​HEADER, this specifies the header name for a request that the origin identifies as invalid.

validate_​on_​origin_​with is RESPONSE_​CODE_​AND_​HEADER
{"displayType":"string","tag":"input","type":"text"}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"validateOnOriginWith","op":"eq","value":"RESPONSE_CODE_AND_HEADER"}]}}
validate_​on_​origin_​header_​valuestring

If validate_​on_​origin_​with is set to RESPONSE_​CODE_​AND_​HEADER, this specifies an invalid request's header value that corresponds to the validate_​on_​origin_​header_​name.

validate_​on_​origin_​with is RESPONSE_​CODE_​AND_​HEADER
{"displayType":"string","tag":"input","type":"text"}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"validateOnOriginWith","op":"eq","value":"RESPONSE_CODE_AND_HEADER"}]}}
validate_​on_​origin_​response_​codenumber

Unless validate_​on_​origin_​with is DISABLED, this identifies the integer response code for requests the origin identifies as invalid.

validate_​on_​origin_​with is either: RESPONSE_​CODE, RESPONSE_​CODE_​AND_​HEADER
{"displayType":"number","tag":"input","type":"number"}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"validateOnOriginWith","op":"in","value":["RESPONSE_CODE","RESPONSE_CODE_AND_HEADER"]}]}}
failure302Uristring

Specifies the redirect link for invalid requests that have not yet triggered a penalty.

{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
penalty_​thresholdnumber

Specifies the number of invalid requests permitted before executing the penalty_​action.

{"displayType":"number","tag":"input","type":"number"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
penalty_​actionenum

Once the penalty_​threshold of invalid requests is met, this specifies the response.

{"displayType":"enum","options":["REDIRECT_302","BLANK_403","BRANDED_403"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
REDIRECT_302

A 302 redirect response.

BLANK_403

A 403 response with no body content.

BRANDED_403

A custom 403 response.

penalty302Uristring

Specifies the redirect link for end users who trigger the penalty.

penalty_​action is REDIRECT_302
{"displayType":"string","tag":"input","type":"text"}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"penaltyAction","op":"eq","value":"REDIRECT_302"}]}}
penalty_​net_​storageobject

Specifies the Net​Storage account that serves out the penalty's static 403 response content. Details appear in an object featuring a download​Domain​Name string member that identifies the Net​Storage hostname, and an integer cp​Code to track the traffic.

penalty_​action is BRANDED_403
{"displayType":"object","tag":"input","todo":true}
{"if":{"attribute":"penaltyAction","op":"eq","value":"BRANDED_403"}}
penalty_​net_​storage.cp​Code​Listarray

A set of CP codes that apply to this storage group.

penalty_​net_​storage.download​Domain​Namestring

Domain name from which content can be downloaded.

penalty_​net_​storage.idnumber

Unique identifier for the storage group.

penalty_​net_​storage.namestring

Name of the storage group.

penalty_​net_​storage.upload​Domain​Namestring

Domain name used to upload content.

penalty403net_​storage_​pathstring

Specifies the full path to the static 403 response content relative to the download​Domain​Name in the penalty_​net_​storage object.

penalty_​action is BRANDED_403
{"displayType":"string","tag":"input","type":"text"}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"penaltyAction","op":"eq","value":"BRANDED_403"}]}}
penalty_​branded_​deny_​cache_​ttlnumber (5-30)

Specifies the penalty response's time to live in the cache, 5 minutes by default.

penalty_​action is BRANDED_403
{"displayType":"number","max":[30],"min":[5],"tag":"input","type":"range"}
{"if":{"op":"and","params":[{"attribute":"enabled","op":"eq","value":true},{"attribute":"penaltyAction","op":"eq","value":"BRANDED_403"}]}}