:source: fortios_dlp_profile.py
:orphan:
.. fortios_dlp_profile:
fortios_dlp_profile -- Configure DLP profiles 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 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: v7.2.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_profile - Configure DLP profiles. type: dict
more...
| Supported Version Ranges |
| dlp_profile |
v7.2.0 -> 7.6.6 |
- comment - Comment. type: str
more...
|
Supported Version Ranges |
| comment |
v7.2.0 -> 7.6.6 |
- dlp_log - Enable/disable DLP logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| dlp_log |
v7.2.0 -> 7.6.6 |
| [enable] |
v7.2.0 -> 7.6.6 |
| [disable] |
v7.2.0 -> 7.6.6 |
- extended_log - Enable/disable extended logging for data loss prevention. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| extended_log |
v7.2.0 -> 7.6.6 |
| [enable] |
v7.2.0 -> 7.6.6 |
| [disable] |
v7.2.0 -> 7.6.6 |
- feature_set - Flow/proxy feature set. type: str choices: flow, proxy
more...
|
Supported Version Ranges |
| feature_set |
v7.2.0 -> 7.6.6 |
| [flow] |
v7.2.0 -> 7.6.6 |
| [proxy] |
v7.2.0 -> 7.6.6 |
- fortidata_error_action - Action to take if FortiData query fails. type: str choices: log-only, block, ignore
more...
|
Supported Version Ranges |
| fortidata_error_action |
v7.6.4 -> 7.6.6 |
| [log-only] |
v7.6.4 -> 7.6.6 |
| [block] |
v7.6.4 -> 7.6.6 |
| [ignore] |
v7.6.4 -> 7.6.6 |
- full_archive_proto - Protocols to always content archive. type: list choices: smtp, pop3, imap, http-get, http-post, ftp, nntp, mapi, ssh, cifs
more...
|
Supported Version Ranges |
| full_archive_proto |
v7.2.0 -> 7.6.6 |
| [smtp] |
v7.2.0 -> 7.6.6 |
| [pop3] |
v7.2.0 -> 7.6.6 |
| [imap] |
v7.2.0 -> 7.6.6 |
| [http-get] |
v7.2.0 -> 7.6.6 |
| [http-post] |
v7.2.0 -> 7.6.6 |
| [ftp] |
v7.2.0 -> 7.6.6 |
| [nntp] |
v7.2.0 -> 7.6.6 |
| [mapi] |
v7.2.0 -> 7.6.6 |
| [ssh] |
v7.2.0 -> 7.6.6 |
| [cifs] |
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 |
v7.2.0 -> 7.6.6 |
| [enable] |
v7.2.0 -> 7.6.6 |
| [disable] |
v7.2.0 -> 7.6.6 |
- name - Name of the DLP profile. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.2.0 -> 7.6.6 |
- replacemsg_group - Replacement message group used by this DLP profile. Source system.replacemsg-group.name. type: str
more...
|
Supported Version Ranges |
| replacemsg_group |
v7.2.0 -> 7.6.6 |
- rule - Set up DLP rules for this profile. type: list member_path: rule:id
more...
| Supported Version Ranges |
| rule |
v7.2.0 -> 7.6.6 |
- action - Action to take with content that this DLP profile matches. type: str choices: allow, log-only, block, quarantine-ip
more...
|
Supported Version Ranges |
| action |
v7.2.0 -> 7.6.6 |
| [allow] |
v7.2.0 -> 7.6.6 |
| [log-only] |
v7.2.0 -> 7.6.6 |
| [block] |
v7.2.0 -> 7.6.6 |
| [quarantine-ip] |
v7.2.0 -> 7.6.6 |
- archive - Enable/disable DLP archiving. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| archive |
v7.2.0 -> 7.6.6 |
| [disable] |
v7.2.0 -> 7.6.6 |
| [enable] |
v7.2.0 -> 7.6.6 |
- expiry - Quarantine duration in days, hours, minutes (format = dddhhmm). type: str
more...
|
Supported Version Ranges |
| expiry |
v7.2.0 -> 7.6.6 |
- file_size - Match files greater than or equal to this size (KB). type: int
more...
|
Supported Version Ranges |
| file_size |
v7.2.0 -> 7.6.6 |
- 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 |
v7.2.0 -> 7.6.6 |
- filter_by - Select the type of content to match. type: str choices: sensor, label, fingerprint, encrypted, none, mip
more...
|
Supported Version Ranges |
| filter_by |
v7.2.0 -> 7.6.6 |
| [sensor] |
v7.2.0 -> 7.6.6 |
| [label] |
v7.6.3 -> 7.6.6 |
| [fingerprint] |
v7.2.0 -> v7.4.1 |
v7.4.3 -> 7.6.6 |
| [encrypted] |
v7.2.0 -> 7.6.6 |
| [none] |
v7.2.0 -> 7.6.6 |
| [mip] |
v7.2.0 -> v7.6.2 |
- id - ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v7.2.0 -> 7.6.6 |
- label - Select DLP label. Source dlp.label.name. type: str
more...
|
Supported Version Ranges |
| label |
v7.2.0 -> 7.6.6 |
- match_percentage - Percentage of fingerprints in the fingerprint databases designated with the selected sensitivity to match. type: int
more...
|
Supported Version Ranges |
| match_percentage |
v7.2.0 -> v7.4.1 |
v7.4.3 -> 7.6.6 |
- name - Filter name. type: str
more...
|
Supported Version Ranges |
| name |
v7.2.0 -> 7.6.6 |
- 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
more...
|
Supported Version Ranges |
| proto |
v7.2.0 -> 7.6.6 |
| [smtp] |
v7.2.0 -> 7.6.6 |
| [pop3] |
v7.2.0 -> 7.6.6 |
| [imap] |
v7.2.0 -> 7.6.6 |
| [http-get] |
v7.2.0 -> 7.6.6 |
| [http-post] |
v7.2.0 -> 7.6.6 |
| [ftp] |
v7.2.0 -> 7.6.6 |
| [nntp] |
v7.2.0 -> 7.6.6 |
| [mapi] |
v7.2.0 -> 7.6.6 |
| [ssh] |
v7.2.0 -> 7.6.6 |
| [cifs] |
v7.2.0 -> 7.6.6 |
- sensitivity - Select a DLP file pattern sensitivity to match. type: list member_path: rule:id/sensitivity:name
more...
| Supported Version Ranges |
| sensitivity |
v7.2.0 -> v7.4.1 |
v7.4.3 -> 7.6.6 |
- name - Select a DLP sensitivity. Source dlp.sensitivity.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.2.0 -> 7.6.6 |
- sensor - Select DLP sensors. type: list member_path: rule:id/sensor:name
more...
| Supported Version Ranges |
| sensor |
v7.2.0 -> 7.6.6 |
- name - Address name. Source dlp.sensor.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.2.0 -> 7.6.6 |
- severity - Select the severity or threat level that matches this filter. type: str choices: info, low, medium, high, critical
more...
|
Supported Version Ranges |
| severity |
v7.2.0 -> 7.6.6 |
| [info] |
v7.2.0 -> 7.6.6 |
| [low] |
v7.2.0 -> 7.6.6 |
| [medium] |
v7.2.0 -> 7.6.6 |
| [high] |
v7.2.0 -> 7.6.6 |
| [critical] |
v7.2.0 -> 7.6.6 |
- 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 |
v7.2.0 -> 7.6.6 |
| [file] |
v7.2.0 -> 7.6.6 |
| [fos_message] |
v7.2.0 -> 7.6.6 |
- summary_proto - Protocols to always log summary. type: list choices: smtp, pop3, imap, http-get, http-post, ftp, nntp, mapi, ssh, cifs
more...
|
Supported Version Ranges |
| summary_proto |
v7.2.0 -> 7.6.6 |
| [smtp] |
v7.2.0 -> 7.6.6 |
| [pop3] |
v7.2.0 -> 7.6.6 |
| [imap] |
v7.2.0 -> 7.6.6 |
| [http-get] |
v7.2.0 -> 7.6.6 |
| [http-post] |
v7.2.0 -> 7.6.6 |
| [ftp] |
v7.2.0 -> 7.6.6 |
| [nntp] |
v7.2.0 -> 7.6.6 |
| [mapi] |
v7.2.0 -> 7.6.6 |
| [ssh] |
v7.2.0 -> 7.6.6 |
| [cifs] |
v7.2.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 DLP profiles.
fortinet.fortios.fortios_dlp_profile:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
dlp_profile:
comment: "Comment."
dlp_log: "enable"
extended_log: "enable"
feature_set: "flow"
fortidata_error_action: "log-only"
full_archive_proto: "smtp"
nac_quar_log: "enable"
name: "default_name_10"
replacemsg_group: " (source system.replacemsg-group.name)"
rule:
-
action: "allow"
archive: "disable"
expiry: ""
file_size: "0"
file_type: "0"
filter_by: "sensor"
id: "19"
label: " (source dlp.label.name)"
match_percentage: "10"
name: "default_name_22"
proto: "smtp"
sensitivity:
-
name: "default_name_25 (source dlp.sensitivity.name)"
sensor:
-
name: "default_name_27 (source dlp.sensor.name)"
severity: "info"
type: "file"
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.