-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tufin Search Application Connections.json
315 lines (315 loc) · 11.8 KB
/
Tufin Search Application Connections.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
{
"workflow": {
"unique_name": "definition_workflow_01G5KUO2HVLVH0jIVKoLJkyebJVlByK9hSL",
"name": "Tufin Search Application Connections",
"title": "Tufin Search Application Connections",
"type": "generic.workflow",
"base_type": "workflow",
"variables": [
{
"schema_id": "datatype.integer",
"properties": {
"value": 0,
"scope": "input",
"name": "App ID",
"type": "datatype.integer",
"description": "SecureApp application ID",
"is_required": false
},
"unique_name": "variable_workflow_01G5KVDF4BJFG06tCN8ShcUtnLsOHRZFDHZ",
"object_type": "variable_workflow"
},
{
"schema_id": "tabletype_01G8W824YHDW436aInhkWdLblYthPZsVdeS",
"properties": {
"scope": "output",
"name": "Tufin Application Connections",
"type": "datatype.table",
"description": "Tufin Application Connections",
"is_required": false
},
"unique_name": "variable_workflow_01G8X2WAIDTOO1AX8O7ggxMBuPPvCg7Zr6G",
"object_type": "variable_workflow"
}
],
"properties": {
"atomic": {
"is_atomic": false
},
"delete_workflow_instance": false,
"description": "Get SecureApp application connections",
"display_name": "Tufin Search Application Connections",
"runtime_user": {
"override_target_runtime_user": false,
"specify_on_workflow_start": false,
"target_default": true
},
"target": {
"target_type": "web-service.endpoint",
"specify_on_workflow_start": true
}
},
"object_type": "definition_workflow",
"actions": [
{
"unique_name": "definition_activity_01G5KVM2JRGBZ7V1cStoF2koCFZR2RkmUN8",
"name": "HTTP Request",
"title": "Get App Connections",
"type": "web-service.http_request",
"base_type": "activity",
"properties": {
"accept": "application/json",
"action_timeout": 180,
"allow_auto_redirect": true,
"content_type": "application/json",
"continue_on_error_status_code": false,
"continue_on_failure": false,
"custom_headers": [
{
"name": "cache-control",
"value": "no-cache"
}
],
"description": "Get SecureApp application connections",
"display_name": "Get App Connections",
"method": "GET",
"relative_url": "/securechangeworkflow/api/secureapp/repository/applications/$workflow.definition_workflow_01G5KUO2HVLVH0jIVKoLJkyebJVlByK9hSL.input.variable_workflow_01G5KVDF4BJFG06tCN8ShcUtnLsOHRZFDHZ$/connections",
"runtime_user": {
"override_target_runtime_user": false,
"target_default": true
},
"skip_execution": false,
"target": {
"override_workflow_target": false,
"override_workflow_target_group_criteria": false,
"use_workflow_target": true,
"use_workflow_target_group": false
}
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01G8WBDKJ3J1B6FRam01otek2kLx5AedfOD",
"name": "Execute Python Script",
"title": "Parse Connection Results",
"type": "python3.script",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"description": "Parse the connection results using Python to generate flat list",
"display_name": "Parse Connection Results",
"script": "import json\nfalse = False\ntrue = True\nconnections_dict = []\nconns = $activity.definition_activity_01G5KVM2JRGBZ7V1cStoF2koCFZR2RkmUN8.output.response_body$\nfor conn in conns[\"connections\"][\"connection\"]:\n connection = {}\n connection[\"id\"] = conn[\"id\"]\n connection[\"name\"] = conn[\"name\"]\n connection[\"external\"] = conn[\"external\"]\n connection[\"status\"] = conn[\"status\"]\n connection[\"comment\"] = conn[\"comment\"]\n source_list = []\n for source in conn['sources']['source']:\n source_list.append(source['name'])\n connection[\"sources\"] = \", \".join(source_list)\n dest_list = []\n for dest in conn['destinations']['destination']:\n dest_list.append(dest['name'])\n connection[\"destinations\"] = \", \".join(dest_list)\n service_list = []\n for service in conn['services']['service']:\n service_list.append(service['name'])\n connection[\"services\"] = \", \".join(service_list)\n connections_dict.append(connection)\nconnections = json.dumps(connections_dict)",
"script_arguments": [
"$activity.definition_activity_01G5KVM2JRGBZ7V1cStoF2koCFZR2RkmUN8.output.response_body$"
],
"script_queries": [
{
"script_query": "connections",
"script_query_name": "connections",
"script_query_type": "string"
}
],
"skip_execution": false
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01G8WZZXKUOEU73PY1wZOciLIdUNAqGZaM9",
"name": "Read Table from JSON",
"title": "Read Connection Details",
"type": "corejava.read_table_from_json",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"description": "Read connection details in to table ",
"display_name": "Read Connection Details",
"input_json": "$activity.definition_activity_01G8WBDKJ3J1B6FRam01otek2kLx5AedfOD.output.script_queries.connections$",
"jsonpath_query": "$.",
"persist_output": true,
"populate_columns": false,
"skip_execution": false,
"table_columns": [
{
"column_name": "id",
"column_type": "integer"
},
{
"column_name": "name",
"column_type": "string"
},
{
"column_name": "external",
"column_type": "string"
},
{
"column_name": "status",
"column_type": "string"
},
{
"column_name": "comment",
"column_type": "string"
},
{
"column_name": "sources",
"column_type": "string"
},
{
"column_name": "destinations",
"column_type": "string"
},
{
"column_name": "services",
"column_type": "string"
}
]
},
"object_type": "definition_activity"
},
{
"unique_name": "definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs",
"name": "For Each",
"title": "Add Connections to Output",
"type": "logic.for_each",
"base_type": "activity",
"properties": {
"continue_on_failure": false,
"description": "Add each connection to the connections outpot",
"display_name": "Add Connections to Output",
"skip_execution": false,
"source_array": "$activity.definition_activity_01G8WZZXKUOEU73PY1wZOciLIdUNAqGZaM9.output.read_table_from_json$"
},
"object_type": "definition_activity",
"actions": [
{
"unique_name": "definition_activity_01G8X318IUS1N40qR9ZiKMq2BCntMgNFmc5",
"name": "Add Row to Table",
"title": "Add Row to Table",
"type": "core.addrowtotable",
"base_type": "activity",
"properties": {
"action_timeout": 180,
"continue_on_failure": false,
"description": "Add connection row to connections table",
"display_name": "Add Row to Table",
"input_table": "$workflow.definition_workflow_01G5KUO2HVLVH0jIVKoLJkyebJVlByK9hSL.output.variable_workflow_01G8X2WAIDTOO1AX8O7ggxMBuPPvCg7Zr6G$",
"row": [
{
"key": "id",
"type": "integer",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].id$"
},
{
"key": "name",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].name$"
},
{
"key": "external",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].external$"
},
{
"key": "status",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].status$"
},
{
"key": "sources",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].sources$"
},
{
"key": "destinations",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].destinations$"
},
{
"key": "services",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].services$"
},
{
"key": "comment",
"type": "string",
"value": "$activity.definition_activity_01G8X24FHW4WC05nXAO2fCcnrmHXh19QPvs.input.source_array[@].comment$"
}
],
"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"
}
},
"table_types": {
"tabletype_01G8W824YHDW436aInhkWdLblYthPZsVdeS": {
"unique_name": "tabletype_01G8W824YHDW436aInhkWdLblYthPZsVdeS",
"data_type": "datatype.tabletype",
"display_name": "Tufin Application Connections",
"description": "Tufin Application Connections",
"columns": [
{
"name": "comment",
"title": "comment",
"type": "string"
},
{
"name": "destinations",
"title": "destinations",
"type": "string"
},
{
"name": "external",
"title": "external",
"type": "string"
},
{
"is_required": true,
"name": "id",
"title": "id",
"type": "integer"
},
{
"name": "name",
"title": "name",
"type": "string"
},
{
"name": "services",
"title": "services",
"type": "string"
},
{
"name": "sources",
"title": "sources",
"type": "string"
},
{
"name": "status",
"title": "status",
"type": "string"
}
],
"base_type": "datatype",
"object_type": "tabletype"
}
}
}