:source: fortios_casb_user_activity.py
:orphan:
.. fortios_casb_user_activity:
fortios_casb_user_activity -- Configure CASB user activity 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 casb feature and user_activity 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.15
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v7.4.1 -> 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
- casb_user_activity - Configure CASB user activity. type: dict
more...
| Supported Version Ranges |
| casb_user_activity |
v7.4.1 -> 7.6.6 |
- application - CASB SaaS application name. Source casb.saas-application.name. type: str
more...
|
Supported Version Ranges |
| application |
v7.4.1 -> 7.6.6 |
- casb_name - CASB user activity signature name. type: str
more...
|
Supported Version Ranges |
| casb_name |
v7.4.1 -> 7.6.6 |
- category - CASB user activity category. type: str choices: activity-control, tenant-control, domain-control, safe-search-control, advanced-tenant-control, other
more...
|
Supported Version Ranges |
| category |
v7.4.1 -> 7.6.6 |
| [activity-control] |
v7.4.1 -> 7.6.6 |
| [tenant-control] |
v7.4.1 -> 7.6.6 |
| [domain-control] |
v7.4.1 -> 7.6.6 |
| [safe-search-control] |
v7.4.1 -> 7.6.6 |
| [advanced-tenant-control] |
v7.6.4 -> 7.6.6 |
| [other] |
v7.4.1 -> 7.6.6 |
- control_options - CASB control options. type: list member_path: control_options:name
more...
| Supported Version Ranges |
| control_options |
v7.4.1 -> 7.6.6 |
- name - CASB control option name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.4.1 -> 7.6.6 |
- operations - CASB control option operations. type: list member_path: control_options:name/operations:name
more...
| Supported Version Ranges |
| operations |
v7.4.1 -> 7.6.6 |
- action - CASB operation action. type: str choices: append, prepend, replace, new, new-on-not-found, delete
more...
|
Supported Version Ranges |
| action |
v7.4.1 -> 7.6.6 |
| [append] |
v7.4.1 -> 7.6.6 |
| [prepend] |
v7.4.1 -> 7.6.6 |
| [replace] |
v7.4.1 -> 7.6.6 |
| [new] |
v7.4.1 -> 7.6.6 |
| [new-on-not-found] |
v7.4.1 -> 7.6.6 |
| [delete] |
v7.4.1 -> 7.6.6 |
- case_sensitive - CASB operation search case sensitive. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| case_sensitive |
v7.4.1 -> 7.6.6 |
| [enable] |
v7.4.1 -> 7.6.6 |
| [disable] |
v7.4.1 -> 7.6.6 |
- direction - CASB operation direction. type: str choices: request, response
more...
|
Supported Version Ranges |
| direction |
v7.4.1 -> 7.6.6 |
| [request] |
v7.4.1 -> 7.6.6 |
| [response] |
v7.6.1 -> 7.6.6 |
- header_name - CASB operation header name to search. type: str
more...
|
Supported Version Ranges |
| header_name |
v7.4.1 -> 7.6.6 |
- name - CASB control option operation name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.4.1 -> 7.6.6 |
- search_key - CASB operation key to search. type: str
more...
|
Supported Version Ranges |
| search_key |
v7.4.1 -> 7.6.6 |
- search_pattern - CASB operation search pattern. type: str choices: simple, substr, regexp
more...
|
Supported Version Ranges |
| search_pattern |
v7.4.1 -> 7.6.6 |
| [simple] |
v7.4.1 -> 7.6.6 |
| [substr] |
v7.4.1 -> 7.6.6 |
| [regexp] |
v7.4.1 -> 7.6.6 |
- target - CASB operation target. type: str choices: header, path, body
more...
|
Supported Version Ranges |
| target |
v7.4.1 -> 7.6.6 |
| [header] |
v7.4.1 -> 7.6.6 |
| [path] |
v7.4.1 -> 7.6.6 |
| [body] |
v7.6.1 -> 7.6.6 |
- value_from_input - Enable/disable value from user input. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| value_from_input |
v7.4.1 -> 7.6.6 |
| [enable] |
v7.4.1 -> 7.6.6 |
| [disable] |
v7.4.1 -> 7.6.6 |
- value_name_from_input - CASB operation value name from user input. type: str
more...
|
Supported Version Ranges |
| value_name_from_input |
v7.6.4 -> 7.6.6 |
- values - CASB operation new values. type: list member_path: control_options:name/operations:name/values:value
more...
| Supported Version Ranges |
| values |
v7.4.1 -> 7.6.6 |
- value - Operation value. type: str required: true
more...
|
Supported Version Ranges |
| value |
v7.4.1 -> 7.6.6 |
- status - CASB control option status. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v7.4.2 -> 7.6.6 |
| [enable] |
v7.4.2 -> 7.6.6 |
| [disable] |
v7.4.2 -> 7.6.6 |
- description - CASB user activity description. type: str
more...
|
Supported Version Ranges |
| description |
v7.4.1 -> 7.6.6 |
- match - CASB user activity match rules. type: list member_path: match:id
more...
| Supported Version Ranges |
| match |
v7.4.1 -> 7.6.6 |
- id - CASB user activity match rules ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v7.4.1 -> 7.6.6 |
- rules - CASB user activity rules. type: list member_path: match:id/rules:id
more...
| Supported Version Ranges |
| rules |
v7.4.1 -> 7.6.6 |
- body_type - CASB user activity match rule body type. type: str choices: json
more...
|
Supported Version Ranges |
| body_type |
v7.6.1 -> 7.6.6 |
| [json] |
v7.6.1 -> 7.6.6 |
- case_sensitive - CASB user activity match case sensitive. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| case_sensitive |
v7.4.1 -> 7.6.6 |
| [enable] |
v7.4.1 -> 7.6.6 |
| [disable] |
v7.4.1 -> 7.6.6 |
- domains - CASB user activity domain list. type: list member_path: match:id/rules:id/domains:domain
more...
| Supported Version Ranges |
| domains |
v7.4.1 -> 7.6.6 |
- domain - Domain list separated by space. type: str required: true
more...
|
Supported Version Ranges |
| domain |
v7.4.1 -> 7.6.6 |
- header_name - CASB user activity rule header name. type: str
more...
|
Supported Version Ranges |
| header_name |
v7.4.1 -> 7.6.6 |
- id - CASB user activity rule ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v7.4.1 -> 7.6.6 |
- jq - CASB user activity rule match jq script. type: str
more...
|
Supported Version Ranges |
| jq |
v7.6.1 -> 7.6.6 |
- match_pattern - CASB user activity rule match pattern. type: str choices: simple, substr, regexp
more...
|
Supported Version Ranges |
| match_pattern |
v7.4.1 -> 7.6.6 |
| [simple] |
v7.4.1 -> 7.6.6 |
| [substr] |
v7.4.1 -> 7.6.6 |
| [regexp] |
v7.4.1 -> 7.6.6 |
- match_value - CASB user activity rule match value. type: str
more...
|
Supported Version Ranges |
| match_value |
v7.4.1 -> 7.6.6 |
- methods - CASB user activity method list. type: list member_path: match:id/rules:id/methods:method
more...
| Supported Version Ranges |
| methods |
v7.4.1 -> 7.6.6 |
- method - User activity method. type: str required: true
more...
|
Supported Version Ranges |
| method |
v7.4.1 -> 7.6.6 |
- negate - Enable/disable what the matching strategy must not be. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| negate |
v7.4.1 -> 7.6.6 |
| [enable] |
v7.4.1 -> 7.6.6 |
| [disable] |
v7.4.1 -> 7.6.6 |
- type - CASB user activity rule type. type: str choices: domains, host, path, header, header-value, method, body
more...
|
Supported Version Ranges |
| type |
v7.4.1 -> 7.6.6 |
| [domains] |
v7.4.1 -> 7.6.6 |
| [host] |
v7.4.1 -> 7.6.6 |
| [path] |
v7.4.1 -> 7.6.6 |
| [header] |
v7.4.1 -> 7.6.6 |
| [header-value] |
v7.4.1 -> 7.6.6 |
| [method] |
v7.4.1 -> 7.6.6 |
| [body] |
v7.6.1 -> 7.6.6 |
- strategy - CASB user activity rules strategy. type: str choices: and, or
more...
|
Supported Version Ranges |
| strategy |
v7.4.1 -> 7.6.6 |
| [and] |
v7.4.1 -> 7.6.6 |
| [or] |
v7.4.1 -> 7.6.6 |
- tenant_extraction - CASB user activity tenant extraction. type: dict
more...
| Supported Version Ranges |
| tenant_extraction |
v7.6.1 -> 7.6.6 |
- filters - CASB user activity tenant extraction filters. type: list member_path: match:id/tenant_extraction/filters:id
more...
| Supported Version Ranges |
| filters |
v7.6.1 -> 7.6.6 |
- body_type - CASB tenant extraction filter body type. type: str choices: json
more...
|
Supported Version Ranges |
| body_type |
v7.6.1 -> 7.6.6 |
| [json] |
v7.6.1 -> 7.6.6 |
- direction - CASB tenant extraction filter direction. type: str choices: request, response
more...
|
Supported Version Ranges |
| direction |
v7.6.1 -> 7.6.6 |
| [request] |
v7.6.1 -> 7.6.6 |
| [response] |
v7.6.1 -> 7.6.6 |
- header_name - CASB tenant extraction filter header name. type: str
more...
|
Supported Version Ranges |
| header_name |
v7.6.1 -> 7.6.6 |
- id - CASB tenant extraction filter ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v7.6.1 -> 7.6.6 |
- place - CASB tenant extraction filter place type. type: str choices: path, header, body
more...
|
Supported Version Ranges |
| place |
v7.6.1 -> 7.6.6 |
| [path] |
v7.6.1 -> 7.6.6 |
| [header] |
v7.6.1 -> 7.6.6 |
| [body] |
v7.6.1 -> 7.6.6 |
- jq - CASB user activity tenant extraction jq script. type: str
more...
|
Supported Version Ranges |
| jq |
v7.6.1 -> 7.6.6 |
- status - Enable/disable CASB tenant extraction. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| status |
v7.6.1 -> 7.6.6 |
| [disable] |
v7.6.1 -> 7.6.6 |
| [enable] |
v7.6.1 -> 7.6.6 |
- type - CASB user activity tenant extraction type. type: str choices: json-query
more...
|
Supported Version Ranges |
| type |
v7.6.1 -> 7.6.6 |
| [json-query] |
v7.6.1 -> 7.6.6 |
- match_strategy - CASB user activity match strategy. type: str choices: and, or
more...
|
Supported Version Ranges |
| match_strategy |
v7.4.1 -> 7.6.6 |
| [and] |
v7.4.1 -> 7.6.6 |
| [or] |
v7.4.1 -> 7.6.6 |
- name - CASB user activity name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.4.1 -> 7.6.6 |
- status - CASB user activity status. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v7.4.2 -> 7.6.6 |
| [enable] |
v7.4.2 -> 7.6.6 |
| [disable] |
v7.4.2 -> 7.6.6 |
- type - CASB user activity type. type: str choices: built-in, customized
more...
|
Supported Version Ranges |
| type |
v7.4.1 -> 7.6.6 |
| [built-in] |
v7.4.1 -> 7.6.6 |
| [customized] |
v7.4.1 -> 7.6.6 |
- uuid - Universally Unique Identifier (UUID; automatically assigned but can be manually reset). type: str
more...
|
Supported Version Ranges |
| uuid |
v7.4.1 -> 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 CASB user activity.
fortinet.fortios.fortios_casb_user_activity:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
casb_user_activity:
application: " (source casb.saas-application.name)"
casb_name: ""
category: "activity-control"
control_options:
-
name: "default_name_7"
operations:
-
action: "append"
case_sensitive: "enable"
direction: "request"
header_name: ""
name: "default_name_13"
search_key: ""
search_pattern: "simple"
target: "header"
value_from_input: "enable"
value_name_from_input: ""
values:
-
value: ""
status: "enable"
description: ""
match:
-
id: "24"
rules:
-
body_type: "json"
case_sensitive: "enable"
domains:
-
domain: ""
header_name: ""
id: "31"
jq: ""
match_pattern: "simple"
match_value: ""
methods:
-
method: ""
negate: "enable"
type: "domains"
strategy: "and"
tenant_extraction:
filters:
-
body_type: "json"
direction: "request"
header_name: ""
id: "45"
place: "path"
jq: ""
status: "disable"
type: "json-query"
match_strategy: "and"
name: "default_name_51"
status: "enable"
type: "built-in"
uuid: ""
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.