:source: fortios_waf_profile.py
:orphan:
.. fortios_waf_profile:
fortios_waf_profile -- Configure Web application firewall configuration in Fortinet's FortiOS and FortiGate.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify waf feature and profile category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.16
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v6.0.0 -> v7.6.6
Parameters
----------
.. raw:: html
- access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: false
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
- member_path - Member attribute path to operate on. type: str
- member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
- state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
- waf_profile - Configure Web application firewall configuration. type: dict
more...
| Supported Version Ranges |
| waf_profile |
v6.0.0 -> 7.6.6 |
- address_list - Address block and allow lists. type: dict
more...
| Supported Version Ranges |
| address_list |
v6.0.0 -> 7.6.6 |
- blocked_address - Blocked address. type: list member_path: address_list/blocked_address:name
more...
| Supported Version Ranges |
| blocked_address |
v6.0.0 -> 7.6.6 |
- name - Address name. Source firewall.address.name firewall.addrgrp.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- blocked_log - Enable/disable logging on blocked addresses. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| blocked_log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Status. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- trusted_address - Trusted address. type: list member_path: address_list/trusted_address:name
more...
| Supported Version Ranges |
| trusted_address |
v6.0.0 -> 7.6.6 |
- name - Address name. Source firewall.address.name firewall.addrgrp.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- comment - Comment. type: str
more...
|
Supported Version Ranges |
| comment |
v6.0.0 -> 7.6.6 |
- constraint - WAF HTTP protocol restrictions. type: dict
more...
| Supported Version Ranges |
| constraint |
v6.0.0 -> 7.6.6 |
- content_length - HTTP content length in request. type: dict
more...
| Supported Version Ranges |
| content_length |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- length - Length of HTTP content in bytes (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| length |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- exception - HTTP constraint exception. type: list member_path: constraint/exception:id
more...
| Supported Version Ranges |
| exception |
v6.0.0 -> 7.6.6 |
- address - Host address. Source firewall.address.name firewall.addrgrp.name. type: str
more...
|
Supported Version Ranges |
| address |
v6.0.0 -> 7.6.6 |
- content_length - HTTP content length in request. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| content_length |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- header_length - HTTP header length in request. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| header_length |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- hostname - Enable/disable hostname check. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| hostname |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- id - Exception ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- line_length - HTTP line length in request. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| line_length |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- malformed - Enable/disable malformed HTTP request check. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| malformed |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_cookie - Maximum number of cookies in HTTP request. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| max_cookie |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_header_line - Maximum number of HTTP header line. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| max_header_line |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_range_segment - Maximum number of range segments in HTTP range line. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| max_range_segment |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_url_param - Maximum number of parameters in URL. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| max_url_param |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- method - Enable/disable HTTP method check. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| method |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- param_length - Maximum length of parameter in URL, HTTP POST request or HTTP body. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| param_length |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- pattern - URL pattern. type: str
more...
|
Supported Version Ranges |
| pattern |
v6.0.0 -> 7.6.6 |
- regex - Enable/disable regular expression based pattern match. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| regex |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- url_param_length - Maximum length of parameter in URL. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| url_param_length |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- version - Enable/disable HTTP version check. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| version |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- header_length - HTTP header length in request. type: dict
more...
| Supported Version Ranges |
| header_length |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- length - Length of HTTP header in bytes (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| length |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- hostname - Enable/disable hostname check. type: dict
more...
| Supported Version Ranges |
| hostname |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- line_length - HTTP line length in request. type: dict
more...
| Supported Version Ranges |
| line_length |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- length - Length of HTTP line in bytes (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| length |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- malformed - Enable/disable malformed HTTP request check. type: dict
more...
| Supported Version Ranges |
| malformed |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_cookie - Maximum number of cookies in HTTP request. type: dict
more...
| Supported Version Ranges |
| max_cookie |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_cookie - Maximum number of cookies in HTTP request (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| max_cookie |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_header_line - Maximum number of HTTP header line. type: dict
more...
| Supported Version Ranges |
| max_header_line |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_header_line - Maximum number HTTP header lines (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| max_header_line |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_range_segment - Maximum number of range segments in HTTP range line. type: dict
more...
| Supported Version Ranges |
| max_range_segment |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_range_segment - Maximum number of range segments in HTTP range line (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| max_range_segment |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_url_param - Maximum number of parameters in URL. type: dict
more...
| Supported Version Ranges |
| max_url_param |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- max_url_param - Maximum number of parameters in URL (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| max_url_param |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- method - Enable/disable HTTP method check. type: dict
more...
| Supported Version Ranges |
| method |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- param_length - Maximum length of parameter in URL, HTTP POST request or HTTP body. type: dict
more...
| Supported Version Ranges |
| param_length |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- length - Maximum length of parameter in URL, HTTP POST request or HTTP body in bytes (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| length |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- url_param_length - Maximum length of parameter in URL. type: dict
more...
| Supported Version Ranges |
| url_param_length |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- length - Maximum length of URL parameter in bytes (0 to 2147483647). type: int
more...
|
Supported Version Ranges |
| length |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- version - Enable/disable HTTP version check. type: dict
more...
| Supported Version Ranges |
| version |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Enable/disable the constraint. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- extended_log - Enable/disable extended logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| extended_log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- external - Disable/Enable external HTTP Inspection. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| external |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- method - Method restriction. type: dict
more...
| Supported Version Ranges |
| method |
v6.0.0 -> 7.6.6 |
- default_allowed_methods - Methods. type: list choices: get, post, put, head, connect, trace, options, delete, others
more...
|
Supported Version Ranges |
| default_allowed_methods |
v6.0.0 -> 7.6.6 |
| [get] |
v6.0.0 -> 7.6.6 |
| [post] |
v6.0.0 -> 7.6.6 |
| [put] |
v6.0.0 -> 7.6.6 |
| [head] |
v6.0.0 -> 7.6.6 |
| [connect] |
v6.0.0 -> 7.6.6 |
| [trace] |
v6.0.0 -> 7.6.6 |
| [options] |
v6.0.0 -> 7.6.6 |
| [delete] |
v6.0.0 -> 7.6.6 |
| [others] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- method_policy - HTTP method policy. type: list member_path: method/method_policy:id
more...
| Supported Version Ranges |
| method_policy |
v6.0.0 -> 7.6.6 |
- address - Host address. Source firewall.address.name firewall.addrgrp.name. type: str
more...
|
Supported Version Ranges |
| address |
v6.0.0 -> 7.6.6 |
- allowed_methods - Allowed Methods. type: list choices: get, post, put, head, connect, trace, options, delete, others
more...
|
Supported Version Ranges |
| allowed_methods |
v6.0.0 -> 7.6.6 |
| [get] |
v6.0.0 -> 7.6.6 |
| [post] |
v6.0.0 -> 7.6.6 |
| [put] |
v6.0.0 -> 7.6.6 |
| [head] |
v6.0.0 -> 7.6.6 |
| [connect] |
v6.0.0 -> 7.6.6 |
| [trace] |
v6.0.0 -> 7.6.6 |
| [options] |
v6.0.0 -> 7.6.6 |
| [delete] |
v6.0.0 -> 7.6.6 |
| [others] |
v6.0.0 -> 7.6.6 |
- id - HTTP method policy ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- pattern - URL pattern. type: str
more...
|
Supported Version Ranges |
| pattern |
v6.0.0 -> 7.6.6 |
- regex - Enable/disable regular expression based pattern match. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| regex |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Status. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- name - WAF Profile name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- signature - WAF signatures. type: dict
more...
| Supported Version Ranges |
| signature |
v6.0.0 -> 7.6.6 |
- credit_card_detection_threshold - The minimum number of Credit cards to detect violation. type: int
more...
|
Supported Version Ranges |
| credit_card_detection_threshold |
v6.0.0 -> 7.6.6 |
- custom_signature - Custom signature. type: list member_path: signature/custom_signature:name
more...
| Supported Version Ranges |
| custom_signature |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: allow, block, erase
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [allow] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
| [erase] |
v6.0.0 -> 7.6.6 |
- case_sensitivity - Case sensitivity in pattern. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| case_sensitivity |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- direction - Traffic direction. type: str choices: request, response
more...
|
Supported Version Ranges |
| direction |
v6.0.0 -> 7.6.6 |
| [request] |
v6.0.0 -> 7.6.6 |
| [response] |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- name - Signature name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- pattern - Match pattern. type: str
more...
|
Supported Version Ranges |
| pattern |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
- status - Status. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- target - Match HTTP target. type: list choices: arg, arg-name, req-body, req-cookie, req-cookie-name, req-filename, req-header, req-header-name, req-raw-uri, req-uri, resp-body, resp-hdr, resp-status
more...
|
Supported Version Ranges |
| target |
v6.0.0 -> 7.6.6 |
| [arg] |
v6.0.0 -> 7.6.6 |
| [arg-name] |
v6.0.0 -> 7.6.6 |
| [req-body] |
v6.0.0 -> 7.6.6 |
| [req-cookie] |
v6.0.0 -> 7.6.6 |
| [req-cookie-name] |
v6.0.0 -> 7.6.6 |
| [req-filename] |
v6.0.0 -> 7.6.6 |
| [req-header] |
v6.0.0 -> 7.6.6 |
| [req-header-name] |
v6.0.0 -> 7.6.6 |
| [req-raw-uri] |
v6.0.0 -> 7.6.6 |
| [req-uri] |
v6.0.0 -> 7.6.6 |
| [resp-body] |
v6.0.0 -> 7.6.6 |
| [resp-hdr] |
v6.0.0 -> 7.6.6 |
| [resp-status] |
v6.0.0 -> 7.6.6 |
- disabled_signature - Disabled signatures. type: list member_path: signature/disabled_signature:id
more...
| Supported Version Ranges |
| disabled_signature |
v6.0.0 -> 7.6.6 |
- id - Signature ID. see Notes. Source waf.signature.id. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- disabled_sub_class - Disabled signature subclasses. type: list member_path: signature/disabled_sub_class:id
more...
| Supported Version Ranges |
| disabled_sub_class |
v6.0.0 -> 7.6.6 |
- id - Signature subclass ID. see Notes. Source waf.sub-class.id. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- main_class - Main signature class. type: list member_path: signature/main_class:id
more...
| Supported Version Ranges |
| main_class |
v6.0.0 -> v7.0.5 |
v7.2.0 -> v7.2.0 |
- action - Action. type: str choices: allow, block, erase
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> v7.0.5 |
v7.2.0 -> v7.2.0 |
| [allow] |
v6.0.0 -> v7.0.5 |
| [block] |
v6.0.0 -> v7.0.5 |
| [erase] |
v6.0.0 -> v7.0.5 |
- id - Main signature class ID. see Notes. Source waf.main-class.id. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> v7.0.5 |
v7.2.0 -> v7.2.0 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> v7.0.5 |
v7.2.0 -> v7.2.0 |
| [enable] |
v6.0.0 -> v7.0.5 |
| [disable] |
v6.0.0 -> v7.0.5 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> v7.0.5 |
v7.2.0 -> v7.2.0 |
| [high] |
v6.0.0 -> v7.0.5 |
| [medium] |
v6.0.0 -> v7.0.5 |
| [low] |
v6.0.0 -> v7.0.5 |
- status - Status. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> v7.0.5 |
v7.2.0 -> v7.2.0 |
| [enable] |
v6.0.0 -> v7.0.5 |
| [disable] |
v6.0.0 -> v7.0.5 |
- url_access - URL access list. type: list member_path: url_access:id
more...
| Supported Version Ranges |
| url_access |
v6.0.0 -> 7.6.6 |
- access_pattern - URL access pattern. type: list member_path: url_access:id/access_pattern:id
more...
| Supported Version Ranges |
| access_pattern |
v6.0.0 -> 7.6.6 |
- id - URL access pattern ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- negate - Enable/disable match negation. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| negate |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- pattern - URL pattern. type: str
more...
|
Supported Version Ranges |
| pattern |
v6.0.0 -> 7.6.6 |
- regex - Enable/disable regular expression based pattern match. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| regex |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- srcaddr - Source address. Source firewall.address.name firewall.addrgrp.name. type: str
more...
|
Supported Version Ranges |
| srcaddr |
v6.0.0 -> 7.6.6 |
- action - Action. type: str choices: bypass, permit, block
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [bypass] |
v6.0.0 -> 7.6.6 |
| [permit] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- address - Host address. Source firewall.address.name firewall.addrgrp.name. type: str
more...
|
Supported Version Ranges |
| address |
v6.0.0 -> 7.6.6 |
- id - URL access ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Severity. type: str choices: high, medium, low
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [high] |
v6.0.0 -> 7.6.6 |
| [medium] |
v6.0.0 -> 7.6.6 |
| [low] |
v6.0.0 -> 7.6.6 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- name: Configure Web application firewall configuration.
fortinet.fortios.fortios_waf_profile:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
waf_profile:
address_list:
blocked_address:
-
name: "default_name_5 (source firewall.address.name firewall.addrgrp.name)"
blocked_log: "enable"
severity: "high"
status: "enable"
trusted_address:
-
name: "default_name_10 (source firewall.address.name firewall.addrgrp.name)"
comment: "Comment."
constraint:
content_length:
action: "allow"
length: "67108864"
log: "enable"
severity: "high"
status: "enable"
exception:
-
address: " (source firewall.address.name firewall.addrgrp.name)"
content_length: "enable"
header_length: "enable"
hostname: "enable"
id: "24"
line_length: "enable"
malformed: "enable"
max_cookie: "enable"
max_header_line: "enable"
max_range_segment: "enable"
max_url_param: "enable"
method: "enable"
param_length: "enable"
pattern: ""
regex: "enable"
url_param_length: "enable"
version: "enable"
header_length:
action: "allow"
length: "8192"
log: "enable"
severity: "high"
status: "enable"
hostname:
action: "allow"
log: "enable"
severity: "high"
status: "enable"
line_length:
action: "allow"
length: "1024"
log: "enable"
severity: "high"
status: "enable"
malformed:
action: "allow"
log: "enable"
severity: "high"
status: "enable"
max_cookie:
action: "allow"
log: "enable"
max_cookie: "16"
severity: "high"
status: "enable"
max_header_line:
action: "allow"
log: "enable"
max_header_line: "32"
severity: "high"
status: "enable"
max_range_segment:
action: "allow"
log: "enable"
max_range_segment: "5"
severity: "high"
status: "enable"
max_url_param:
action: "allow"
log: "enable"
max_url_param: "16"
severity: "high"
status: "enable"
method:
action: "allow"
log: "enable"
severity: "high"
status: "enable"
param_length:
action: "allow"
length: "8192"
log: "enable"
severity: "high"
status: "enable"
url_param_length:
action: "allow"
length: "8192"
log: "enable"
severity: "high"
status: "enable"
version:
action: "allow"
log: "enable"
severity: "high"
status: "enable"
extended_log: "enable"
external: "disable"
method:
default_allowed_methods: "get"
log: "enable"
method_policy:
-
address: " (source firewall.address.name firewall.addrgrp.name)"
allowed_methods: "get"
id: "113"
pattern: ""
regex: "enable"
severity: "high"
status: "enable"
name: "default_name_118"
signature:
credit_card_detection_threshold: "3"
custom_signature:
-
action: "allow"
case_sensitivity: "disable"
direction: "request"
log: "enable"
name: "default_name_126"
pattern: ""
severity: "high"
status: "enable"
target: "arg"
disabled_signature:
-
id: "132 (source waf.signature.id)"
disabled_sub_class:
-
id: "134 (source waf.sub-class.id)"
main_class:
-
action: "allow"
id: "137 (source waf.main-class.id)"
log: "enable"
severity: "high"
status: "enable"
url_access:
-
access_pattern:
-
id: "143"
negate: "enable"
pattern: ""
regex: "enable"
srcaddr: " (source firewall.address.name firewall.addrgrp.name)"
action: "bypass"
address: " (source firewall.address.name firewall.addrgrp.name)"
id: "150"
log: "enable"
severity: "high"
Return Values
-------------
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
.. raw:: html
- build - Build number of the fortigate image returned: always type: str sample: 1547
- http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
- http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
- mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
- name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
- path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
- revision - Internal revision number returned: always type: str sample: 17.0.2.10658
- serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
- status - Indication of the operation's result returned: always type: str sample: success
- vdom - Virtual domain used returned: always type: str sample: root
- version - Version of the FortiGate returned: always type: str sample: v5.6.3
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Hongbin Lu (@fgtdev-hblu)
- Frank Shen (@frankshen01)
- Miguel Angel Munoz (@mamunozgonzalez)
- Nicolas Thomas (@thomnico)
.. hint::
If you notice any issues in this documentation, you can create a pull request to improve it.