@itentialopensource/adapter-paloalto_prismacloud 0.1.1

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 (89) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +18 -0
  3. package/.jshintrc +3 -0
  4. package/CHANGELOG.md +9 -0
  5. package/CODE_OF_CONDUCT.md +48 -0
  6. package/CONTRIBUTING.md +158 -0
  7. package/LICENSE +201 -0
  8. package/README.md +687 -0
  9. package/adapter.js +11372 -0
  10. package/adapterBase.js +1028 -0
  11. package/entities/.generic/action.json +109 -0
  12. package/entities/.generic/schema.json +23 -0
  13. package/entities/.system/action.json +50 -0
  14. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  15. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  16. package/entities/.system/schema.json +19 -0
  17. package/entities/.system/schemaTokenReq.json +53 -0
  18. package/entities/.system/schemaTokenResp.json +53 -0
  19. package/entities/AccessKeys/action.json +126 -0
  20. package/entities/AccessKeys/schema.json +24 -0
  21. package/entities/AccountGroups/action.json +148 -0
  22. package/entities/AccountGroups/schema.json +25 -0
  23. package/entities/AlertRules/action.json +25 -0
  24. package/entities/AlertRules/schema.json +19 -0
  25. package/entities/AlertsIncomplete/action.json +107 -0
  26. package/entities/AlertsIncomplete/schema.json +23 -0
  27. package/entities/AssetInventory/action.json +129 -0
  28. package/entities/AssetInventory/schema.json +24 -0
  29. package/entities/AuditLogs/action.json +25 -0
  30. package/entities/AuditLogs/schema.json +19 -0
  31. package/entities/CloudAccounts/action.json +409 -0
  32. package/entities/CloudAccounts/schema.json +38 -0
  33. package/entities/ComplianceDashboard/action.json +87 -0
  34. package/entities/ComplianceDashboard/schema.json +22 -0
  35. package/entities/CompliancePosture/action.json +151 -0
  36. package/entities/CompliancePosture/schema.json +58 -0
  37. package/entities/ComplianceStandards/action.json +109 -0
  38. package/entities/ComplianceStandards/schema.json +23 -0
  39. package/entities/InfrastructureAsCode/action.json +86 -0
  40. package/entities/InfrastructureAsCode/schema.json +22 -0
  41. package/entities/IntegrationsIncomplete/action.json +148 -0
  42. package/entities/IntegrationsIncomplete/schema.json +25 -0
  43. package/entities/Licensing/action.json +24 -0
  44. package/entities/Licensing/schema.json +19 -0
  45. package/entities/Login/action.json +45 -0
  46. package/entities/Login/schema.json +20 -0
  47. package/entities/Policy/action.json +209 -0
  48. package/entities/Policy/schema.json +149 -0
  49. package/entities/Search/action.json +24 -0
  50. package/entities/Search/schema.json +19 -0
  51. package/entities/Settings/action.json +45 -0
  52. package/entities/Settings/schema.json +20 -0
  53. package/entities/SupportApp/action.json +25 -0
  54. package/entities/SupportApp/schema.json +19 -0
  55. package/entities/TimeRangeModelInfoOnly/action.json +25 -0
  56. package/entities/TimeRangeModelInfoOnly/schema.json +19 -0
  57. package/entities/UserProfile/action.json +271 -0
  58. package/entities/UserProfile/schema.json +42 -0
  59. package/entities/UserRoles/action.json +127 -0
  60. package/entities/UserRoles/schema.json +24 -0
  61. package/error.json +184 -0
  62. package/package.json +84 -0
  63. package/pronghorn.json +6555 -0
  64. package/propertiesSchema.json +840 -0
  65. package/refs?service=git-upload-pack +0 -0
  66. package/report/creationReport.json +1019 -0
  67. package/report/openapi-prisma.json +10213 -0
  68. package/sampleProperties.json +106 -0
  69. package/test/integration/adapterTestBasicGet.js +85 -0
  70. package/test/integration/adapterTestConnectivity.js +93 -0
  71. package/test/integration/adapterTestIntegration.js +3712 -0
  72. package/test/unit/adapterBaseTestUnit.js +944 -0
  73. package/test/unit/adapterTestUnit.js +4219 -0
  74. package/utils/addAuth.js +94 -0
  75. package/utils/artifactize.js +146 -0
  76. package/utils/basicGet.js +50 -0
  77. package/utils/checkMigrate.js +63 -0
  78. package/utils/entitiesToDB.js +224 -0
  79. package/utils/findPath.js +74 -0
  80. package/utils/modify.js +154 -0
  81. package/utils/packModificationScript.js +35 -0
  82. package/utils/pre-commit.sh +27 -0
  83. package/utils/removeHooks.js +20 -0
  84. package/utils/setup.js +33 -0
  85. package/utils/tbScript.js +169 -0
  86. package/utils/tbUtils.js +445 -0
  87. package/utils/testRunner.js +298 -0
  88. package/utils/troubleshootingAdapter.js +190 -0
  89. package/workflows/README.md +3 -0
