Skip to content

Commit

Permalink
Added timeout option to authentication module
Browse files Browse the repository at this point in the history
  • Loading branch information
mrendo committed Jan 10, 2023
1 parent c2d77b4 commit a28c84e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/cyberark_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions plugins/modules/cyberark_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -240,6 +246,7 @@ def processAuthentication(module):
headers=headers,
data=payload,
validate_certs=validate_certs,
timeout=timeout,
)

except (HTTPError, HTTPException) as http_exception:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a28c84e

Please sign in to comment.