:source: fortios_dlp_sensor.py
:orphan:
.. fortios_dlp_sensor:
fortios_dlp_sensor -- Configure sensors used by DLP blocking 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 dlp feature and sensor 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
- dlp_sensor - Configure sensors used by DLP blocking. type: dict
more...
| Supported Version Ranges |
| dlp_sensor |
v6.0.0 -> 7.6.6 |
- comment - Optional comments. type: str
more...
|
Supported Version Ranges |
| comment |
v6.0.0 -> 7.6.6 |
- dlp_log - Enable/disable DLP logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| dlp_log |
v6.0.0 -> v7.0.12 |
| [enable] |
v6.0.0 -> v7.0.12 |
| [disable] |
v6.0.0 -> v7.0.12 |
- entries - DLP sensor entries. type: list member_path: entries:id
more...
| Supported Version Ranges |
| entries |
v7.2.0 -> 7.6.6 |
- count - Count of dictionary matches to trigger sensor entry match (Dictionary might not be able to trigger more than once based on its "repeat" option, 1 - 255). type: int
more...
|
Supported Version Ranges |
| count |
v7.2.0 -> 7.6.6 |
- dictionary - Select a DLP dictionary or exact-data-match. Source dlp.dictionary.name dlp.exact-data-match.name. type: str
more...
|
Supported Version Ranges |
| dictionary |
v7.2.0 -> 7.6.6 |
- id - ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v7.2.0 -> 7.6.6 |
- status - Enable/disable this entry. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v7.2.0 -> 7.6.6 |
| [enable] |
v7.2.0 -> 7.6.6 |
| [disable] |
v7.2.0 -> 7.6.6 |
- eval - Expression to evaluate. type: str
more...
|
Supported Version Ranges |
| eval |
v7.2.0 -> 7.6.6 |
- extended_log - Enable/disable extended logging for data leak prevention. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| extended_log |
v6.0.0 -> v7.0.12 |
| [enable] |
v6.0.0 -> v7.0.12 |
| [disable] |
v6.0.0 -> v7.0.12 |
- feature_set - Flow/proxy feature set. type: str choices: flow, proxy
more...
|
Supported Version Ranges |
| feature_set |
v6.4.0 -> v7.0.12 |
| [flow] |
v6.4.0 -> v7.0.12 |
| [proxy] |
v6.4.0 -> v7.0.12 |
- filter - Set up DLP filters for this sensor. type: list member_path: filter:id
more...
| Supported Version Ranges |
| filter |
v6.0.0 -> v7.0.12 |
- action - Action to take with content that this DLP sensor matches. type: str choices: allow, log-only, block, quarantine-ip
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> v7.0.12 |
| [allow] |
v6.0.0 -> v7.0.12 |
| [log-only] |
v6.0.0 -> v7.0.12 |
| [block] |
v6.0.0 -> v7.0.12 |
| [quarantine-ip] |
v6.0.0 -> v7.0.12 |
- archive - Enable/disable DLP archiving. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| archive |
v6.0.0 -> v7.0.12 |
| [disable] |
v6.0.0 -> v7.0.12 |
| [enable] |
v6.0.0 -> v7.0.12 |
- company_identifier - Enter a company identifier watermark to match. Only watermarks that your company has placed on the files are matched. type: str
more...
|
Supported Version Ranges |
| company_identifier |
v6.0.0 -> v7.0.12 |
- expiry - Quarantine duration in days, hours, minutes (format = dddhhmm). type: str
more...
|
Supported Version Ranges |
| expiry |
v6.0.0 -> v7.0.12 |
- file_size - Match files this size or larger (0 - 4294967295 kbytes). type: int
more...
|
Supported Version Ranges |
| file_size |
v6.0.0 -> v7.0.12 |
- file_type - Select the number of a DLP file pattern table to match. Source dlp.filepattern.id. type: int
more...
|
Supported Version Ranges |
| file_type |
v6.0.0 -> v7.0.12 |
- filter_by - Select the type of content to match. type: str choices: credit-card, ssn, regexp, file-type, file-size, fingerprint, watermark, encrypted
more...
|
Supported Version Ranges |
| filter_by |
v6.0.0 -> v7.0.12 |
| [credit-card] |
v6.0.0 -> v7.0.12 |
| [ssn] |
v6.0.0 -> v7.0.12 |
| [regexp] |
v6.0.0 -> v7.0.12 |
| [file-type] |
v6.0.0 -> v7.0.12 |
| [file-size] |
v6.0.0 -> v7.0.12 |
| [fingerprint] |
v6.0.0 -> v7.0.12 |
| [watermark] |
v6.0.0 -> v7.0.12 |
| [encrypted] |
v6.0.0 -> v7.0.12 |
- fp_sensitivity - Select a DLP file pattern sensitivity to match. type: list member_path: filter:id/fp_sensitivity:name
more...
| Supported Version Ranges |
| fp_sensitivity |
v6.0.0 -> v6.0.11 |
- name - Select a DLP sensitivity. Source dlp.fp-sensitivity.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> v6.0.11 |
- id - ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> v7.0.12 |
- match_percentage - Percentage of fingerprints in the fingerprint databases designated with the selected sensitivity to match. type: int
more...
|
Supported Version Ranges |
| match_percentage |
v6.0.0 -> v7.0.12 |
- name - Filter name. type: str
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> v7.0.12 |
- proto - Check messages or files over one or more of these protocols. type: list choices: smtp, pop3, imap, http-get, http-post, ftp, nntp, mapi, ssh, cifs, mm1, mm3, mm4, mm7
more...
|
Supported Version Ranges |
| proto |
v6.0.0 -> v7.0.12 |
| [smtp] |
v6.0.0 -> v7.0.12 |
| [pop3] |
v6.0.0 -> v7.0.12 |
| [imap] |
v6.0.0 -> v7.0.12 |
| [http-get] |
v6.0.0 -> v7.0.12 |
| [http-post] |
v6.0.0 -> v7.0.12 |
| [ftp] |
v6.0.0 -> v7.0.12 |
| [nntp] |
v6.0.0 -> v7.0.12 |
| [mapi] |
v6.0.0 -> v7.0.12 |
| [ssh] |
v6.2.0 -> v7.0.12 |
| [cifs] |
v6.4.0 -> v7.0.12 |
| [mm1] |
v6.0.0 -> v6.2.7 |
| [mm3] |
v6.0.0 -> v6.2.7 |
| [mm4] |
v6.0.0 -> v6.2.7 |
| [mm7] |
v6.0.0 -> v6.2.7 |
- regexp - Enter a regular expression to match (max. 255 characters). type: str
more...
|
Supported Version Ranges |
| regexp |
v6.0.0 -> v7.0.12 |
- sensitivity - Select a DLP file pattern sensitivity to match. type: list member_path: filter:id/sensitivity:name
more...
| Supported Version Ranges |
| sensitivity |
v6.2.0 -> v7.0.12 |
- name - Select a DLP sensitivity. Source dlp.sensitivity.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.2.0 -> v7.0.12 |
- severity - Select the severity or threat level that matches this filter. type: str choices: info, low, medium, high, critical
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> v7.0.12 |
| [info] |
v6.0.0 -> v7.0.12 |
| [low] |
v6.0.0 -> v7.0.12 |
| [medium] |
v6.0.0 -> v7.0.12 |
| [high] |
v6.0.0 -> v7.0.12 |
| [critical] |
v6.0.0 -> v7.0.12 |
- type - Select whether to check the content of messages (an email message) or files (downloaded files or email attachments). type: str choices: file, fos_message
more...
|
Supported Version Ranges |
| type |
v6.0.0 -> v7.0.12 |
| [file] |
v6.0.0 -> v7.0.12 |
| [fos_message] |
v6.0.0 -> v7.0.12 |
- flow_based - Enable/disable flow-based DLP. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| flow_based |
v6.0.0 -> v6.0.11 |
| [enable] |
v6.0.0 -> v6.0.11 |
| [disable] |
v6.0.0 -> v6.0.11 |
- full_archive_proto - Protocols to always content archive. type: list choices: smtp, pop3, imap, http-get, http-post, ftp, nntp, mapi, ssh, cifs, mm1, mm3, mm4, mm7
more...
|
Supported Version Ranges |
| full_archive_proto |
v6.0.0 -> v7.0.12 |
| [smtp] |
v6.0.0 -> v7.0.12 |
| [pop3] |
v6.0.0 -> v7.0.12 |
| [imap] |
v6.0.0 -> v7.0.12 |
| [http-get] |
v6.0.0 -> v7.0.12 |
| [http-post] |
v6.0.0 -> v7.0.12 |
| [ftp] |
v6.0.0 -> v7.0.12 |
| [nntp] |
v6.0.0 -> v7.0.12 |
| [mapi] |
v6.0.0 -> v7.0.12 |
| [ssh] |
v6.2.0 -> v7.0.12 |
| [cifs] |
v6.4.0 -> v7.0.12 |
| [mm1] |
v6.0.0 -> v6.2.7 |
| [mm3] |
v6.0.0 -> v6.2.7 |
| [mm4] |
v6.0.0 -> v6.2.7 |
| [mm7] |
v6.0.0 -> v6.2.7 |
- match_type - Logical relation between entries . type: str choices: match-all, match-any, match-eval
more...
|
Supported Version Ranges |
| match_type |
v7.2.0 -> 7.6.6 |
| [match-all] |
v7.2.0 -> 7.6.6 |
| [match-any] |
v7.2.0 -> 7.6.6 |
| [match-eval] |
v7.2.0 -> 7.6.6 |
- nac_quar_log - Enable/disable NAC quarantine logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| nac_quar_log |
v6.0.0 -> v7.0.12 |
| [enable] |
v6.0.0 -> v7.0.12 |
| [disable] |
v6.0.0 -> v7.0.12 |
- name - Name of table containing the sensor. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- options - Configure DLP options. type: str
more...
|
Supported Version Ranges |
| options |
v6.0.0 -> v6.2.7 |
- replacemsg_group - Replacement message group used by this DLP sensor. Source system.replacemsg-group.name. type: str
more...
|
Supported Version Ranges |
| replacemsg_group |
v6.0.0 -> v7.0.12 |
- summary_proto - Protocols to always log summary. type: list choices: smtp, pop3, imap, http-get, http-post, ftp, nntp, mapi, ssh, cifs, mm1, mm3, mm4, mm7
more...
|
Supported Version Ranges |
| summary_proto |
v6.0.0 -> v7.0.12 |
| [smtp] |
v6.0.0 -> v7.0.12 |
| [pop3] |
v6.0.0 -> v7.0.12 |
| [imap] |
v6.0.0 -> v7.0.12 |
| [http-get] |
v6.0.0 -> v7.0.12 |
| [http-post] |
v6.0.0 -> v7.0.12 |
| [ftp] |
v6.0.0 -> v7.0.12 |
| [nntp] |
v6.0.0 -> v7.0.12 |
| [mapi] |
v6.0.0 -> v7.0.12 |
| [ssh] |
v6.2.0 -> v7.0.12 |
| [cifs] |
v6.4.0 -> v7.0.12 |
| [mm1] |
v6.0.0 -> v6.2.7 |
| [mm3] |
v6.0.0 -> v6.2.7 |
| [mm4] |
v6.0.0 -> v6.2.7 |
| [mm7] |
v6.0.0 -> v6.2.7 |
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 sensors used by DLP blocking.
fortinet.fortios.fortios_dlp_sensor:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
dlp_sensor:
comment: "Optional comments."
dlp_log: "enable"
entries:
-
count: "1"
dictionary: " (source dlp.dictionary.name dlp.exact-data-match.name)"
id: "8"
status: "enable"
eval: ""
extended_log: "enable"
feature_set: "flow"
filter:
-
action: "allow"
archive: "disable"
company_identifier: "myId_16"
expiry: ""
file_size: "10"
file_type: "0"
filter_by: "credit-card"
fp_sensitivity:
-
name: "default_name_22 (source dlp.fp-sensitivity.name)"
id: "23"
match_percentage: "10"
name: "default_name_25"
proto: "smtp"
regexp: ""
sensitivity:
-
name: "default_name_29 (source dlp.sensitivity.name)"
severity: "info"
type: "file"
flow_based: "enable"
full_archive_proto: "smtp"
match_type: "match-all"
nac_quar_log: "enable"
name: "default_name_36"
options: ""
replacemsg_group: " (source system.replacemsg-group.name)"
summary_proto: "smtp"
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.