@itentialopensource/adapter-tufin_secureapp 0.2.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +34 -19
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +225 -502
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +482 -191
  14. package/adapterBase.js +1021 -245
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/error.json +12 -0
  18. package/package.json +20 -13
  19. package/pronghorn.json +338 -67
  20. package/propertiesDecorators.json +14 -0
  21. package/propertiesSchema.json +436 -0
  22. package/refs?service=git-upload-pack +0 -0
  23. package/report/adapterInfo.json +10 -0
  24. package/report/updateReport1653613470041.json +120 -0
  25. package/sampleProperties.json +94 -2
  26. package/test/integration/adapterTestBasicGet.js +2 -2
  27. package/test/integration/adapterTestIntegration.js +29 -103
  28. package/test/unit/adapterBaseTestUnit.js +35 -27
  29. package/test/unit/adapterTestUnit.js +540 -142
  30. package/utils/adapterInfo.js +206 -0
  31. package/utils/addAuth.js +94 -0
  32. package/utils/basicGet.js +1 -14
  33. package/utils/entitiesToDB.js +179 -0
  34. package/utils/modify.js +1 -1
  35. package/utils/packModificationScript.js +1 -1
  36. package/utils/patches2bundledDeps.js +90 -0
  37. package/utils/pre-commit.sh +3 -0
  38. package/utils/removeHooks.js +20 -0
  39. package/utils/tbScript.js +43 -22
  40. package/utils/tbUtils.js +126 -29
  41. package/utils/testRunner.js +16 -16
  42. package/utils/troubleshootingAdapter.js +2 -26
package/pronghorn.json CHANGED
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "methods": [
11
11
  {
12
- "name": "updateAdapterConfiguration",
12
+ "name": "iapUpdateAdapterConfiguration",
13
13
  "summary": "Updates the adapter configuration",
14
14
  "description": "Updates the adapter configuration file with the provided changes",
15
15
  "input": [
@@ -78,12 +78,12 @@
78
78
  ],
79
79
  "route": {
80
80
  "verb": "POST",
81
- "path": "/updateAdapterConfiguration"
81
+ "path": "/iapUpdateAdapterConfiguration"
82
82
  },
83
83
  "task": true
84
84
  },
85
85
  {
86
- "name": "findPath",
86
+ "name": "iapFindAdapterPath",
87
87
  "summary": "Provides the ability to see if a particular API path is supported by the adapter",
88
88
  "description": "Provides the ability to see if a particular API path is supported by the adapter",
89
89
  "input": [
@@ -113,12 +113,97 @@
113
113
  ],
114
114
  "route": {
115
115
  "verb": "POST",
116
- "path": "/findPath"
116
+ "path": "/iapFindAdapterPath"
117
117
  },
118
118
  "task": true
119
119
  },
120
120
  {
121
- "name": "troubleshoot",
121
+ "name": "iapSuspendAdapter",
122
+ "summary": "Suspends the adapter",
123
+ "description": "Suspends the adapter",
124
+ "input": [
125
+ {
126
+ "name": "mode",
127
+ "type": "enum",
128
+ "enumerals": [
129
+ "pause",
130
+ "error"
131
+ ],
132
+ "info": "How incoming requests are handled. Defaults to 'pause'",
133
+ "description": "How incoming requests are handled. Defaults to 'pause'",
134
+ "schema": {
135
+ "title": "mode",
136
+ "type": "string"
137
+ },
138
+ "required": false
139
+ }
140
+ ],
141
+ "output": {
142
+ "name": "result",
143
+ "type": "object",
144
+ "description": "A JSON Object containing the adapter suspended status",
145
+ "schema": {
146
+ "title": "result",
147
+ "type": "object"
148
+ }
149
+ },
150
+ "roles": [
151
+ "admin"
152
+ ],
153
+ "route": {
154
+ "verb": "POST",
155
+ "path": "/iapSuspendAdapter"
156
+ },
157
+ "task": true
158
+ },
159
+ {
160
+ "name": "iapUnsuspendAdapter",
161
+ "summary": "Unsuspends the adapter",
162
+ "description": "Unsuspends the adapter",
163
+ "input": [],
164
+ "output": {
165
+ "name": "result",
166
+ "type": "object",
167
+ "description": "A JSON Object containing the adapter suspended status",
168
+ "schema": {
169
+ "title": "result",
170
+ "type": "object"
171
+ }
172
+ },
173
+ "roles": [
174
+ "admin"
175
+ ],
176
+ "route": {
177
+ "verb": "POST",
178
+ "path": "/iapUnsuspendAdapter"
179
+ },
180
+ "task": true
181
+ },
182
+ {
183
+ "name": "iapGetAdapterQueue",
184
+ "summary": "Return the requests that are waiting in the queue if throttling is enabled",
185
+ "description": "Return the requests that are waiting in the queue if throttling is enabled",
186
+ "input": [],
187
+ "output": {
188
+ "name": "result",
189
+ "type": "object",
190
+ "description": "A JSON Object containing the adapter queue",
191
+ "schema": {
192
+ "title": "result",
193
+ "type": "object"
194
+ }
195
+ },
196
+ "roles": [
197
+ "admin"
198
+ ],
199
+ "route": {
200
+ "verb": "POST",
201
+ "path": "/iapGetAdapterQueue"
202
+ },
203
+ "task": true
204
+ },
205
+ {
206
+ "name": "iapTroubleshootAdapter",
122
207
  "summary": "Runs troubleshoot script for adapter",
123
208
  "description": "Runs troubleshoot script for adapter",
124
209
  "input": [
@@ -153,12 +238,12 @@
153
238
  ],
154
239
  "route": {
155
240
  "verb": "POST",
156
- "path": "/troubleshoot"
241
+ "path": "/iapTroubleshootAdapter"
157
242
  },
158
243
  "task": true
159
244
  },
160
245
  {
161
- "name": "runHealthcheck",
246
+ "name": "iapRunAdapterHealthcheck",
162
247
  "summary": "Runs healthcheck script for adapter",
163
248
  "description": "Runs healthcheck script for adapter",
164
249
  "input": [],
@@ -172,12 +257,12 @@
172
257
  ],
173
258
  "route": {
174
259
  "verb": "POST",
175
- "path": "/runHealthcheck"
260
+ "path": "/iapRunAdapterHealthcheck"
176
261
  },
177
262
  "task": true
178
263
  },
