-
Notifications
You must be signed in to change notification settings - Fork 41
Files
/
Copy pathcyberark_authentication.py
374 lines (311 loc) · 11.8 KB
1
2
#!/usr/bin/python
# Copyright: (c) 2017, Ansible Project
3
4
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6
7
8
__metaclass__ = type
9
10
11
12
13
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "certified",
}
14
15
DOCUMENTATION = """
16
17
---
module: cyberark_authentication
18
short_description: CyberArk Authentication using PAS Web Services SDK.
19
author:
20
21
- Edward Nunez (@enunez-cyberark) CyberArk BizDev
- Cyberark Bizdev (@cyberark-bizdev)
22
- Edgar Mota
23
24
version_added: 2.4
description:
25
26
27
28
- Authenticates to CyberArk Vault using Privileged Account Security
Web Services SDK and creates a session fact that can be used by other
modules. It returns an Ansible fact called I(cyberark_session). Every
module can use this fact as C(cyberark_session) parameter.
29
30
31
32
33
options:
state:
default: present
choices: [present, absent]
description:
34
35
- Specifies if an authentication logon/logoff and a
cyberark_session should be added/removed.
36
type: str
37
38
39
username:
description:
- The name of the user who will logon to the Vault.
40
type: str
41
42
43
password:
description:
- The password of the user.
44
type: str
45
46
new_password:
description:
47
48
- The new password of the user. This parameter is optional,
and enables you to change a password.
49
type: str
50
51
api_base_url:
description:
52
53
- A string containing the base URL of the server hosting
CyberArk's Privileged Account Security Web Services SDK.
54
type: str
55
56
57
58
validate_certs:
type: bool
default: 'yes'
description:
59
60
61
- If C(false), SSL certificates will not be validated. This
should only set to C(false) used on personally controlled
sites using self-signed certificates.
62
use_ldap_authentication:
63
64
65
type: bool
default: 'no'
description:
66
67
68
69
70
71
72
73
74
75
76
- Whether or not LDAP will be used.
use_windows_authentication:
type: bool
default: 'no'
description:
- Whether or not Windows will be used.
use_cyberark_authentication:
type: bool
default: 'no'
description:
- Whether or not LDAP will be used.
77
78
79
80
use_radius_authentication:
type: bool
default: 'no'
description:
81
82
- Whether or not users will be authenticated via a RADIUS
server. Valid values are true/false.
83
84
85
86
87
connection_number:
type: int
description:
- To support multiple connections for same user specify
- different value for this parameter.
88
89
cyberark_session:
description:
90
91
92
- Dictionary set by a CyberArk authentication containing the
different values to perform actions on a logged-on CyberArk
session.
93
type: dict
94
"""
95
96
EXAMPLES = """
97
- name: Logon - use_shared_logon_authentication
98
99
100
101
cyberark_authentication:
api_base_url: "{{ web_services_base_url }}"
use_shared_logon_authentication: yes