Skip to content

Commit

Permalink
Merge pull request #48 from mrendo/master
Browse files Browse the repository at this point in the history
Added timeout option to authentication module
  • Loading branch information
infamousjoeg authored Jan 11, 2023
2 parents c2d77b4 + eb8dfda commit dcce173
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -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)
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 dcce173

Please sign in to comment.