179
264
  {
180
- "name": "runConnectivity",
265
+ "name": "iapRunAdapterConnectivity",
181
266
  "summary": "Runs connectivity check script for adapter",
182
267
  "description": "Runs connectivity check script for adapter",
183
268
  "input": [],
@@ -195,12 +280,12 @@
195
280
  ],
196
281
  "route": {
197
282
  "verb": "POST",
198
- "path": "/runConnectivity"
283
+ "path": "/iapRunAdapterConnectivity"
199
284
  },
200
285
  "task": true
201
286
  },
202
287
  {
203
- "name": "runBasicGet",
288
+ "name": "iapRunAdapterBasicGet",
204
289
  "summary": "Runs basicGet script for adapter",
205
290
  "description": "Runs basicGet script for adapter",
206
291
  "input": [],
@@ -218,37 +303,21 @@
218
303
  ],
219
304
  "route": {
220
305
  "verb": "POST",
221
- "path": "/runBasicGet"
306
+ "path": "/iapRunAdapterBasicGet"
222
307
  },
223
308
  "task": true
224
309
  },
225
310
  {
226
- "name": "suspend",
227
- "summary": "Suspends the adapter",
228
- "description": "Suspends the adapter",
229
- "input": [
230
- {
231
- "name": "mode",
232
- "type": "enum",
233
- "enumerals": [
234
- "pause",
235
- "error"
236
- ],
237
- "info": "How incoming requests are handled. Defaults to 'pause'",
238
- "description": "How incoming requests are handled. Defaults to 'pause'",
239
- "schema": {
240
- "title": "mode",
241
- "type": "string"
242
- },
243
- "required": false
244
- }
245
- ],
311
+ "name": "iapMoveAdapterEntitiesToDB",
312
+ "summary": "Moves entities from an adapter into the IAP database",
313
+ "description": "Moves entities from an adapter into the IAP database",
314
+ "input": [],
246
315
  "output": {
247
- "name": "result",
316
+ "name": "res",
248
317
  "type": "object",
249
- "description": "A JSON Object containing the adapter suspended status",
318
+ "description": "A JSON Object containing status, code and the response from the mongo transaction",
250
319
  "schema": {
251
- "title": "result",
320
+ "title": "res",
252
321
  "type": "object"
253
322
  }
254
323
  },
@@ -257,42 +326,75 @@
257
326
  ],
258
327
  "route": {
259
328
  "verb": "POST",
260
- "path": "/suspend"
329
+ "path": "/iapMoveAdapterEntitiesToDB"
261
330
  },
262
331
  "task": true
263
332
  },
