fortinet.fortios.fortios_dlp_sensor (2.3.6) — module

Configure sensors used by DLP blocking 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 sensor 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 sensors used by DLP blocking.
  fortinet.fortios.fortios_dlp_sensor:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      dlp_sensor:
          comment: "Optional comments."
          dlp_log: "enable"
          entries:
              -
                  count: "1"
                  dictionary: "<your_own_value> (source dlp.dictionary.name dlp.exact-data-match.name)"
                  id: "8"
                  status: "enable"
          eval: "<your_own_value>"
          extended_log: "enable"
          feature_set: "flow"
          filter:
              -
                  action: "allow"
                  archive: "disable"
                  company_identifier: "myId_16"
                  expiry: "<your_own_value>"
                  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: "<your_own_value>"
                  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: "<your_own_value>"
          replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
          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

dlp_sensor:
    default: null
    description:
    - Configure sensors used by DLP blocking.
    suboptions:
      comment:
        description:
        - Optional comments.
        type: str
      dlp_log:
        choices:
        - enable
        - disable
        description:
        - Enable/disable DLP logging.
        type: str
      entries:
        description:
        - DLP sensor entries.
        elements: dict
        suboptions:
          count:
            description:
            - 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
          dictionary:
            description:
            - Select a DLP dictionary. Source dlp.dictionary.name dlp.exact-data-match.name.
            type: str
          id:
            description:
            - ID. see <a href='#notes'>Notes</a>.
            required: true
            type: int
          status:
            choices:
            - enable
            - disable
            description:
            - Enable/disable this entry.
            type: str
        type: list
      eval:
        description:
        - Expression to evaluate.
        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
      filter:
        description:
        - Set up DLP filters for this sensor.
        elements: dict
        suboptions:
          action:
            choices:
            - allow
            - log-only
            - block
            - quarantine-ip
            description:
            - Action to take with content that this DLP sensor matches.
            type: str
          archive:
            choices:
            - disable
            - enable
            description:
            - Enable/disable DLP archiving.
            type: str
          company_identifier:
            description:
            - Enter a company identifier watermark to match. Only watermarks that your
              company has placed on the files are matched.
            type: str
          expiry:
            description:
            - Quarantine duration in days, hours, minutes (format = dddhhmm).
            type: str
          file_size:
            description:
            - Match files this size or larger (0 - 4294967295 kbytes).
            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:
            - credit-card
            - ssn
            - regexp
            - file-type
            - file-size
            - fingerprint
            - watermark
            - encrypted
            description:
            - Select the type of content to match.
            type: str
          fp_sensitivity:
            description:
            - Select a DLP file pattern sensitivity to match.
            elements: dict
            suboptions:
              name:
                description:
                - Select a DLP sensitivity. Source dlp.fp-sensitivity.name.
                required: true
                type: str
            type: list
          id:
            description:
            - ID. see <a href='#notes'>Notes</a>.
            required: true
            type: int
          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
            - mm1
            - mm3
            - mm4
            - mm7
            description:
            - Check messages or files over one or more of these protocols.
            elements: str
            type: list
          regexp:
            description:
            - Enter a regular expression to match (max. 255 characters).
            type: str
          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
          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
      flow_based:
        choices:
        - enable
        - disable
        description:
        - Enable/disable flow-based DLP.
        type: str
      full_archive_proto:
        choices:
        - smtp
        - pop3
        - imap
        - http-get
        - http-post
        - ftp
        - nntp
        - mapi
        - ssh
        - cifs
        - mm1
        - mm3
        - mm4
        - mm7
        description:
        - Protocols to always content archive.
        elements: str
        type: list
      match_type:
        choices:
        - match-all
        - match-any
        - match-eval
        description:
        - Logical relation between entries .
        type: str
      nac_quar_log:
        choices:
        - enable
        - disable
        description:
        - Enable/disable NAC quarantine logging.
        type: str
      name:
        description:
        - Name of table containing the sensor.
        required: true
        type: str
      options:
        description:
        - Configure DLP options.
        type: str
      replacemsg_group:
        description:
        - Replacement message group used by this DLP sensor. Source system.replacemsg-group.name.
        type: str
      summary_proto:
        choices:
        - smtp
        - pop3
        - imap
        - http-get
        - http-post
        - ftp
        - nntp
        - mapi
        - ssh
        - cifs
        - mm1
        - mm3
        - mm4
        - mm7
        description:
        - Protocols to always log summary.
        elements: str
        type: list
    type: dict

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

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