Updated on 2024-03-14 GMT+08:00

Condition Field Description

When setting a CC attack, precise access, or global whitelist protection rule, there are some fields in the Condition List or Trigger area. These fields together are used to define the request attributes to trigger the rule. This topic describes the fields that you can specify in conditions to trigger a rule.

What Is a Condition Field?

A condition field specifies the request attribute WAF checks against protection rules. When configuring a CC attack protection rule, precise access protection rule, or false alarm masking rule, you can define condition fields to specify request attributes to trigger the rule. If a request meets the conditions set in a rule, the request matches the rule. WAF handles the request based on the action (for example, allow, block, or log only) set in the rule.

Figure 1 Condition field

A condition field consists of the field, logic, and content. Example:

  • Example 1: If Field is set to Path, logic to Include, and Content to /admin, a request matches the rule when the requested path contains /admin.
  • Example 2: If Field is set to IP, Logic to Equal to, and Content to 192.XX.XX.3, a request matches the rule when the client IP address is 192.XX.XX.3.

Supported Condition Fields

Table 1 Condition list configurations

Field

Subfield

Logic

Content (Example)

Path: Part of a URL that does not include a domain name. This value supports exact matches only. For example, if the path to be protected is /admin, Path must be set to /admin.

--

Select the desired logical relationship from the Logic drop-down list.

/buy/phone/

NOTICE:
  • If Path is set to /, all paths of the website are protected.
  • The path content cannot contain the following special characters: (' "<>&*#%\?)

User Agent: A user agent of the scanner to be protected

--

Mozilla/5.0 (Windows NT 6.1)

IP: An IP address of the visitor to be protected.

  • Client IP Address
  • X-Forwarded-For
  • TCP connection IP address

XXX.XXX.1.1

Params: A request parameter to be protected

  • All fields
  • Any subfield
  • Custom

201901150929

Referer: A user-defined request resource

For example, if the protected path is /admin/xxx and you do not want visitors to access the page from www.test.com, set Content to http://www.test.com.

--

http://www.test.com

Cookie: A small piece of data to identify web visitors

  • All fields
  • Any subfield
  • Custom

jsessionid

Header: A user-defined HTTP header

  • All fields
  • Any subfield
  • Custom

text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8

Method: the user-defined request method.

--

GET, POST, PUT, DELETE, and PATCH

Request Line: Length of a user-defined request line.

--

50

Request: Length of a user-defined request. It includes the request header, request line, and request body.

--

--

Protocol: the protocol of the request.

--

http