264
333
  {
265
- "name": "unsuspend",
266
- "summary": "Unsuspends the adapter",
267
- "description": "Unsuspends the adapter",
268
- "input": [],
269
- "output": {
270
- "name": "result",
271
- "type": "object",
272
- "description": "A JSON Object containing the adapter suspended status",
273
- "schema": {
274
- "title": "result",
275
- "type": "object"
334
+ "name": "genericAdapterRequest",
335
+ "summary": "Makes the requested generic call",
336
+ "description": "Makes the requested generic call",
337
+ "input": [
338
+ {
339
+ "name": "uriPath",
340
+ "type": "string",
341
+ "info": "the path of the api call - do not include the host, port, base path or version",
342
+ "description": "the path of the api call",
343
+ "schema": {
344
+ "title": "uriPath",
345
+ "type": "string"
346
+ },
347
+ "required": true
348
+ },
349
+ {
350
+ "name": "restMethod",
351
+ "type": "string",
352
+ "info": "the rest method (GET, POST, PUT, PATCH, DELETE)",
353
+ "description": "the rest method (GET, POST, PUT, PATCH, DELETE)",
354
+ "schema": {
355
+ "title": "restMethod",
356
+ "type": "string"
357
+ },
358
+ "required": true
359
+ },
360
+ {
361
+ "name": "queryData",
362
+ "type": "object",
363
+ "info": "the query parameters to be put on the url (optional)",
364
+ "description": "the query parameters to be put on the url (optional)",
365
+ "schema": {
366
+ "title": "queryData",
367
+ "type": "object"
368
+ },
369
+ "required": false
370
+ },
371
+ {
372
+ "name": "requestBody",
373
+ "type": "object",
374
+ "info": "the payload to be sent with the request (optional)",
375
+ "description": "the payload to be sent with the request (optional)",
376
+ "schema": {
377
+ "title": "requestBody",
378
+ "type": "object"
379
+ },
380
+ "required": false
381
+ },
382
+ {
383
+ "name": "addlHeaders",
384
+ "type": "object",
385
+ "info": "additional headers to be put on the call (optional)",
386
+ "description": "additional headers to be put on the call (optional)",
387
+ "schema": {
388
+ "title": "addlHeaders",
389
+ "type": "object"
390
+ },
391
+ "required": false
276
392
  }
277
- },
278
- "roles": [
279
- "admin"
280
393
  ],
281
- "route": {
282
- "verb": "POST",
283
- "path": "/unsuspend"
284
- },
285
- "task": true
286
- },
287
- {
288
- "name": "getQueue",
289
- "summary": "Return the requests that are waiting in the queue if throttling is enabled",
290
- "description": "Return the requests that are waiting in the queue if throttling is enabled",
291
- "input": [],
292
394
  "output": {
293
395
  "name": "result",
294
396
  "type": "object",
295
- "description": "A JSON Object containing the adapter queue",
397
+ "description": "A JSON Object containing status, code and the result",
296
398
  "schema": {
297
399
  "title": "result",
298
400
  "type": "object"
@@ -303,14 +405,14 @@
303
405
  ],
304
406
  "route": {
305
407
  "verb": "POST",
306
- "path": "/getQueue"
408
+ "path": "/genericAdapterRequest"
307
409
  },
308
410
  "task": true
309
411
  },
310
412
  {
311
- "name": "genericAdapterRequest",
312
- "summary": "Makes the requested generic call",
313
- "description": "Makes the requested generic call",
413
+ "name": "genericAdapterRequestNoBasePath",
414
+ "summary": "Makes the requested generic call with no base path or version",
415
+ "description": "Makes the requested generic call with no base path or version",
314
416
  "input": [
315
417
  {
316
418
  "name": "uriPath",
@@ -382,10 +484,179 @@
382
484
  ],
383
485
  "route": {
384
486
  "verb": "POST",
385
- "path": "/genericAdapterRequest"
487
+ "path": "/genericAdapterRequestNoBasePath"
386
488
  },
387
489
  "task": true
388
490
  },
491
+ {
492
+ "name": "getDevice",
493
+ "summary": "Get the Appliance",
494
+ "description": "Get the Appliance",
495
+ "input": [
496
+ {
497
+ "name": "deviceName",
498
+ "type": "string",
499
+ "info": "An Appliance Device Name",
500
+ "required": true,
501
+ "schema": {
502
+ "title": "deviceName",
503
+ "type": "string"
504
+ }
505
+ }
506
+ ],
507
+ "output": {
508
+ "name": "result",
509
+ "type": "object",
510
+ "description": "A JSON Object containing status, code and the result",
511
+ "schema": {
512
+ "title": "result",
513
+ "type": "object"
514
+ }
515
+ },
516
+ "roles": [
517
+ "admin"
518
+ ],
519
+ "route": {
520
+ "verb": "POST",
521
+ "path": "/getDevice"
522
+ },
523
+ "task": false
524
+ },
525
+ {
526
+ "name": "getDevicesFiltered",
527
+ "summary": "Get Appliances that match the filter",
528
+ "description": "Get Appliances that match the filter",
529
+ "input": [
530
+ {
531
+ "name": "options",
532
+ "type": "object",
533
+ "info": "options - e.g. { 'start': 1, 'limit': 20, 'filter': { 'name': 'abc123' } }",
534
+ "required": true,
535
+ "schema": {
536
+ "title": "options",
537
+ "type": "object"
538
+ }
539
+ }
540
+ ],
541
+ "output": {
542
+ "name": "result",
543
+ "type": "array",
544
+ "description": "A JSON Object containing status, code and the result",
545
+ "schema": {
546
+ "title": "result",
547
+ "type": "array"
548
+ }
549
+ },
550
+ "roles": [
551
+ "admin"
552
+ ],
553
+ "route": {
554
+ "verb": "POST",
555
+ "path": "/getDevicesFiltered"
556
+ },
557
+ "task": false
558
+ },
559
+ {
560
+ "name": "isAlive",
561
+ "summary": "Checks the status for the provided Appliance",
562
+ "description": "Checks the status for the provided Appliance",
563
+ "input": [
564
+ {
565
+ "name": "deviceName",
566
+ "type": "string",
567
+ "info": "An Appliance Device Name",
568
+ "required": true,
569
+ "schema": {
570
+ "title": "deviceName",
571
+ "type": "string"
572
+ }
573
+ }
574
+ ],
575
+ "output": {
576
+ "name": "result",
577
+ "type": "boolean",
578
+ "description": "A JSON Object containing status, code and the result",
579
+ "schema": {
580
+ "title": "result",
581
+ "type": "boolean"
582
+ }
583
+ },
584
+ "roles": [
585
+ "admin"
586
+ ],
587
+ "route": {
588
+ "verb": "POST",
589
+ "path": "/isAlive"
590
+ },
591
+ "task": false
592
+ },
593
+ {
594
+ "name": "getConfig",
595
+ "summary": "Gets a config for the provided Appliance",
596
+ "description": "Gets a config for the provided Appliance",
597
+ "input": [
598
+ {
599
+ "name": "deviceName",
600
+ "type": "string",
601
+ "info": "An Appliance Device Name",
602
+ "required": true,
603
+ "schema": {
604
+ "title": "deviceName",
605
+ "type": "string"
606
+ }
607
+ },
608
+ {
609
+ "name": "format",
610
+ "type": "string",
611
+ "info": "The format to be returned - this is ignored as we always return json",
612
+ "required": false,
613
+ "schema": {
614
+ "title": "format",
615
+ "type": "string"
616
+ }
617
+ }
618
+ ],
619
+ "output": {
620
+ "name": "result",
621
+ "type": "object",
622
+ "description": "A JSON Object containing status, code and the result",
623
+ "schema": {
624
+ "title": "result",
625
+ "type": "object"
626
+ }
627
+ },
628
+ "roles": [
629
+ "admin"
630
+ ],
631
+ "route": {
632
+ "verb": "POST",
633
+ "path": "/getConfig"
634
+ },
635
+ "task": false
636
+ },
637
+ {
638
+ "name": "iapGetDeviceCount",
639
+ "summary": "Gets a device count from the system",
640
+ "description": "Gets a device count from the system",
641
+ "input": [],
642
+ "output": {
643
+ "name": "result",
644
+ "type": "object",
645
+ "description": "A JSON Object containing status, code and the result",
646
+ "schema": {
647
+ "title": "result",
648
+ "type": "object"
649
+ }
650
+ },
651
+ "roles": [
652
+ "admin"
653
+ ],
654
+ "route": {
655
+ "verb": "POST",
656
+ "path": "/iapGetDeviceCount"
657
+ },
658
+ "task": false
659
+ },
389
660
  {
390
661
  "name": "retrieveExistingApplicationAccessRequests",
391
662
  "summary": "Retrieve existing application access requests",
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "type": "encryption",
4
+ "pointer": "/authentication/password"
5
+ },
6
+ {
7
+ "type": "encryption",
8
+ "pointer": "/authentication/token"
9
+ },
10
+ {
11
+ "type": "encryption",
12
+ "pointer": "/mongo/password"
13
+ }
14
+ ]