@@ -0,0 +1,409 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "listCloudAccounts",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/cloud?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "listCloudAccountNames",
26
+ "protocol": "REST",
27
+ "method": "GET",
28
+ "entitypath": "{base_path}/{version}/cloud/name?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "sendGetBody": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {},
37
+ "responseObjects": [
38
+ {
39
+ "type": "default",
40
+ "key": "",
41
+ "mockFile": ""
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "name": "listCloudOrgAccounts",
47
+ "protocol": "REST",
48
+ "method": "GET",
49
+ "entitypath": "{base_path}/{version}/cloud/CLOUD_TYPE/CLOUD_ACCOUNT_ID/project?{query}",
50
+ "requestSchema": "schema.json",
51
+ "responseSchema": "schema.json",
52
+ "timeout": 0,
53
+ "sendEmpty": false,
54
+ "sendGetBody": false,
55
+ "requestDatatype": "JSON",
56
+ "responseDatatype": "JSON",
57
+ "headers": {},
58
+ "responseObjects": [
59
+ {
60
+ "type": "default",
61
+ "key": "",
62
+ "mockFile": ""
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "listCloudTypes",
68
+ "protocol": "REST",
69
+ "method": "GET",
70
+ "entitypath": "{base_path}/{version}/cloud/type?{query}",
71
+ "requestSchema": "schema.json",
72
+ "responseSchema": "schema.json",
73
+ "timeout": 0,
74
+ "sendEmpty": false,
75
+ "sendGetBody": false,
76
+ "requestDatatype": "JSON",
77
+ "responseDatatype": "JSON",
78
+ "headers": {},
79
+ "responseObjects": [
80
+ {
81
+ "type": "default",
82
+ "key": "",
83
+ "mockFile": ""
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "name": "addCloudAccountAWS",
89
+ "protocol": "REST",
90
+ "method": "POST",
91
+ "entitypath": "{base_path}/{version}/cloud/aws?{query}",
92
+ "requestSchema": "schema.json",
93
+ "responseSchema": "schema.json",
94
+ "timeout": 0,
95
+ "sendEmpty": false,
96
+ "requestDatatype": "JSON",
97
+ "responseDatatype": "JSON",
98
+ "headers": {},
99
+ "responseObjects": [
100
+ {
101
+ "type": "default",
102
+ "key": "",
103
+ "mockFile": ""
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "name": "addCloudAccountAzure",
109
+ "protocol": "REST",
110
+ "method": "POST",
111
+ "entitypath": "{base_path}/{version}/cloud/azure?{query}",
112
+ "requestSchema": "schema.json",
113
+ "responseSchema": "schema.json",
114
+ "timeout": 0,
115
+ "sendEmpty": false,
116
+ "requestDatatype": "JSON",
117
+ "responseDatatype": "JSON",
118
+ "headers": {},
119
+ "responseObjects": [
120
+ {
121
+ "type": "default",
122
+ "key": "",
123
+ "mockFile": ""
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "addCloudAccountGCP",
129
+ "protocol": "REST",
130
+ "method": "POST",
131
+ "entitypath": "{base_path}/{version}/cloud/gcp?{query}",
132
+ "requestSchema": "schema.json",
133
+ "responseSchema": "schema.json",
134
+ "timeout": 0,
135
+ "sendEmpty": false,
136
+ "requestDatatype": "JSON",
137
+ "responseDatatype": "JSON",
138
+ "headers": {},
139
+ "responseObjects": [
140
+ {
141
+ "type": "default",
142
+ "key": "",
143
+ "mockFile": ""
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "name": "addCloudAccountAliCloud",
149
+ "protocol": "REST",
150
+ "method": "POST",
151
+ "entitypath": "{base_path}/{version}/cloud/alibaba_cloud?{query}",
152
+ "requestSchema": "schema.json",
153
+ "responseSchema": "schema.json",
154
+ "timeout": 0,
155
+ "sendEmpty": false,
156
+ "requestDatatype": "JSON",
157
+ "responseDatatype": "JSON",
158
+ "headers": {},
159
+ "responseObjects": [
160
+ {
161
+ "type": "default",
162
+ "key": "",
163
+ "mockFile": ""
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "name": "cloudAccountInfo",
169
+ "protocol": "REST",
170
+ "method": "GET",
171
+ "entitypath": "{base_path}/{version}/cloud/CLOUD_TYPE/CLOUD_ID?{query}",
172
+ "requestSchema": "schema.json",
173
+ "responseSchema": "schema.json",
174
+ "timeout": 0,
175
+ "sendEmpty": false,
176
+ "sendGetBody": false,
177
+ "requestDatatype": "JSON",
178
+ "responseDatatype": "JSON",
179
+ "headers": {},
180
+ "responseObjects": [
181
+ {
182
+ "type": "default",
183
+ "key": "",
184
+ "mockFile": ""
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ "name": "updateCloudAccountAWS",
190
+ "protocol": "REST",
191
+ "method": "PUT",
192
+ "entitypath": "{base_path}/{version}/cloud/CLOUD_TYPE/CLOUD_ID?{query}",
193
+ "requestSchema": "schema.json",
194
+ "responseSchema": "schema.json",
195
+ "timeout": 0,
196
+ "sendEmpty": false,
197
+ "requestDatatype": "JSON",
198
+ "responseDatatype": "JSON",
199
+ "headers": {},
200
+ "responseObjects": [
201
+ {
202
+ "type": "default",
203
+ "key": "",
204
+ "mockFile": ""
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ "name": "addCloudAccountAzure1",
210
+ "protocol": "REST",
211
+ "method": "POST",
212
+ "entitypath": "{base_path}/{version}/cloud/azure/CLOUD_ACCOUNT_ID?{query}",
213
+ "requestSchema": "schema.json",
214
+ "responseSchema": "schema.json",
215
+ "timeout": 0,
216
+ "sendEmpty": false,
217
+ "requestDatatype": "JSON",
218
+ "responseDatatype": "JSON",
219
+ "headers": {},
220
+ "responseObjects": [
221
+ {
222
+ "type": "default",
223
+ "key": "",
224
+ "mockFile": ""
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "name": "addCloudAccountGCP1",
230
+ "protocol": "REST",
231
+ "method": "PUT",
232
+ "entitypath": "{base_path}/{version}/cloud/gcp/CLOUD_ACCOUNT_ID?{query}",
233
+ "requestSchema": "schema.json",
234
+ "responseSchema": "schema.json",
235
+ "timeout": 0,
236
+ "sendEmpty": false,
237
+ "requestDatatype": "JSON",
238
+ "responseDatatype": "JSON",
239
+ "headers": {},
240
+ "responseObjects": [
241
+ {
242
+ "type": "default",
243
+ "key": "",
244
+ "mockFile": ""
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "name": "cAUTIONDELETECloudAccount",
250
+ "protocol": "REST",
251
+ "method": "DELETE",
252
+ "entitypath": "{base_path}/{version}/cloud/gcp/CLOUD_ACCOUNT_ID?{query}",
253
+ "requestSchema": "schema.json",
254
+ "responseSchema": "schema.json",
255
+ "timeout": 0,
256
+ "sendEmpty": false,
257
+ "requestDatatype": "JSON",
258
+ "responseDatatype": "JSON",
259
+ "headers": {},
260
+ "responseObjects": [
261
+ {
262
+ "type": "default",
263
+ "key": "",
264
+ "mockFile": ""
265
+ }
266
+ ]
267
+ },
268
+ {
269
+ "name": "addCloudAccountAliCloud1",
270
+ "protocol": "REST",
271
+ "method": "POST",
272
+ "entitypath": "{base_path}/{version}/cloud/alibaba_cloud/CLOUD_ACCOUNT_ID?{query}",
273
+ "requestSchema": "schema.json",
274
+ "responseSchema": "schema.json",
275
+ "timeout": 0,
276
+ "sendEmpty": false,
277
+ "requestDatatype": "JSON",
278
+ "responseDatatype": "JSON",
279
+ "headers": {},
280
+ "responseObjects": [
281
+ {
282
+ "type": "default",
283
+ "key": "",
284
+ "mockFile": ""
285
+ }
286
+ ]
287
+ },
288
+ {
289
+ "name": "patchCloudAccount",
290
+ "protocol": "REST",
291
+ "method": "PATCH",
292
+ "entitypath": "{base_path}/{version}/CLOUD_TYPE/CLOUD_ID?{query}",
293
+ "requestSchema": "schema.json",
294
+ "responseSchema": "schema.json",
295
+ "timeout": 0,
296
+ "sendEmpty": false,
297
+ "requestDatatype": "JSON",
298
+ "responseDatatype": "JSON",
299
+ "headers": {},
300
+ "responseObjects": [
301
+ {
302
+ "type": "default",
303
+ "key": "",
304
+ "mockFile": ""
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "name": "getCloudAccountStatusAWS",
310
+ "protocol": "REST",
311
+ "method": "POST",
312
+ "entitypath": "{base_path}/{version}/cloud/status/aws?{query}",
313
+ "requestSchema": "schema.json",
314
+ "responseSchema": "schema.json",
315
+ "timeout": 0,
316
+ "sendEmpty": false,
317
+ "requestDatatype": "JSON",
318
+ "responseDatatype": "JSON",
319
+ "headers": {},
320
+ "responseObjects": [
321
+ {
322
+ "type": "default",
323
+ "key": "",
324
+ "mockFile": ""
325
+ }
326
+ ]
327
+ },
328
+ {
329
+ "name": "getCloudAccountStatusAzure",
330
+ "protocol": "REST",
331
+ "method": "POST",
332
+ "entitypath": "{base_path}/{version}/cloud/status/azure?{query}",
333
+ "requestSchema": "schema.json",
334
+ "responseSchema": "schema.json",
335
+ "timeout": 0,
336
+ "sendEmpty": false,
337
+ "requestDatatype": "JSON",
338
+ "responseDatatype": "JSON",
339
+ "headers": {},
340
+ "responseObjects": [
341
+ {
342
+ "type": "default",
343
+ "key": "",
344
+ "mockFile": ""
345
+ }
346
+ ]
347
+ },
348
+ {
349
+ "name": "getCloudAccountStatusGCP",
350
+ "protocol": "REST",
351
+ "method": "POST",
352
+ "entitypath": "{base_path}/{version}/cloud/status/gcp?{query}",
353
+ "requestSchema": "schema.json",
354
+ "responseSchema": "schema.json",
355
+ "timeout": 0,
356
+ "sendEmpty": false,
357
+ "requestDatatype": "JSON",
358
+ "responseDatatype": "JSON",
359
+ "headers": {},
360
+ "responseObjects": [
361
+ {
362
+ "type": "default",
363
+ "key": "",
364
+ "mockFile": ""
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "name": "getCloudAccountStatusAliCloud",
370
+ "protocol": "REST",
371
+ "method": "POST",
372
+ "entitypath": "{base_path}/{version}/cloud/status/alibaba_cloud?{query}",
373
+ "requestSchema": "schema.json",
374
+ "responseSchema": "schema.json",
375
+ "timeout": 0,
376
+ "sendEmpty": false,
377
+ "requestDatatype": "JSON",
378
+ "responseDatatype": "JSON",
379
+ "headers": {},
380
+ "responseObjects": [
381
+ {
382
+ "type": "default",
383
+ "key": "",
384
+ "mockFile": ""
385
+ }
386
+ ]
387
+ },
388
+ {
389
+ "name": "updateCloudAccountStatus",
390
+ "protocol": "REST",
391
+ "method": "PATCH",
392
+ "entitypath": "{base_path}/{version}/cloud/ACCOUNT_ID/status/TRUE_FALSE?{query}",
393
+ "requestSchema": "schema.json",
394
+ "responseSchema": "schema.json",
395
+ "timeout": 0,
396
+ "sendEmpty": false,
397
+ "requestDatatype": "JSON",
398
+ "responseDatatype": "JSON",
399
+ "headers": {},
400
+ "responseObjects": [
401
+ {
402
+ "type": "default",
403
+ "key": "",
404
+ "mockFile": ""
405
+ }
406
+ ]
407
+ }
408
+ ]
409
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "listCloudAccounts",
12
+ "enum": [
13
+ "listCloudAccounts",
14
+ "listCloudAccountNames",
15
+ "listCloudOrgAccounts",
16
+ "listCloudTypes",
17
+ "addCloudAccountAWS",
18
+ "addCloudAccountAzure",
19
+ "addCloudAccountGCP",
20
+ "addCloudAccountAliCloud",
21
+ "cloudAccountInfo",
22
+ "updateCloudAccountAWS",
23
+ "addCloudAccountAzure1",
24
+ "addCloudAccountGCP1",
25
+ "cAUTIONDELETECloudAccount",
26
+ "addCloudAccountAliCloud1",
27
+ "patchCloudAccount",
28
+ "getCloudAccountStatusAWS",
29
+ "getCloudAccountStatusAzure",
30
+ "getCloudAccountStatusGCP",
31
+ "getCloudAccountStatusAliCloud",
32
+ "updateCloudAccountStatus"
33
+ ],
34
+ "external_name": "ph_request_type"
35
+ }
36
+ },
37
+ "definitions": {}
38
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "complianceResourceStatisticsBreakdown",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/compliance/dashboard?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "overallComplianceResourceStatisticsOverTime",
26
+ "protocol": "REST",
27
+ "method": "GET",
28
+ "entitypath": "{base_path}/{version}/compliance/dashboard/history?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "sendGetBody": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {},
37
+ "responseObjects": [
38
+ {
39
+ "type": "default",
40
+ "key": "",
41
+ "mockFile": ""
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "name": "getComplianceDashboardFilters",
47
+ "protocol": "REST",
48
+ "method": "GET",
49
+ "entitypath": "{base_path}/{version}/filter/compliance/suggest?{query}",
50
+ "requestSchema": "schema.json",
51
+ "responseSchema": "schema.json",
52
+ "timeout": 0,
53
+ "sendEmpty": false,
54
+ "sendGetBody": false,
55
+ "requestDatatype": "JSON",
56
+ "responseDatatype": "JSON",
57
+ "headers": {},
58
+ "responseObjects": [
59
+ {
60
+ "type": "default",
61
+ "key": "",
62
+ "mockFile": ""
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "getComplianceDashboardFiltersCopy",
68
+ "protocol": "REST",
69
+ "method": "POST",
70
+ "entitypath": "{base_path}/{version}/filter/compliance/suggest?{query}",
71
+ "requestSchema": "schema.json",
72
+ "responseSchema": "schema.json",
73
+ "timeout": 0,
74
+ "sendEmpty": false,
75
+ "requestDatatype": "JSON",
76
+ "responseDatatype": "JSON",
77
+ "headers": {},
78
+ "responseObjects": [
79
+ {
80
+ "type": "default",
81
+ "key": "",
82
+ "mockFile": ""
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "complianceResourceStatisticsBreakdown",
12
+ "enum": [
13
+ "complianceResourceStatisticsBreakdown",
14
+ "overallComplianceResourceStatisticsOverTime",
15
+ "getComplianceDashboardFilters",
16
+ "getComplianceDashboardFiltersCopy"
17
+ ],
18
+ "external_name": "ph_request_type"
19
+ }
20
+ },
21
+ "definitions": {}
22
+ }