zscaler.zpacloud.zpa_app_protection_custom_control module – Create, update, or delete Zscaler Private Access (ZPA) app protection custom controls.
Note
This module is part of the zscaler.zpacloud collection (version 1.4.2).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install zscaler.zpacloud
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: zscaler.zpacloud.zpa_app_protection_custom_control
.
New in zscaler.zpacloud 1.0.0
Synopsis
This Ansible module enables you to manage Zscaler Private Access (ZPA) app protection custom controls in the ZPA Cloud.
You can use this module to create new custom controls, update existing ones, or delete custom controls as needed.
Requirements
The below requirements are needed on the host that executes this module.
Zscaler SDK Python can be obtained from PyPI https://pypi.org/project/zscaler-sdk-python/
Parameters
Parameter |
Comments |
---|---|
The action of the custom control. Choices:
|
|
Denotes the action. Supports any string. |
|
The ZPA API client ID generated from the ZPA console. |
|
The ZPA API client secret generated from the ZPA console. |
|
The ZPA cloud provisioned for your organization. Choices:
|
|
The control rule in JSON format that has the conditions and type of control for the AppProtection control. |
|
The control type of the custom control. Choices:
|
|
The ZPA tenant ID found in the Administration Company menu in the ZPA console. |
|
The performed action. Choices:
|
|
Used to provide the redirect URL if the default action is set to REDIRECT. |
|
The description of the custom control. |
|
The unique identifier of the custom control. |
|
The name of the custom control. |
|
The OWASP Predefined Paranoia Level. Choices:
|
|
The protocol type of the custom control. Choices:
|
|
A dict object containing authentication details. |
|
The ZPA API client ID generated from the ZPA console. |
|
The ZPA API client secret generated from the ZPA console. |
|
The ZPA cloud provisioned for your organization. Choices:
|
|
The ZPA tenant ID found in the Administration Company menu in the ZPA console. |
|
The rules of the custom controls applied as conditions |
|
The conditions of the AppProtection rule |
|
The key for the object type Choices:
|
|
The operation type Choices:
|
|
The value for the given object type. Its value depends upon the key. |
|
The names of the AppProtection rule |
|
The type of the AppProtection rule. Choices:
|
|
The severity of the AppProtection control number. Choices:
|
|
The state. Choices:
|
|
The rules to be applied to the request or response type. Choices:
|
Notes
Note
Check mode is supported.
Examples
- name: Create App Protection Custom Control
zscaler.zpacloud.zpa_app_protection_custom_controls:
provider: "{{ zpa_cloud }}"
name: "Example_App_Protection_Custom_Control"
description: "Example_App_Protection_Custom_Control"
action: "PASS"
default_action: PASS
paranoia_level: "2"
severity: "CRITICAL"
type: "REQUEST"
protocol_type: "HTTP"
rules:
- conditions:
- lhs: VALUE
op: RX
rhs: "test"
- lhs: SIZE
op: EQ
rhs: "1000"
names:
- example1
- example2
- example3
type: REQUEST_HEADERS
- conditions:
- lhs: VALUE
op: RX
rhs: "test"
- lhs: SIZE
op: LE
rhs: "1000"
names:
- example1
- example2
- example3
type: REQUEST_COOKIES
- conditions:
- lhs: SIZE
op: EQ
rhs: "1000"
- lhs: VALUE
op: CONTAINS
rhs: "test-ansible"
type: REQUEST_URI
- conditions:
- lhs: SIZE
op: EQ
rhs: "1000"
- lhs: VALUE
op: STARTS_WITH
rhs: "test-ansible"
type: QUERY_STRING