From a28c84ef8689de06983f7ae31ee6aaa4a008d838 Mon Sep 17 00:00:00 2001 From: "Luke Cameron (Mr EnDo)" Date: Fri, 4 Nov 2022 20:38:35 +0000 Subject: [PATCH 1/2] Added timeout option to authentication module --- docs/cyberark_authentication.md | 5 +++++ plugins/modules/cyberark_authentication.py | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/cyberark_authentication.md b/docs/cyberark_authentication.md index 500f6e7..57a4663 100644 --- a/docs/cyberark_authentication.md +++ b/docs/cyberark_authentication.md @@ -44,6 +44,11 @@ options: cyberark_session: description: - Dictionary set by a CyberArk authentication containing the different values to perform actions on a logged-on CyberArk session. + timeout: + type: int + default: 10 + description: + - Allows you set a timeout for when your authenticating to Cyberark ``` ## Example Playbooks diff --git a/plugins/modules/cyberark_authentication.py b/plugins/modules/cyberark_authentication.py index d84dce3..9d73205 100644 --- a/plugins/modules/cyberark_authentication.py +++ b/plugins/modules/cyberark_authentication.py @@ -92,6 +92,10 @@ different values to perform actions on a logged-on CyberArk session. type: dict + timeout: + description: + - Allows you set a timeout for when your authenticating to Cyberark + type: int """ EXAMPLES = """ @@ -171,6 +175,8 @@ def processAuthentication(module): concurrentSession = module.params["concurrentSession"] + timeout = module.params["timeout"] + # if in check mode it will not perform password changes if module.check_mode and new_password is not None: new_password = None @@ -240,6 +246,7 @@ def processAuthentication(module): headers=headers, data=payload, validate_certs=validate_certs, + timeout=timeout, ) except (HTTPError, HTTPException) as http_exception: @@ -336,6 +343,7 @@ def main(): "default": "present", }, "cyberark_session": {"type": "dict"}, + "timeout": {"default": 10, "type": "int"}, } # cyberark and radius -> mutually_exclusive is cyberark and ldap From eb8dfda3132e7b13746a676c19fc03d7d5d965b6 Mon Sep 17 00:00:00 2001 From: "Luke Cameron (Mr. EnDo)" Date: Tue, 10 Jan 2023 19:36:18 +0000 Subject: [PATCH 2/2] Bumped version to 1.0.16 --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 921b003..e475ca8 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: "cyberark" name: "pas" -version: "1.0.15" +version: "1.0.16" readme: README.md authors: - CyberArk Business Development (@cyberark-bizdev)