block
, allow
, captcha
, handshake
, or tag
. If you use multiple actions in a single rule, the API will return an error.Description of the properties
Field | Description | Values | Details |
---|---|---|---|
name | Rule name | Can contain only ASCII letters, numbers, spaces, periods, and colons. | |
action | The action to execute when a condition is true. |
| On tag action, the tag field should be provided.For the block action, setting up the status_code (integer) and action_duration (time in seconds) is optional. By default, the status is set to "status_code": 403 , and duration equals to 0s . |
source | The condition part of the rule. | Can reference namespace objects: request, whois, session, response, tags, user_agent, client_data, as well as use data and functions. Supported Python operand syntax: and, or, in, not, ==, !=, >, <, etc. Supported CEL operand syntax: ||, && | Every string value should be enclosed in single quotation marks ' and not in double quotation marks " . |
enabled | Whether or not the rule is enabled. | Boolean: true or false | Default value: false |
description | A string to describe the purpose of the rule. | Any string. The character limit for the description field is 100 characters. | Default value: false |
phase | The request processing phase. |
| Default value: access |
block
action triggers, WAAP will tag matching requests with the penalty
tag as long as the block
action is active.
To ensure the blocking of specific sources, you must also check for thepenalty
tag by defining a separate rule that blocks requests with the penalty
tag or by including the tag check as part of a rule’s source
condition.
penalty
tag. This ensures block
actions triggered by any rule will be enforced.
Creating a separate rule for the penalty
tag is useful when you have exhausted the 5 tags limit in a single rule.