Add a filter
Web Security Analytics shows only those requests that triggered your security configuration rules. As these requests contain multiple dimensions, Web Security Analytics offers a range of filtering options that allow you to narrow your results and precisely target the cases you want to analyze.
Before you build your filter, here are a few handy tips to keep in mind:
- By default, Web Security Analytics filters your attack traffic by requests. Learn more on filtering modes and how to change the default setting.
- After you set your filtering mode (by rules or by requests), add filter conditions to narrow down your search. There is an AND operator between each filter condition you define.
- Click the Lock icon
to keep the filter visible, even when switching between views. - To apply filters, go to the top right of the screen and click the Filters icon
. The gray filter box opens. While you work you can collapse and open this box by clicking it.
View results by requests or rules
Web Security Analytics lets you filter data either by requests or by rules, depending on how granular you need your security analysis to be. To choose your method, click the dropdown in the Filter widget and select your preferred mode.
The two filtering modes let you look at your data through two different lenses:
| Filtering mode | Apply filters by requests | Apply filters by rules |
|---|---|---|
| Primary goal | Returns requests that match your selected filter conditions. The system checks each request as a whole. If a request satisfies all of your conditions, even if those conditions are met by different rules, it is included in your results. Use this filtering mode for general traffic analysis, investigating complex multi-vector attacks, or querying the final Action Applied to a request. | Returns requests where the filter conditions are met within a single rule instance. If one rule satisfies all of your filter conditions, Web Security Analytics includes the entire request. |
| Filtering logic | The system checks the request as a whole. Results include requests that triggered your specified rules and any additional rules triggered by that same request. For example, if you filter by Rule 111, but a given request triggers Rule 222 as well, both appear in the results to give you full context. | The system checks each rule individually. If a single rule instance satisfies all your filter conditions, the entire request qualifies. Consequently, your results include all rules triggered by that request. |
| Statistics view | Displays all data associated with the filtered requests. | Widgets display all data associated with the requests that contain a matching rule. |
| Samples view | Shows all request context, including every rule triggered by that request. | Shows all request context, including every rule triggered by that request. |
Example: find requests denied by a bot rule
Filtering by rules is especially useful when you want to attribute a specific outcome to a specific control. For example, you can find only the requests that a Bot rule denied, rather than requests where a Bot rule merely flagged the traffic while a different rule applied the deny.
Set the following filter conditions:
- Attack Type matches Bot
- Rule Action matches Deny
Consider two requests:
- Request A triggered a single Bot rule set to Deny.
- Request B triggered a Bot rule set to Alert and a separate WAF rule set to Deny.
When you apply filters by requests, Web Security Analytics returns both Request A and Request B. The system evaluates each request as a whole, and both requests carry a Bot attribute and a Deny attribute somewhere among their triggered rules, even though, in Request B, the Deny came from the WAF rule rather than the Bot rule. This is the expected behavior for request-level filtering, but it can be misleading if your goal is to see only bot-enforced denials.
When you apply filters by rules, Web Security Analytics returns only Request A. The system checks each rule individually, and only Request A has a single rule (the Bot rule set to Deny) that satisfies both conditions. Request B is excluded, because no single rule it triggered is both Bot and Deny: its Bot rule only alerted, and its Deny came from a WAF rule.
Set conditions
You can select multiple dimensions and set specific conditions for each filter entry.
-
Click the Add filter condition button.
-
From the list that appears, choose a dimension by which to filter.
-
From the menu, select how you would like your box values to be treated by the filter (the selections available here will depend on which dimension you chose):
-
Match Any. The filter matches any of the values you specify. It’s equivalent to an OR statement.
Example: If for the IP address you choose Match Any and specify1.1.1.1,2.2.2.2,3.3.3.3, the query returns the requests that originate from any of the IP addresses. -
Match All. The filter matches all of the values you specify. It’s equivalent to an AND statement.
Example: If for the Attack Type dimension you choose Match All and specifyBot,WAF,Custom, the query returns the requests that had all three attack types triggered on them. -
Does Not Match Any. The filter excludes all of the values you specify. It’s equivalent to an not(OR) statement.
Example: If for the Connecting AS Number dimension you choose Does Not Match Any and specify100,200,300, the query returns the requests that didn’t originate from these three AS Numbers. -
Starts With Any. Filters on multiple starts with conditions to show any content that begins with the characters you specify.
Example: If for the Hostname dimension you choose Starts With Any and specifye,www,qa, the query returns requests or triggered rules where the hostnames start with those strings, likeexample.comorqa-example.com. -
Does Not Start With Any. Filters on multiple does not start with conditions to exclude content that begins with the characters you specify.
Example: If for the Hostname dimension you choose Does Not Start With Any and specifym,www,qa, the query excludes requests or triggered rules where the hostnames start with those strings, likeexample.comorqa-example.com. -
Ends With Any. Filters on multiple “ends with” conditions to show content that ends with the characters you specify.
Example: If for the Hostname dimension you choose Ends With Any and specifycom,security,io, the query returns requests or triggered rules where the hostnames end with those strings, likeexample.comorexample.io -
Does Not End With Any. Filters on multiple “does not end with” conditions to exclude content that ends with the characters you specify.
Example: If for the Hostname dimension you choose Does Not End With Any and specifycom,security,io, the query excludes requests or triggered rules where the hostnames end with those strings, likeexample.comorqa-example.com. -
Contains Any. The filter matches content that contains any of the match conditions.
Example: If for the Path dimension you choose Contains Any and specifypen,book,tablet, the query returns requests or triggered rules for paths where the specified values occur. -
Does Not Contain Any. The filter matches content that doesn’t contain any of the match conditions.
Example: If for the Path dimension you choose Does Not Contain Any and specifypen,book,tablet, the query returns requests or triggered rules where the path those specified values do not exist. -
Greater Than. If you are creating a filter with the reputation score dimension, this selection lets you match scores that are greater than the values you enter.
-
Greater Than or Equal To. If you are creating a filter with the Bot Score or the User Risk Score dimensions, this selection lets you match scores that are greater or equal to the values you enter.
-
Less Than. If you are creating a filter with the reputation score dimension, this selection lets you match scores that are less than the values you enter.
-
Less Than or Equal To. If you are creating a filter with the Bot Score or the User Risk Score dimensions, this selection lets you match scores that are less or equal to the values you enter.
-
Tips
- If you use the Contains Any or Ends With Any operators, limit the time range to 24 hours at maximum.
- If the selected dimension is either Path or Query, click
, to specify the case-sensitivity of the match condition.
- If you select Case-Insensitive from the menu, limit the time range to 24 hours at maximum.
- Enter criteria.
Options for entering specific criteria for each filter differ depending on the dimension you chose. For some, click to see a menu and make a selection. For others, enter a value. You can copy and paste comma- or tab-delimited values in this box.
To remove an item click its x.
To delete an entire dimension line, click the x to its right. - Click Save to apply conditions you set.
The filter appears in the filter area, and the display refreshes to present the filtered data.
As you view results, the filter box automatically collapses to grant valuable screen space to your data. If you want to return to the filter box and tweak settings, click anywhere in its gray box to expand it.
Updated 12 days ago
