-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tufin SecureCloud - List K8S Clusters.json
429 lines (429 loc) · 16.9 KB
/
Tufin SecureCloud - List K8S Clusters.json
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
{
"workflow": {
"unique_name": "definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe",
"name": "Tufin SecureCloud - List K8S Clusters",
"title": "Tufin SecureCloud - List K8S Clusters",
"type": "generic.workflow",
"base_type": "workflow",
"variables": [
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "input",
"name": "Account Name",
"type": "datatype.string",
"description": "Tufin SecureCloud account name. If your URL is \"myaccount.securecloud.tufin.io\", your account name should be \"myaccount\". Do not include \"securecloud.tufin.io\" in this variable.",
"is_required": true,
"is_invisible": false
},
"unique_name": "variable_workflow_01Q67AB4179M43Wy0QHy3NA2zLYu3cjCNJ9",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.secure_string",
"properties": {
"value": "*****",
"scope": "input",
"name": "API Access Key",
"type": "datatype.secure_string",
"description": "Your Tufin SecureCloud API access key. For more information, see https://forum.tufin.com/support/kc/securecloud/Content/SecureCloud/APIAccessKeys.htm",
"is_required": true,
"is_invisible": false
},
"unique_name": "variable_workflow_01Q67AB4177TL7i5ILPVNSzNrMWzyXwKYNy",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.string",
"properties": {
"value": "[]",
"scope": "output",
"name": "Cluster Objects JSON",
"type": "datatype.string",
"description": "Output in JSON format",
"is_required": false,
"is_invisible": false
},
"unique_name": "variable_workflow_01Q67AB41739W7ejEkqbzgf7NE8ZYZYmIW3",
"object_type": "variable_workflow"
}
],
"properties": {
"atomic": {
"atomic_group": "Tufin",
"is_atomic": true
},
"delete_workflow_instance": false,
"description": "List all Kubernetes clusters",
"display_name": "Tufin SecureCloud - List K8S Clusters",
"runtime_user": {
"target_default": true
},
"target": {
"target_type": "web-service.endpoint",
"specify_on_workflow_start": true
}
},
"object_type": "definition_workflow",
"actions": [
{
"unique_name": "definition_activity_01Q67ABEXXQC923tYZeRXKeF4ieGpX4hMSk",
"name": "Execute Python Script",
"title": "Build Hostname for API",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"description": "Build the host parameter for the Host HTTP header",
"display_name": "Build Hostname for API",
"script": "import sys\nhostname = sys.argv[1]\nhostname = '{}.securecloud.tufin.io'.format(hostname)",
"script_arguments": [
"$workflow.definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe.input.variable_workflow_01Q67AB4179M43Wy0QHy3NA2zLYu3cjCNJ9$"
],
"script_queries": [
{
"script_query": "hostname",
"script_query_name": "Host Name",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90",
"name": "HTTP Request",
"title": "Get Clusters",
"type": "web-service.http_request",
"base_type": "activity",
"properties": {
"accept": "application/json",
"action_timeout": 180,
"allow_auto_redirect": true,
"continue_on_error_status_code": true,
"continue_on_failure": true,
"custom_headers": [
{
"name": "Authorization",
"value": "Bearer $workflow.definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe.input.variable_workflow_01Q67AB4177TL7i5ILPVNSzNrMWzyXwKYNy$"
},
{
"name": "Host",
"value": "$activity.definition_activity_01Q67ABEXXQC923tYZeRXKeF4ieGpX4hMSk.output.script_queries.Host Name$"
}
],
"display_name": "Get Clusters",
"method": "GET",
"relative_url": "/api/v1/orca/conf/clusters",
"runtime_user": {
"target_default": true
},
"skip_execution": false,
"target": {
"use_workflow_target": true
}
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01Q67ABNEFYX36TuPBWRJSaLkoFEcPvXuVT",
"name": "Condition Block",
"title": "Is Response OK?",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Is Response OK?",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01Q67ABRS49727IspdKAbhXRqE9qVpNKvNt",
"name": "Condition Branch",
"title": "No without Status Code",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90.output.succeeded$",
"operator": "eq",
"right_operand": false
},
"continue_on_failure": false,
"display_name": "No without Status Code",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01Q67ABTTRW1M2jld3PqMBO2ivmJHL6ZN5V",
"name": "Execute Python Script",
"title": "Create Error Message",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"display_name": "Create Error Message",
"script": "import sys, json\nmessage = sys.argv[1].replace('\"', '\\'')\nerror = {\"message\": message}\nerror = json.dumps(error)",
"script_arguments": [
"$activity.definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90.output.error.message$"
],
"script_queries": [
{
"script_query": "error",
"script_query_name": "Error",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01Q67ABYKN36U6pgu3ydUeqflS8pBn4Wtoz",
"name": "Completed",
"title": "Completed with Error",
"type": "logic.completed",
"base_type": "activity",
"properties": {
"completion_type": "failed-completed",
"continue_on_failure": false,
"display_name": "Completed with Error",
"result_message": "$activity.definition_activity_01Q67ABTTRW1M2jld3PqMBO2ivmJHL6ZN5V.output.script_queries.Error$",
"skip_execution": false
},
"object_type": "definition_activity"
}
]
},
{
"unique_name": "definition_activity_01Q67AC2VMV1V08PTfpsnaaKaxlOOrVgQ3Q",
"name": "Condition Branch",
"title": "No with Status Code",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90.output.status_code$",
"operator": "ne",
"right_operand": 200
},
"continue_on_failure": false,
"display_name": "No with Status Code",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01Q67AC4XQMMR4XzgFmzHdOrldpPEgIAMGY",
"name": "Execute Python Script",
"title": "Create Error Message",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"display_name": "Create Error Message",
"script": "import sys, json\nstatus_code = sys.argv[1]\nmessage = sys.argv[2]\nerror = {\"status_code\": status_code, \"message\": message}\nerror = json.dumps(error)",
"script_arguments": [
"$activity.definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90.output.status_code$",
"$activity.definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90.output.response_body$"
],
"script_queries": [
{
"script_query": "error",
"script_query_name": "Error",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01Q67AC9Q3LIE44wdzQzrJ4lGgmNNFlOZtW",
"name": "Completed",
"title": "Completed with Error",
"type": "logic.completed",
"base_type": "activity",
"properties": {
"completion_type": "failed-completed",
"continue_on_failure": false,
"display_name": "Completed with Error",
"result_message": "$activity.definition_activity_01Q67AC4XQMMR4XzgFmzHdOrldpPEgIAMGY.output.script_queries.Error$",
"skip_execution": false
},
"object_type": "definition_activity"
}
]
}
]
},
{
"unique_name": "definition_activity_01Q67ACDX15Q53G2JPzqEAb3puVLlfc19fo",
"name": "Execute Python Script",
"title": "Build Cluster Object JSON",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": true,
"display_name": "Build Cluster Object JSON",
"script": "import sys, json\ndef from_json(string):\n return json.loads(string)\nresults, cluster_objects = map(from_json, sys.argv[1:])\nfor item in results['clusters']:\n cluster_objects.append(\n item\n )\ncluster_objects= json.dumps(cluster_objects)",
"script_arguments": [
"$activity.definition_activity_01Q67ABJ31C6F2616zXN9nW1Cj6iyKkCj90.output.response_body$",
"$workflow.definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe.output.variable_workflow_01Q67AB41739W7ejEkqbzgf7NE8ZYZYmIW3$"
],
"script_queries": [
{
"script_query": "cluster_objects",
"script_query_name": "Cluster Objects",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01Q67ACIMET9V4MsndeQjkCCQaIhxVPWgqM",
"name": "Condition Block",
"title": "Object Extraction Succeeded?",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Object Extraction Succeeded?",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01Q67ACMY8HE92poY0OVfMZ3chMmiJwxbWC",
"name": "Condition Branch",
"title": "No",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01Q67ACDX15Q53G2JPzqEAb3puVLlfc19fo.output.succeeded$",
"operator": "eq",
"right_operand": false
},
"continue_on_failure": false,
"display_name": "No",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01Q67ACP0191A2sRcc85FPUpEI1wBIF9Frh",
"name": "Completed",
"title": "Error Message",
"type": "logic.completed",
"base_type": "activity",
"properties": {
"completion_type": "failed-completed",
"continue_on_failure": false,
"display_name": "Error Message",
"result_message": "{\"message\": \"Tufin response data structure has changed. Atomic action needs to be fixed.\"}",
"skip_execution": false
},
"object_type": "definition_activity"
}
]
}
]
},
{
"unique_name": "definition_activity_01Q67ACT7UNIF061acl3Mwh7aUKcnSAE9bX",
"name": "Set Variables",
"title": "Set Cluster Object JSON",
"type": "core.set_multiple_variables",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Set Cluster Object JSON",
"skip_execution": false,
"variables_to_update": [
{
"variable_to_update": "$workflow.definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe.output.variable_workflow_01Q67AB41739W7ejEkqbzgf7NE8ZYZYmIW3$",
"variable_value_new": "$activity.definition_activity_01Q67ACDX15Q53G2JPzqEAb3puVLlfc19fo.output.script_queries.Cluster Objects$"
}
]
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01Q67AD0CWFNK063A6gVAdwncN7hlazN0xZ",
"name": "Condition Block",
"title": "Are There Asset Objects?",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Are There Asset Objects?",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01Q67AD6DTF6L2Pn6m2gvft6W3uH1l9yCmf",
"name": "Condition Branch",
"title": "No",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$workflow.definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe.output.variable_workflow_01Q67AB41739W7ejEkqbzgf7NE8ZYZYmIW3$",
"operator": "eq",
"right_operand": "[]"
},
"continue_on_failure": false,
"display_name": "No",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01Q67AD86GY837S6p13Ff7hoFM1zlIpqkMh",
"name": "Completed",
"title": "No Objects Message",
"type": "logic.completed",
"base_type": "activity",
"properties": {
"completion_type": "failed-completed",
"continue_on_failure": false,
"display_name": "No Objects Message",
"result_message": "{\"message\": \"There are no network objects\"}",
"skip_execution": false
},
"object_type": "definition_activity"
}
]
}
]
}
],
"categories": [
"category_01G4JLUINA0E65x8iCa6Behj8y9V0ZE9f8O"
]
},
"categories": {
"category_01G4JLUINA0E65x8iCa6Behj8y9V0ZE9f8O": {
"unique_name": "category_01G4JLUINA0E65x8iCa6Behj8y9V0ZE9f8O",
"name": "Tufin",
"title": "Tufin",
"type": "basic.category",
"base_type": "category",
"description": "Tufin Orchestration Suite",
"category_type": "custom",
"object_type": "category"
}
}
}