How to create rules to execute behaviors with Rules Engine for Firewall

Implementing rules in your firewall using Rules Engine will allow you to determine the rules it should execute in specific scenarios.

This guide demonstrates the process of creating a rule with a practical example of verifying the existence of a certificate and returning a custom response when there isn’t one. This behavior is useful in scenarios such as adjusting your policies to comply with BACEN requirements.


To create a rule:

  1. Access Azion Console > Firewall.
  2. Select the firewall in which you want to configure the rule.
  3. Click the Rules Engine tab.
  4. Click the + Rule button.
  5. Give your rule a name and, optionally, a description.
  6. In the Criteria section, select the SSL Verification Status variable.
  7. As a comparison operator, select is esqual.
  8. As an argument, select Missing Client Certificate.
  9. In the Behaviors section, select Set Custom Response.
  10. As arguments:
    • On Status Code, add 401.
    • On Content Type, add the content and header description. Example: application/json.
    • On Content Body, pass the message you want to present to users.
  11. Click the Save button.