Create a Rule with the Rule Builder
You can use the Rule Builder to create a rule of your own for your web policy.
In the following, steps for creating a sample rule are described to explain the use of the Rule Builder.
There is also a default rule under Secure Web Gateway that serves the same purpose as this sample rule.
-
On the user interface for Secure Web Gateway, select Policy > Web Policy > Policy.
-
On the Web Policy page, select the rule set where you want to insert the new rule. Select it from the policy tree in the navigation panel on the left. For example, expand Global Block and select Global Block Lists.
- Click the three dots at the very right of an existing rule. Under Add Custom Rule in the menu that opens select Via Rule Builder.
Options for selecting the elements of the new rule appear below the existing rules.
-
Work with these options to create a new rule. For example, select elements to create a rule that blocks requests from users who have their names listed in a block list.
- In the Rule Name field, enter a name for the new rule.
For example, enter Block Requests from Users in List.
- Click Select Criteria, and from the list on the window that opens, select the criteria for the new rule.
To view a short description of each list item, make sure Show Description is selected. For example, select Username, then click Add to add the criteria to the rule. -
Click Select Operator, and from the list in the window that opens, select an operator.
If you select Username as the criteria, is is selected at the same time as an operator. Click is, and from the list, select is in as an operator, as you want the new rule to block requests from users with names that are in a particular list.
- Click Select Value, and from the list on the panel that is inserted on the right, select a suitable value.
For example, select Global Blocked User Names, then click Done.
-
If you want to configure a complex condition for the rule, which means it has two or more criteria with operators and values, place your mouse pointer somewhere over the condition that you have already configured, for example, over IF.
Then click the icon with the + symbol that appears on the right.
Another line with Select Criteria, Select Operator, and Select Value is added below the already existing condition. It is preceded by AND.
Configure criteria, operator, and value for this condition using the same methods as before.
To connect this condition with OR, click AND, which lets OR appear before AND.
Then click OR, which replaces AND with OR.
To bring AND back, repeat the clicks in the same way.
Click the icon with the + symbol again to add another condition. Click the X icon to remove a condition. - Click Select Action, and from the list in the window that opens, select a suitable action for the rule.
For example, select Block request. If you select this action, you must also select a template for the block message that is sent to the user who submitted the request. Click Select Template, and from the list, select, for example, Blocked Account.
- Click Add Event, then click Select an Event on the panel that is inserted on the right and select an event from the list that appears.
For example, select Set end user message language. If you select this event, you must also configure an event parameter.
For this event, the parameter is a language code in string format. Enter for example, en for English in the Parameter (string) input field. Then click the event name again to activate Done at the bottom and click this button.
- In the Rule Name field, enter a name for the new rule.
-
To enable the new rule, use the toggle switch at the right end of the rule line. If it shows a green field, the rule is enabled.
You have now created a new web policy rule in the rule set that you selected.
For an interactive demo of how to create a rule with the Rule Builder, see Create a Rule with the Rule Builder (Demo).