forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript-ArcherTestCredentials.yml
46 lines (42 loc) · 1.18 KB
/
script-ArcherTestCredentials.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
commonfields:
id: CheckArcherInstance
version: -1
name: CheckArcherInstance
script: |-
import rsa_archer.archer_instance as arc
args = demisto.args()
password = args["password"]
instance_name = args["instance_name"]
username = args["username"]
server_url = args["server_url"]
def new_log(s, s2):
raise Exception(s % s2)
arc.log.error = new_log
try:
archer_instance = arc.ArcherInstance(server_url, instance_name, username, password)
demisto.results("Success - your credentials are valid")
except Exception as e:
return_error("Your credentials are invalid.\n Error from Archer: {}".format(str(e)))
type: python
tags: []
comment: Checks whether given Archer credentials are valid
enabled: true
args:
- name: password
required: true
description: Password for the Archer instance.
- name: instance_name
required: true
description: Instance name for the Archer instance.
- name: username
required: true
description: Username name for the Archer instance.
- name: server_url
required: true
description: Server URL name for the Archer instance.
scripttarget: 0
runonce: false
dockerimage: demisto/archer:1.0.0.270
runas: DBotWeakRole
tests:
- No Test