fortinet.fortios.fortios_dlp_profile (2.3.6) — module

Configure DLP profiles in Fortinet's FortiOS and FortiGate.

| "added in version" 2.0.0 of fortinet.fortios"

Authors: Link Zheng (@chillancezen), Jie Xue (@JieX19), Hongbin Lu (@fgtdev-hblu), Frank Shen (@frankshen01), Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico)

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortios:==2.3.6


Add to requirements.yml

  collections:
    - name: fortinet.fortios
      version: 2.3.6

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure DLP profiles.
  fortinet.fortios.fortios_dlp_profile:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      dlp_profile:
          comment: "Comment."
          dlp_log: "enable"
          extended_log: "enable"
          feature_set: "flow"
          full_archive_proto: "smtp"
          nac_quar_log: "enable"
          name: "default_name_9"
          replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
          rule:
              -
                  action: "allow"
                  archive: "disable"
                  expiry: "<your_own_value>"
                  file_size: "0"
                  file_type: "0"
                  filter_by: "sensor"
                  id: "18"
                  label: "<your_own_value> (source dlp.dictionary.name)"
                  match_percentage: "10"
                  name: "default_name_21"
                  proto: "smtp"
                  sensitivity:
                      -
                          name: "default_name_24 (source dlp.sensitivity.name)"
                  sensor:
                      -
                          name: "default_name_26 (source dlp.sensor.name)"
                  severity: "info"
                  type: "file"
          summary_proto: "smtp"

Inputs

    
vdom:
    default: root
    description:
    - 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

state:
    choices:
    - present
    - absent
    description:
    - Indicates whether to create or remove the object.
    required: true
    type: str

enable_log:
    default: false
    description:
    - Enable/Disable logging for task.
    required: false
    type: bool

dlp_profile:
    default: null
    description:
    - Configure DLP profiles.
    suboptions:
      comment:
        description:
        - Comment.
        type: str
      dlp_log:
        choices:
        - enable
        - disable
        description:
        - Enable/disable DLP logging.
        type: str
      extended_log:
        choices:
        - enable
        - disable
        description:
        - Enable/disable extended logging for data leak prevention.
        type: str
      feature_set:
        choices:
        - flow
        - proxy
        description:
        - Flow/proxy feature set.
        type: str
      full_archive_proto:
        choices:
        - smtp
        - pop3
        - imap
        - http-get
        - http-post
        - ftp
        - nntp
        - mapi
        - ssh
        - cifs
        description:
        - Protocols to always content archive.
        elements: str
        type: list
      nac_quar_log:
        choices:
        - enable
        - disable
        description:
        - Enable/disable NAC quarantine logging.
        type: str
      name:
        description:
        - Name of the DLP profile.
        required: true
        type: str
      replacemsg_group:
        description:
        - Replacement message group used by this DLP profile. Source system.replacemsg-group.name.
        type: str
      rule:
        description:
        - Set up DLP rules for this profile.
        elements: dict
        suboptions:
          action:
            choices:
            - allow
            - log-only
            - block
            - quarantine-ip
            description:
            - Action to take with content that this DLP profile matches.
            type: str
          archive:
            choices:
            - disable
            - enable
            description:
            - Enable/disable DLP archiving.
            type: str
          expiry:
            description:
            - Quarantine duration in days, hours, minutes (format = dddhhmm).
            type: str
          file_size:
            description:
            - Match files greater than or equal to this size (KB).
            type: int
          file_type:
            description:
            - Select the number of a DLP file pattern table to match. Source dlp.filepattern.id.
            type: int
          filter_by:
            choices:
            - sensor
            - mip
            - fingerprint
            - encrypted
            - none
            description:
            - Select the type of content to match.
            type: str
          id:
            description:
            - ID. see <a href='#notes'>Notes</a>.
            required: true
            type: int
          label:
            description:
            - MIP label dictionary. Source dlp.dictionary.name.
            type: str
          match_percentage:
            description:
            - Percentage of fingerprints in the fingerprint databases designated with
              the selected sensitivity to match.
            type: int
          name:
            description:
            - Filter name.
            type: str
          proto:
            choices:
            - smtp
            - pop3
            - imap
            - http-get
            - http-post
            - ftp
            - nntp
            - mapi
            - ssh
            - cifs
            description:
            - Check messages or files over one or more of these protocols.
            elements: str
            type: list
          sensitivity:
            description:
            - Select a DLP file pattern sensitivity to match.
            elements: dict
            suboptions:
              name:
                description:
                - Select a DLP sensitivity. Source dlp.sensitivity.name.
                required: true
                type: str
            type: list
          sensor:
            description:
            - Select DLP sensors.
            elements: dict
            suboptions:
              name:
                description:
                - Address name. Source dlp.sensor.name.
                required: true
                type: str
            type: list
          severity:
            choices:
            - info
            - low
            - medium
            - high
            - critical
            description:
            - Select the severity or threat level that matches this filter.
            type: str
          type:
            choices:
            - file
            - fos_message
            description:
            - Select whether to check the content of messages (an email message) or files
              (downloaded files or email attachments).
            type: str
        type: list
      summary_proto:
        choices:
        - smtp
        - pop3
        - imap
        - http-get
        - http-post
        - ftp
        - nntp
        - mapi
        - ssh
        - cifs
        description:
        - Protocols to always log summary.
        elements: str
        type: list
    type: dict

member_path:
    description:
    - Member attribute path to operate on.
    - Delimited by a slash character if there are more than one attribute.
    - Parameter marked with member_path is legitimate for doing member operation.
    type: str

access_token:
    description:
    - Token-based authentication. Generated from GUI of Fortigate.
    required: false
    type: str

member_state:
    choices:
    - present
    - absent
    description:
    - Add or delete a member under specified attribute path.
    - When member_state is specified, the state option is ignored.
    type: str

Outputs

build:
  description: Build number of the fortigate image
  returned: always
  sample: '1547'
  type: str
http_method:
  description: Last method used to provision the content into FortiGate
  returned: always
  sample: PUT
  type: str
http_status:
  description: Last result given by FortiGate on last operation applied
  returned: always
  sample: '200'
  type: str
mkey:
  description: Master key (id) used in the last call to FortiGate
  returned: success
  sample: id
  type: str
name:
  description: Name of the table used to fulfill the request
  returned: always
  sample: urlfilter
  type: str
path:
  description: Path of the table used to fulfill the request
  returned: always
  sample: webfilter
  type: str
revision:
  description: Internal revision number
  returned: always
  sample: 17.0.2.10658
  type: str
serial:
  description: Serial number of the unit
  returned: always
  sample: FGVMEVYYQT3AB5352
  type: str
status:
  description: Indication of the operation's result
  returned: always
  sample: success
  type: str
vdom:
  description: Virtual domain used
  returned: always
  sample: root
  type: str
version:
  description: Version of the FortiGate
  returned: always
  sample: v5.6.3
  type: str