-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTufin SecureCloud - Search Assets by IP.json
667 lines (667 loc) · 33.2 KB
/
Tufin SecureCloud - Search Assets by IP.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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
{
"workflow": {
"unique_name": "definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi",
"name": "Tufin SecureCloud - Search Assets by IP",
"title": "Tufin SecureCloud - Search Assets by IP",
"type": "generic.workflow",
"base_type": "workflow",
"variables": [
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "local",
"name": "Cluster List Results",
"type": "datatype.string",
"is_required": false,
"is_invisible": false
},
"unique_name": "variable_workflow_01TD2FWRBTYXU5hpD35E4or3ZnQmjCkanyQ",
"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_01TD1UXENB8QZ0vSRaOiCnPN9uT1K3TT1JG",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "input",
"name": "Cluster Name",
"type": "datatype.string",
"description": "Limit the K8S service search to the specified cluster name",
"is_required": false,
"is_invisible": false
},
"unique_name": "variable_workflow_01TD2AD919WOD7id7d1Q7EJlptQVMAeYuuB",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "output",
"name": "Public Cloud Asset Matches",
"type": "datatype.string",
"description": "Public cloud assets with public or private IP addresses matching the queried IP address",
"is_required": false,
"is_invisible": false
},
"unique_name": "variable_workflow_01TD1SP9T2QX13gViFiDICeFSjkzMmf1HmE",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "input",
"name": "IP Address",
"type": "datatype.string",
"description": "IP address to query",
"is_required": true,
"is_invisible": false
},
"unique_name": "variable_workflow_01TD1TXOBRG2R2vX8sOymuHRTGaf66OG9rD",
"object_type": "variable_workflow"
},
{
"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_01TD1A7INDT1E5K6WfS25ihNRkI76uAy7Oo",
"object_type": "variable_workflow"
},
{
"schema_id": "datatype.string",
"properties": {
"value": "",
"scope": "output",
"name": "K8S Service Matches",
"type": "datatype.string",
"description": "K8S services with private or endpoint IP addresses matching the queried IP address",
"is_required": false,
"is_invisible": false
},
"unique_name": "variable_workflow_01TD30HTNMK9356Nfig6mFL5GrIcJGKncsi",
"object_type": "variable_workflow"
}
],
"properties": {
"atomic": {
"is_atomic": false
},
"delete_workflow_instance": false,
"display_name": "Tufin SecureCloud - Search Assets by IP",
"runtime_user": {
"target_default": true
},
"target": {
"target_type": "web-service.endpoint",
"target_id": "definition_target_01PWZLT9GER3Q5MT13QpgdehNObJ765ywlu",
"execute_on_workflow_target": true
}
},
"object_type": "definition_workflow",
"actions": [
{
"unique_name": "definition_activity_01TD19E1K5N7P1BL93W1vZ2J9TCrE9q3B6M",
"name": "Tufin SecureCloud - List Assets",
"title": "Tufin SecureCloud - List Assets",
"type": "workflow.atomic_workflow",
"base_type": "subworkflow",
"properties": {
"continue_on_failure": true,
"display_name": "Tufin SecureCloud - List Assets",
"input": {
"variable_workflow_01PX1Z31K84YY17P58WjIXCraIJJTTCWvBm": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1UXENB8QZ0vSRaOiCnPN9uT1K3TT1JG$",
"variable_workflow_01Q66NQF16F0W2jTGCXj6G20Ki3Xq9Bktlv": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1A7INDT1E5K6WfS25ihNRkI76uAy7Oo$"
},
"runtime_user": {
"target_default": true
},
"skip_execution": false,
"target": {
"target_type": "web-service.endpoint",
"use_workflow_target": true
},
"workflow_id": "definition_workflow_01PV33IJRWZSX3qfvJcGqeoYMvqfxd1DVKL"
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD1BI88INTE6I6ms5h3unyumxZLBz7k9T",
"name": "Condition Block",
"title": "Condition Block",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Condition Block",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01TD1COZBWSFF00kLXVXvdofQsTUvZ82321",
"name": "Condition Branch",
"title": "Public Cloud Asset Query Succeeded",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01TD19E1K5N7P1BL93W1vZ2J9TCrE9q3B6M.output.succeeded$",
"operator": "eq",
"right_operand": true
},
"continue_on_failure": false,
"display_name": "Public Cloud Asset Query Succeeded",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD1D6E1QF1I71coySVdTot8c8WqaR0DVA",
"name": "Execute Python Script",
"title": "Search Assets for IP",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": true,
"display_name": "Search Assets for IP",
"script": "import sys\nimport json\nassets = sys.argv[1]\nsearch_ip = sys.argv[2]\nasset_matches = []\nassets = json.loads(assets)\nfor asset in assets:\n for prop in asset['properties']:\n if prop['name'] == 'Private IP' or prop['name'] == 'Public IP':\n for val in prop['values']:\n if val == search_ip:\n asset_matches.append(asset)\nasset_matches = json.dumps(asset_matches)\n",
"script_arguments": [
"$activity.definition_activity_01TD19E1K5N7P1BL93W1vZ2J9TCrE9q3B6M.output.variable_workflow_01PXQCZA7ZH9V3otPfEQY1VCchrdQX7HpPv$",
"$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1TXOBRG2R2vX8sOymuHRTGaf66OG9rD$"
],
"script_queries": [
{
"script_query": "asset_matches",
"script_query_name": "Asset Matches",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD1SUOKOHFI0qWi4SRk5sk0K17Qi7kqdK",
"name": "Set Variables",
"title": "Set Public Cloud Asset Matches Variable",
"type": "core.set_multiple_variables",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Set Public Cloud Asset Matches Variable",
"skip_execution": false,
"variables_to_update": [
{
"variable_to_update": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.output.variable_workflow_01TD1SP9T2QX13gViFiDICeFSjkzMmf1HmE$",
"variable_value_new": "$activity.definition_activity_01TD1D6E1QF1I71coySVdTot8c8WqaR0DVA.output.script_queries.Asset Matches$"
}
]
},
"object_type": "definition_activity"
}
]
}
]
},
{
"unique_name": "definition_activity_01TD2AHSDK5WE5K9TIqoz7fDwRqhbNDDRPp",
"name": "Condition Block",
"title": "Condition Block",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Condition Block",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01TD2AHSMKYGE4YjFKcMD0iACsHYV7BjSQC",
"name": "Condition Branch",
"title": "Cluster Name Specified",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD2AD919WOD7id7d1Q7EJlptQVMAeYuuB$",
"operator": "ne",
"right_operand": ""
},
"continue_on_failure": false,
"display_name": "Cluster Name Specified",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD28T9OZOUP3i8D4YsXH4jycxkhAqacBh",
"name": "Tufin SecureCloud - List K8S Services for Cluster",
"title": "Tufin SecureCloud - List K8S Services for Cluster",
"type": "workflow.atomic_workflow",
"base_type": "subworkflow",
"properties": {
"continue_on_failure": true,
"display_name": "Tufin SecureCloud - List K8S Services for Cluster",
"input": {
"variable_workflow_01Q686ZVWJHB604OuAwuhT2T5uHnjeNZMeN": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1UXENB8QZ0vSRaOiCnPN9uT1K3TT1JG$",
"variable_workflow_01Q686ZVWJL3530KdpmmzXbysK7VDC3uGjT": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD2AD919WOD7id7d1Q7EJlptQVMAeYuuB$",
"variable_workflow_01Q686ZVWJMDX3qmwHLjQFobMdx1F1Om3lG": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1A7INDT1E5K6WfS25ihNRkI76uAy7Oo$"
},
"runtime_user": {
"target_default": true
},
"skip_execution": false,
"target": {
"target_type": "web-service.endpoint",
"use_workflow_target": true
},
"workflow_id": "definition_workflow_01Q686ZW326D924qI8qaXqg7qM4EpPoDafY"
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD3BG4AK12L5tbelTUCLBcphPgVvkzHaP",
"name": "Condition Block",
"title": "Condition Block",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Condition Block",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01TD3BG4I1KUN1dneksOQZPgDj52KGlk2vR",
"name": "Condition Branch",
"title": "K8S Service Query Succeeded",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01TD28T9OZOUP3i8D4YsXH4jycxkhAqacBh.output.succeeded$",
"operator": "eq",
"right_operand": true
},
"continue_on_failure": false,
"display_name": "K8S Service Query Succeeded",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD3C2EOOFHZ6xrPHnDlESr6lf3LCDU4ej",
"name": "Execute Python Script",
"title": "Search Services for IP",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"display_name": "Search Services for IP",
"script": "import sys\nimport json\nservices = sys.argv[1]\nsearch_ip = sys.argv[2]\nservices_matches = []\nservices = json.loads(services)\nfor service in services:\n if service['private_ip'] == search_ip:\n services_matches.append(service)\n continue\n if 'endpoints' in service.keys():\n if service['endpoints'] is not None:\n for endpoint in service['endpoints']:\n if search_ip in endpoint:\n services_matches.append(service)\n break\n\nservices_matches = json.dumps(services_matches)",
"script_arguments": [
"$activity.definition_activity_01TD28T9OZOUP3i8D4YsXH4jycxkhAqacBh.output.variable_workflow_01Q686ZVWJJSP2f7yVAvlGT7XRUk5GTJg5G$",
"$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1TXOBRG2R2vX8sOymuHRTGaf66OG9rD$"
],
"script_queries": [
{
"script_query": "services_matches",
"script_query_name": "Service Matches",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD3D3HD741P10qCyNwM2aXdphBZoxkgjO",
"name": "Set Variables",
"title": "Set K8S Service Matches Variable",
"type": "core.set_multiple_variables",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Set K8S Service Matches Variable",
"skip_execution": false,
"variables_to_update": [
{
"variable_to_update": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.output.variable_workflow_01TD30HTNMK9356Nfig6mFL5GrIcJGKncsi$",
"variable_value_new": "$activity.definition_activity_01TD3C2EOOFHZ6xrPHnDlESr6lf3LCDU4ej.output.script_queries.Service Matches$"
}
]
},
"object_type": "definition_activity"
}
]
}
]
}
]
},
{
"unique_name": "definition_activity_01TD2AHSXD8ZK4nzXPtwKYE23Ro8eEUR3kM",
"name": "Condition Branch",
"title": "Cluster Name Not Specified",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD2AD919WOD7id7d1Q7EJlptQVMAeYuuB$",
"operator": "eq",
"right_operand": ""
},
"continue_on_failure": false,
"display_name": "Cluster Name Not Specified",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD2BP3PNRVE12cF4rYZYJHL2udSDOFj7L",
"name": "Tufin SecureCloud - List K8S Clusters",
"title": "Tufin SecureCloud - List K8S Clusters",
"type": "workflow.atomic_workflow",
"base_type": "subworkflow",
"properties": {
"continue_on_failure": true,
"display_name": "Tufin SecureCloud - List K8S Clusters",
"input": {
"variable_workflow_01Q67AB4177TL7i5ILPVNSzNrMWzyXwKYNy": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1UXENB8QZ0vSRaOiCnPN9uT1K3TT1JG$",
"variable_workflow_01Q67AB4179M43Wy0QHy3NA2zLYu3cjCNJ9": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1A7INDT1E5K6WfS25ihNRkI76uAy7Oo$"
},
"runtime_user": {
"target_default": true
},
"skip_execution": false,
"target": {
"target_type": "web-service.endpoint",
"use_workflow_target": true
},
"workflow_id": "definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe"
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD2C1DL8IRV6NTpNw2nGj8j0sJFMBy3cj",
"name": "Condition Block",
"title": "Condition Block",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Condition Block",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01TD2C1DUF8WY4DteOgRxDJ5RVHmUsufRVB",
"name": "Condition Branch",
"title": "Cluster Listing Succeeded",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01TD2BP3PNRVE12cF4rYZYJHL2udSDOFj7L.output.succeeded$",
"operator": "eq",
"right_operand": true
},
"continue_on_failure": true,
"display_name": "Cluster Listing Succeeded",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD2GFBRE13N6n0u7N1skcsiCjmBqm5Q1I",
"name": "Execute Python Script",
"title": "Generate Cluster Name List",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"display_name": "Generate Cluster Name List",
"script": "import sys\nimport json\n\ncluster_list = []\njson_list = sys.argv[1]\nfor item in json.loads(json_list):\n cluster_list.append(item['name'])\ncluster_list = ','.join(cluster_list)",
"script_arguments": [
"$activity.definition_activity_01TD2BP3PNRVE12cF4rYZYJHL2udSDOFj7L.output.variable_workflow_01Q67AB41739W7ejEkqbzgf7NE8ZYZYmIW3$"
],
"script_queries": [
{
"script_query": "cluster_list",
"script_query_name": "Cluster List",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD2N00NAKVD6q9RQ8mBxJS8UCH21Ifbpe",
"name": "Split String",
"title": "Create Cluster Name Array",
"type": "core.splitstring",
"base_type": "activity",
"properties": {
"boundaries": [
{
"boundary": ","
}
],
"continue_on_failure": false,
"display_name": "Create Cluster Name Array",
"input_string": "$activity.definition_activity_01TD2GFBRE13N6n0u7N1skcsiCjmBqm5Q1I.output.script_queries.Cluster List$",
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD2JTLBUJID3HV4CrbufAUksFSqJfvnyn",
"name": "For Each",
"title": "For Each",
"type": "logic.for_each",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "For Each",
"skip_execution": false,
"source_array": "$activity.definition_activity_01TD2N00NAKVD6q9RQ8mBxJS8UCH21Ifbpe.output.parts$"
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD2O4DFEGUF4PGu6T3uLcySUva49hfS7N",
"name": "Tufin SecureCloud - List K8S Services for Cluster",
"title": "Tufin SecureCloud - List K8S Services for Cluster",
"type": "workflow.atomic_workflow",
"base_type": "subworkflow",
"properties": {
"continue_on_failure": true,
"display_name": "Tufin SecureCloud - List K8S Services for Cluster",
"input": {
"variable_workflow_01Q686ZVWJHB604OuAwuhT2T5uHnjeNZMeN": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1UXENB8QZ0vSRaOiCnPN9uT1K3TT1JG$",
"variable_workflow_01Q686ZVWJL3530KdpmmzXbysK7VDC3uGjT": "$activity.definition_activity_01TD2JTLBUJID3HV4CrbufAUksFSqJfvnyn.input.source_array[@]$",
"variable_workflow_01Q686ZVWJMDX3qmwHLjQFobMdx1F1Om3lG": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1A7INDT1E5K6WfS25ihNRkI76uAy7Oo$"
},
"runtime_user": {
"target_default": true
},
"skip_execution": false,
"target": {
"target_type": "web-service.endpoint",
"use_workflow_target": true
},
"workflow_id": "definition_workflow_01Q686ZW326D924qI8qaXqg7qM4EpPoDafY"
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD2YJ693G1A7lUtkxlRQHeSCwZ4JHdB2y",
"name": "Condition Block",
"title": "Condition Block",
"type": "logic.if_else",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Condition Block",
"skip_execution": false
},
"object_type": "definition_activity",
"blocks": [
{
"unique_name": "definition_activity_01TD2YJ6HKF894KUa39K50yl3najlOyjbRh",
"name": "Condition Branch",
"title": "K8S Service Query Succeeded",
"type": "logic.condition_block",
"base_type": "activity",
"properties": {
"condition": {
"left_operand": "$activity.definition_activity_01TD2O4DFEGUF4PGu6T3uLcySUva49hfS7N.output.succeeded$",
"operator": "eq",
"right_operand": true
},
"continue_on_failure": false,
"display_name": "K8S Service Query Succeeded",
"skip_execution": false
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01TD31BCDV0GB61mTKtwlk5mwDxdhC3rP6A",
"name": "Execute Python Script",
"title": "Search Services for IP",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"display_name": "Search Services for IP",
"script": "import sys\nimport json\nservices = sys.argv[1]\nsearch_ip = sys.argv[2]\nif len(sys.argv[3]) > 0:\n services_matches = json.loads(sys.argv[3])\nelse:\n services_matches = []\nservices = json.loads(services)\nfor service in services:\n if service['private_ip'] == search_ip:\n services_matches.append(service)\n continue\n if 'endpoints' in service.keys():\n if service['endpoints'] is not None:\n for endpoint in service['endpoints']:\n if search_ip in endpoint:\n services_matches.append(service)\n break\n\nservices_matches = json.dumps(services_matches)",
"script_arguments": [
"$activity.definition_activity_01TD2O4DFEGUF4PGu6T3uLcySUva49hfS7N.output.variable_workflow_01Q686ZVWJJSP2f7yVAvlGT7XRUk5GTJg5G$",
"$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.input.variable_workflow_01TD1TXOBRG2R2vX8sOymuHRTGaf66OG9rD$",
"$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.output.variable_workflow_01TD30HTNMK9356Nfig6mFL5GrIcJGKncsi$"
],
"script_queries": [
{
"script_query": "services_matches",
"script_query_name": "Service Matches",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01TD39NBZBRBK6CQ1knl7iDQhl2aCz7fJHm",
"name": "Set Variables",
"title": "Set K8S Service Matches Variable",
"type": "core.set_multiple_variables",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"display_name": "Set K8S Service Matches Variable",
"skip_execution": false,
"variables_to_update": [
{
"variable_to_update": "$workflow.definition_workflow_01TD191R8P6XA1OKzbHjJLYkllstIqdykyi.output.variable_workflow_01TD30HTNMK9356Nfig6mFL5GrIcJGKncsi$",
"variable_value_new": "$activity.definition_activity_01TD31BCDV0GB61mTKtwlk5mwDxdhC3rP6A.output.script_queries.Service Matches$"
}
]
},
"object_type": "definition_activity"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"categories": [
"category_01FM7CGPZZCMY0KcvgiGjVH5UaB4y4aDJ7m",
"category_01G4JLUINA0E65x8iCa6Behj8y9V0ZE9f8O"
]
},
"categories": {
"category_01FM7CGPZZCMY0KcvgiGjVH5UaB4y4aDJ7m": {
"unique_name": "category_01FM7CGPZZCMY0KcvgiGjVH5UaB4y4aDJ7m",
"name": "response",
"title": "response",
"type": "basic.category",
"base_type": "category",
"category_type": "custom",
"object_type": "category"
},
"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"
}
},
"targets": {
"definition_target_01PWZLT9GER3Q5MT13QpgdehNObJ765ywlu": {
"unique_name": "definition_target_01PWZLT9GER3Q5MT13QpgdehNObJ765ywlu",
"name": "Generic Bank",
"title": "Generic Bank",
"type": "web-service.endpoint",
"base_type": "target",
"object_type": "definition_target",
"properties": {
"disable_certificate_validation": false,
"display_name": "Generic Bank",
"host": "generic-bank.securecloud.tufin.io",
"ignore_proxy": false,
"no_runtime_user": true,
"protocol": "https"
}
}
},
"atomic_workflows": [
"definition_workflow_01PV33IJRWZSX3qfvJcGqeoYMvqfxd1DVKL",
"definition_workflow_01Q686ZW326D924qI8qaXqg7qM4EpPoDafY",
"definition_workflow_01Q67AB4DRM1T7fWAngF5wbqJWj7qQAZyZe"
]
}