@itentialopensource/adapter-digicert_pki 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 (87) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc.js +18 -0
  3. package/.gitlab/.gitkeep +0 -0
  4. package/.gitlab/issue_templates/.gitkeep +0 -0
  5. package/.gitlab/issue_templates/Default.md +17 -0
  6. package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
  7. package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
  8. package/.jshintrc +0 -0
  9. package/AUTH.md +39 -0
  10. package/BROKER.md +199 -0
  11. package/CALLS.md +356 -0
  12. package/CHANGELOG.md +9 -0
  13. package/CODE_OF_CONDUCT.md +43 -0
  14. package/CONTRIBUTING.md +172 -0
  15. package/ENHANCE.md +69 -0
  16. package/LICENSE +201 -0
  17. package/PROPERTIES.md +641 -0
  18. package/README.md +337 -0
  19. package/SUMMARY.md +9 -0
  20. package/SYSTEMINFO.md +11 -0
  21. package/TROUBLESHOOT.md +47 -0
  22. package/adapter.js +3945 -0
  23. package/adapterBase.js +1787 -0
  24. package/entities/.generic/action.json +214 -0
  25. package/entities/.generic/schema.json +28 -0
  26. package/entities/.system/action.json +50 -0
  27. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  28. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  29. package/entities/.system/schema.json +19 -0
  30. package/entities/.system/schemaTokenReq.json +53 -0
  31. package/entities/.system/schemaTokenResp.json +53 -0
  32. package/entities/AuditAPI/action.json +46 -0
  33. package/entities/AuditAPI/schema.json +20 -0
  34. package/entities/CAAPI/action.json +46 -0
  35. package/entities/CAAPI/schema.json +20 -0
  36. package/entities/CertificateEnrollmentAPI/action.json +166 -0
  37. package/entities/CertificateEnrollmentAPI/schema.json +26 -0
  38. package/entities/CertificateProfileAPI/action.json +46 -0
  39. package/entities/CertificateProfileAPI/mockdatafiles/getAllProfilesUsingGET-default.json +1288 -0
  40. package/entities/CertificateProfileAPI/schema.json +20 -0
  41. package/entities/EnrollStatusAPI/action.json +25 -0
  42. package/entities/EnrollStatusAPI/mockdatafiles/enrollStatusUsingGET-default.json +17 -0
  43. package/entities/EnrollStatusAPI/schema.json +30 -0
  44. package/entities/HelloAPI/action.json +25 -0
  45. package/entities/HelloAPI/schema.json +19 -0
  46. package/entities/PROFILEAPI/action.json +124 -0
  47. package/entities/PROFILEAPI/schema.json +24 -0
  48. package/entities/SearchCertificateAPI/action.json +24 -0
  49. package/entities/SearchCertificateAPI/schema.json +19 -0
  50. package/entities/SeatManagementAPI/action.json +85 -0
  51. package/entities/SeatManagementAPI/schema.json +22 -0
  52. package/entities/UserManagementAPI/action.json +85 -0
  53. package/entities/UserManagementAPI/schema.json +33 -0
  54. package/error.json +190 -0
  55. package/package.json +86 -0
  56. package/pronghorn.json +4141 -0
  57. package/propertiesDecorators.json +14 -0
  58. package/propertiesSchema.json +1248 -0
  59. package/refs?service=git-upload-pack +0 -0
  60. package/report/DigiCert One Swagger v1.0.44.json +1 -0
  61. package/report/adapterInfo.json +10 -0
  62. package/report/creationReport.json +490 -0
  63. package/sampleProperties.json +195 -0
  64. package/test/integration/adapterTestBasicGet.js +83 -0
  65. package/test/integration/adapterTestConnectivity.js +93 -0
  66. package/test/integration/adapterTestIntegration.js +1867 -0
  67. package/test/unit/adapterBaseTestUnit.js +949 -0
  68. package/test/unit/adapterTestUnit.js +2278 -0
  69. package/utils/adapterInfo.js +206 -0
  70. package/utils/addAuth.js +94 -0
  71. package/utils/artifactize.js +146 -0
  72. package/utils/basicGet.js +50 -0
  73. package/utils/checkMigrate.js +63 -0
  74. package/utils/entitiesToDB.js +178 -0
  75. package/utils/findPath.js +74 -0
  76. package/utils/methodDocumentor.js +225 -0
  77. package/utils/modify.js +154 -0
  78. package/utils/packModificationScript.js +35 -0
  79. package/utils/patches2bundledDeps.js +90 -0
  80. package/utils/pre-commit.sh +32 -0
  81. package/utils/removeHooks.js +20 -0
  82. package/utils/setup.js +33 -0
  83. package/utils/tbScript.js +246 -0
  84. package/utils/tbUtils.js +490 -0
  85. package/utils/testRunner.js +298 -0
  86. package/utils/troubleshootingAdapter.js +195 -0
  87. package/workflows/README.md +3 -0
package/CALLS.md ADDED
@@ -0,0 +1,356 @@
1
+ ## Using this Adapter
2
+
3
+ The `adapter.js` file contains the calls the adapter makes available to the rest of the Itential Platform. The API detailed for these calls should be available through JSDOC. The following is a brief summary of the calls.
4
+
5
+ ### Generic Adapter Calls
6
+
7
+ These are adapter methods that IAP or you might use. There are some other methods not shown here that might be used for internal adapter functionality.
8
+
9
+ <table border="1" class="bordered-table">
10
+ <tr>
11
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
12
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
13
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
14
+ </tr>
15
+ <tr>
16
+ <td style="padding:15px">connect()</td>
17
+ <td style="padding:15px">This call is run when the Adapter is first loaded by he Itential Platform. It validates the properties have been provided correctly.</td>
18
+ <td style="padding:15px">No</td>
19
+ </tr>
20
+ <tr>
21
+ <td style="padding:15px">healthCheck(callback)</td>
22
+ <td style="padding:15px">This call ensures that the adapter can communicate with Digicert. The actual call that is used is defined in the adapter properties and .system entities action.json file.</td>
23
+ <td style="padding:15px">No</td>
24
+ </tr>
25
+ <tr>
26
+ <td style="padding:15px">refreshProperties(properties)</td>
27
+ <td style="padding:15px">This call provides the adapter the ability to accept property changes without having to restart the adapter.</td>
28
+ <td style="padding:15px">No</td>
29
+ </tr>
30
+ <tr>
31
+ <td style="padding:15px">encryptProperty(property, technique, callback)</td>
32
+ <td style="padding:15px">This call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Digicert.</td>
33
+ <td style="padding:15px">No</td>
34
+ </tr>
35
+ <tr>
36
+ <td style="padding:15px">iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback)</td>
37
+ <td style="padding:15px">This call provides the ability to update the adapter configuration from IAP - includes actions, schema, mockdata and other configurations.</td>
38
+ <td style="padding:15px">Yes</td>
39
+ </tr>
40
+ <tr>
41
+ <td style="padding:15px">iapFindAdapterPath(apiPath, callback)</td>
42
+ <td style="padding:15px">This call provides the ability to see if a particular API path is supported by the adapter.</td>
43
+ <td style="padding:15px">Yes</td>
44
+ </tr>
45
+ <tr>
46
+ <td style="padding:15px">iapSuspendAdapter(mode, callback)</td>
47
+ <td style="padding:15px">This call provides the ability to suspend the adapter and either have requests rejected or put into a queue to be processed after the adapter is resumed.</td>
48
+ <td style="padding:15px">Yes</td>
49
+ </tr>
50
+ <tr>
51
+ <td style="padding:15px">iapUnsuspendAdapter(callback)</td>
52
+ <td style="padding:15px">This call provides the ability to resume a suspended adapter. Any requests in queue will be processed before new requests.</td>
53
+ <td style="padding:15px">Yes</td>
54
+ </tr>
55
+ <tr>
56
+ <td style="padding:15px">iapGetAdapterQueue(callback)</td>
57
+ <td style="padding:15px">This call will return the requests that are waiting in the queue if throttling is enabled.</td>
58
+ <td style="padding:15px">Yes</td>
59
+ </tr>
60
+ <tr>
61
+ <td style="padding:15px">iapTroubleshootAdapter(props, persistFlag, adapter, callback)</td>
62
+ <td style="padding:15px">This call can be used to check on the performance of the adapter - it checks connectivity, healthcheck and basic get calls.</td>
63
+ <td style="padding:15px">Yes</td>
64
+ </tr>
65
+
66
+ <tr>
67
+ <td style="padding:15px">iapRunAdapterHealthcheck(adapter, callback)</td>
68
+ <td style="padding:15px">This call will return the results of a healthcheck.</td>
69
+ <td style="padding:15px">Yes</td>
70
+ </tr>
71
+ <tr>
72
+ <td style="padding:15px">iapRunAdapterConnectivity(callback)</td>
73
+ <td style="padding:15px">This call will return the results of a connectivity check.</td>
74
+ <td style="padding:15px">Yes</td>
75
+ </tr>
76
+ <tr>
77
+ <td style="padding:15px">iapRunAdapterBasicGet(callback)</td>
78
+ <td style="padding:15px">This call will return the results of running basic get API calls.</td>
79
+ <td style="padding:15px">Yes</td>
80
+ </tr>
81
+ <tr>
82
+ <td style="padding:15px">iapMoveAdapterEntitiesToDB(callback)</td>
83
+ <td style="padding:15px">This call will push the adapter configuration from the entities directory into the Adapter or IAP Database.</td>
84
+ <td style="padding:15px">Yes</td>
85
+ </tr>
86
+ <tr>
87
+ <td style="padding:15px">genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td>
88
+ <td style="padding:15px">This call allows you to provide the path to have the adapter call. It is an easy way to incorporate paths that have not been built into the adapter yet.</td>
89
+ <td style="padding:15px">Yes</td>
90
+ </tr>
91
+ <tr>
92
+ <td style="padding:15px">genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td>
93
+ <td style="padding:15px">This call is the same as the genericAdapterRequest only it does not add a base_path or version to the call.</td>
94
+ <td style="padding:15px">Yes</td>
95
+ </tr>
96
+ <tr>
97
+ <td style="padding:15px">iapHasAdapterEntity(entityType, entityId, callback)</td>
98
+ <td style="padding:15px">This call verifies the adapter has the specific entity.</td>
99
+ <td style="padding:15px">No</td>
100
+ </tr>
101
+ <tr>
102
+ <td style="padding:15px">iapVerifyAdapterCapability(entityType, actionType, entityId, callback)</td>
103
+ <td style="padding:15px">This call verifies the adapter can perform the provided action on the specific entity.</td>
104
+ <td style="padding:15px">No</td>
105
+ </tr>
106
+ <tr>
107
+ <td style="padding:15px">iapUpdateAdapterEntityCache()</td>
108
+ <td style="padding:15px">This call will update the entity cache.</td>
109
+ <td style="padding:15px">No</td>
110
+ </tr>
111
+ </table>
112
+ <br>
113
+
114
+ ### Adapter Broker Calls
115
+
116
+ These are adapter methods that are used to integrate to IAP Brokers. This adapter currently supports the following broker calls.
117
+
118
+ <table border="1" class="bordered-table">
119
+ <tr>
120
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
121
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
122
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
123
+ </tr>
124
+ <tr>
125
+ <td style="padding:15px">hasEntities(entityType, entityList, callback)</td>
126
+ <td style="padding:15px">This call is utilized by the IAP Device Broker to determine if the adapter has a specific entity and item of the entity.</td>
127
+ <td style="padding:15px">No</td>
128
+ </tr>
129
+ <tr>
130
+ <td style="padding:15px">getDevice(deviceName, callback)</td>
131
+ <td style="padding:15px">This call returns the details of the requested device.</td>
132
+ <td style="padding:15px">Yes</td>
133
+ </tr>
134
+ <tr>
135
+ <td style="padding:15px">getDevicesFiltered(options, callback)</td>
136
+ <td style="padding:15px">This call returns the list of devices that match the criteria provided in the options filter.</td>
137
+ <td style="padding:15px">Yes</td>
138
+ </tr>
139
+ <tr>
140
+ <td style="padding:15px">isAlive(deviceName, callback)</td>
141
+ <td style="padding:15px">This call returns whether the device status is active</td>
142
+ <td style="padding:15px">Yes</td>
143
+ </tr>
144
+ <tr>
145
+ <td style="padding:15px">getConfig(deviceName, format, callback)</td>
146
+ <td style="padding:15px">This call returns the configuration for the selected device.</td>
147
+ <td style="padding:15px">Yes</td>
148
+ </tr>
149
+ <tr>
150
+ <td style="padding:15px">iapGetDeviceCount(callback)</td>
151
+ <td style="padding:15px">This call returns the count of devices.</td>
152
+ <td style="padding:15px">Yes</td>
153
+ </tr>
154
+ </table>
155
+ <br>
156
+
157
+
158
+ ### Specific Adapter Calls
159
+
160
+ Specific adapter calls are built based on the API of the Digicert. The Adapter Builder creates the proper method comments for generating JS-DOC for the adapter. This is the best way to get information on the calls.
161
+
162
+ <table border="1" class="bordered-table">
163
+ <tr>
164
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
165
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
166
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Path</span></th>
167
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
168
+ </tr>
169
+ <tr>
170
+ <td style="padding:15px">getAuditsUsingGET(action, adminRA, dateFrom, dateTo, limit, offset, callback)</td>
171
+ <td style="padding:15px">This API is used to get audit details for given query param</td>
172
+ <td style="padding:15px">{base_path}/{version}/api/v1/audit-log?{query}</td>
173
+ <td style="padding:15px">Yes</td>
174
+ </tr>
175
+ <tr>
176
+ <td style="padding:15px">getAuditUsingGET(auditId, callback)</td>
177
+ <td style="padding:15px">This API is used to get audit details for given audit Id.</td>
178
+ <td style="padding:15px">{base_path}/{version}/api/v1/audit-log/{pathv1}?{query}</td>
179
+ <td style="padding:15px">Yes</td>
180
+ </tr>
181
+ <tr>
182
+ <td style="padding:15px">getCAInfoUsingGET(caId, callback)</td>
183
+ <td style="padding:15px">This API is used to get public CA details for a given ca identifier</td>
184
+ <td style="padding:15px">{base_path}/{version}/api/v1/ca/id/{pathv1}?{query}</td>
185
+ <td style="padding:15px">Yes</td>
186
+ </tr>
187
+ <tr>
188
+ <td style="padding:15px">getCAUsingGET(seatType, callback)</td>
189
+ <td style="padding:15px">This API is used to get public CA details for a given account api key</td>
190
+ <td style="padding:15px">{base_path}/{version}/api/v1/ca/{pathv1}?{query}</td>
191
+ <td style="padding:15px">Yes</td>
192
+ </tr>
193
+ <tr>
194
+ <td style="padding:15px">enrollCertificateUsingPOST(enrollCertificateRequest, callback)</td>
195
+ <td style="padding:15px">This API is used to enroll a certificate for a given profile.</td>
196
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate?{query}</td>
197
+ <td style="padding:15px">Yes</td>
198
+ </tr>
199
+ <tr>
200
+ <td style="padding:15px">createCertificateUsingPOST(enrollCertificateRequest, callback)</td>
201
+ <td style="padding:15px">This API is used to enroll a certificate for a given profile.</td>
202
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/create?{query}</td>
203
+ <td style="padding:15px">Yes</td>
204
+ </tr>
205
+ <tr>
206
+ <td style="padding:15px">renewExternalCertificateUsingPOST(enrollCertificateRequest, serialNumber, callback)</td>
207
+ <td style="padding:15px">This API is used to enroll a certificate for a given profile.</td>
208
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/renew/{pathv1}?{query}</td>
209
+ <td style="padding:15px">Yes</td>
210
+ </tr>
211
+ <tr>
212
+ <td style="padding:15px">getCertificateUsingGET(serialNumber, callback)</td>
213
+ <td style="padding:15px">This API is used to get certificate details for a given certificate serial number</td>
214
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/{pathv1}?{query}</td>
215
+ <td style="padding:15px">Yes</td>
216
+ </tr>
217
+ <tr>
218
+ <td style="padding:15px">recoverKeyUsingGET(serialNumber, callback)</td>
219
+ <td style="padding:15px">This API is used to get private key information for key-escrowed certificate with given serial number</td>
220
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/{pathv1}/key?{query}</td>
221
+ <td style="padding:15px">Yes</td>
222
+ </tr>
223
+ <tr>
224
+ <td style="padding:15px">renewCertificateUsingPOST(enrollCertificateRequest, serialNumber, callback)</td>
225
+ <td style="padding:15px">This API is used to renew certificate with the given serial number.</td>
226
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/{pathv1}/renew?{query}</td>
227
+ <td style="padding:15px">Yes</td>
228
+ </tr>
229
+ <tr>
230
+ <td style="padding:15px">revokeCertificateUsingPUT(revokeCertificateRequest, serialNumber, callback)</td>
231
+ <td style="padding:15px">This API can revoke certificate with the given serial number</td>
232
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/{pathv1}/revoke?{query}</td>
233
+ <td style="padding:15px">Yes</td>
234
+ </tr>
235
+ <tr>
236
+ <td style="padding:15px">unRevokeCertificateUsingDELETE(serialNumber, callback)</td>
237
+ <td style="padding:15px">This API can resume certificate with the given serial number.</td>
238
+ <td style="padding:15px">{base_path}/{version}/api/v1/certificate/{pathv1}/revoke?{query}</td>
239
+ <td style="padding:15px">Yes</td>
240
+ </tr>
241
+ <tr>
242
+ <td style="padding:15px">createPasscodeUsingPOST(createPasscodeRequest, callback)</td>
243
+ <td style="padding:15px">This API is used to enroll user for profile.</td>
244
+ <td style="padding:15px">{base_path}/{version}/api/v1/enrollment?{query}</td>
245
+ <td style="padding:15px">Yes</td>
246
+ </tr>
247
+ <tr>
248
+ <td style="padding:15px">getEnrollmentUsingGET(enrollCode, seatId, callback)</td>
249
+ <td style="padding:15px">This API is used to get details of an existing enrollment.</td>
250
+ <td style="padding:15px">{base_path}/{version}/api/v1/enrollment/{pathv1}?{query}</td>
251
+ <td style="padding:15px">Yes</td>
252
+ </tr>
253
+ <tr>
254
+ <td style="padding:15px">resetPasscodeUsingPUT(enrollCode, resetPasscodeRequest, callback)</td>
255
+ <td style="padding:15px">This API is used to reset enrollment code.</td>
256
+ <td style="padding:15px">{base_path}/{version}/api/v1/enrollment/{pathv1}?{query}</td>
257
+ <td style="padding:15px">Yes</td>
258
+ </tr>
259
+ <tr>
260
+ <td style="padding:15px">deleteEnrollmentUsingDELETE(deleteEnrollRequest, enrollCode, callback)</td>
261
+ <td style="padding:15px">This API can delete an enrollment for given enrollment id</td>
262
+ <td style="padding:15px">{base_path}/{version}/api/v1/enrollment/{pathv1}?{query}</td>
263
+ <td style="padding:15px">Yes</td>
264
+ </tr>
265
+ <tr>
266
+ <td style="padding:15px">enrollStatusUsingGET(profileId, seatId, callback)</td>
267
+ <td style="padding:15px">This API is used to get certificate enrollment status.</td>
268
+ <td style="padding:15px">{base_path}/{version}/api/v1/enrollstatus/{pathv1}?{query}</td>
269
+ <td style="padding:15px">Yes</td>
270
+ </tr>
271
+ <tr>
272
+ <td style="padding:15px">helloUsingGET(callback)</td>
273
+ <td style="padding:15px">Hello API</td>
274
+ <td style="padding:15px">{base_path}/{version}/api/v1/hello?{query}</td>
275
+ <td style="padding:15px">Yes</td>
276
+ </tr>
277
+ <tr>
278
+ <td style="padding:15px">getAllProfilesUsingGET(callback)</td>
279
+ <td style="padding:15px">This API is used to get profile details of all profiles in an account and its subaccounts</td>
280
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile?{query}</td>
281
+ <td style="padding:15px">Yes</td>
282
+ </tr>
283
+ <tr>
284
+ <td style="padding:15px">getProfileUsingGET(profileId, callback)</td>
285
+ <td style="padding:15px">This API is used to get profile details for a given profile id</td>
286
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/{pathv1}?{query}</td>
287
+ <td style="padding:15px">Yes</td>
288
+ </tr>
289
+ <tr>
290
+ <td style="padding:15px">activateProfileUsingPUT(profileCreationRequest, callback)</td>
291
+ <td style="padding:15px">This API is used to suspend a profile</td>
292
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/activate?{query}</td>
293
+ <td style="padding:15px">Yes</td>
294
+ </tr>
295
+ <tr>
296
+ <td style="padding:15px">createProfileUsingPOST(profileCreationRequest, callback)</td>
297
+ <td style="padding:15px">This API is used to create a profile</td>
298
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/create?{query}</td>
299
+ <td style="padding:15px">Yes</td>
300
+ </tr>
301
+ <tr>
302
+ <td style="padding:15px">deleteProfileUsingPUT(profileCreationRequest, callback)</td>
303
+ <td style="padding:15px">This API is used to delete a profile</td>
304
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/delete?{query}</td>
305
+ <td style="padding:15px">Yes</td>
306
+ </tr>
307
+ <tr>
308
+ <td style="padding:15px">updateProfileUsingPUT(profileCreationRequest, callback)</td>
309
+ <td style="padding:15px">This API is used to create a profile</td>
310
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/edit?{query}</td>
311
+ <td style="padding:15px">Yes</td>
312
+ </tr>
313
+ <tr>
314
+ <td style="padding:15px">suspendProfileUsingPUT(profileCreationRequest, callback)</td>
315
+ <td style="padding:15px">This API is used to suspend a profile</td>
316
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/suspend?{query}</td>
317
+ <td style="padding:15px">Yes</td>
318
+ </tr>
319
+ <tr>
320
+ <td style="padding:15px">testCreateUsingPOST(callback)</td>
321
+ <td style="padding:15px">This API is used to create a profile</td>
322
+ <td style="padding:15px">{base_path}/{version}/api/v1/profile/test?{query}</td>
323
+ <td style="padding:15px">Yes</td>
324
+ </tr>
325
+ <tr>
326
+ <td style="padding:15px">searchCertUsingPOST(searchReq, callback)</td>
327
+ <td style="padding:15px">This API is used to search for certificates.</td>
328
+ <td style="padding:15px">{base_path}/{version}/api/v1/searchcert?{query}</td>
329
+ <td style="padding:15px">Yes</td>
330
+ </tr>
331
+ <tr>
332
+ <td style="padding:15px">createSeatUsingPOST(createSeatRequest, callback)</td>
333
+ <td style="padding:15px">This API is used to create a seat. This seat can be used for a user, device, server or organization seat pool.</td>
334
+ <td style="padding:15px">{base_path}/{version}/api/v1/seat?{query}</td>
335
+ <td style="padding:15px">Yes</td>
336
+ </tr>
337
+ <tr>
338
+ <td style="padding:15px">getSeatUsingGET(seatId, callback)</td>
339
+ <td style="padding:15px">This API is used to get information regarding a seat.</td>
340
+ <td style="padding:15px">{base_path}/{version}/api/v1/seat/{pathv1}?{query}</td>
341
+ <td style="padding:15px">Yes</td>
342
+ </tr>
343
+ <tr>
344
+ <td style="padding:15px">updateSeatUsingPUT(seatId, updateSeatRequest, callback)</td>
345
+ <td style="padding:15px">This API is used to change the seat details.</td>
346
+ <td style="padding:15px">{base_path}/{version}/api/v1/seat/{pathv1}?{query}</td>
347
+ <td style="padding:15px">Yes</td>
348
+ </tr>
349
+ <tr>
350
+ <td style="padding:15px">deleteSeatUsingDELETE(seatId, callback)</td>
351
+ <td style="padding:15px">This API is used to delete a seat. Deleting a seat will revoke all the certificates associated to the specified seat.</td>
352
+ <td style="padding:15px">{base_path}/{version}/api/v1/seat/{pathv1}?{query}</td>
353
+ <td style="padding:15px">Yes</td>
354
+ </tr>
355
+ </table>
356
+ <br>
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+
2
+ ## 0.1.1 [03-21-2023]
3
+
4
+ * Bug fixes and performance improvements
5
+
6
+ See commit 809b9ec
7
+
8
+ ---
9
+
@@ -0,0 +1,43 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing viewpoints and experiences
13
+ - Gracefully accepting constructive criticism
14
+ - Focusing on what is best for the community
15
+ - Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ - Trolling, insulting/derogatory comments, and personal or political attacks
21
+ - Public or private harassment
22
+ - Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@itential.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the <a href="http://contributor-covenant.org" target="_blank">Contributor Covenant</a>, version 1.4, available at <a href="http://contributor-covenant.org/version/1/4/" target="_blank">version</a>
@@ -0,0 +1,172 @@
1
+ # Contributing
2
+
3
+ First off, thanks for taking the time to contribute!
4
+
5
+ The following is a set of rules for contributing.
6
+
7
+ ## Code of Conduct
8
+
9
+ This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to support@itential.com.
10
+
11
+ ## How to Contribute
12
+
13
+ ### Reporting Bugs
14
+
15
+ This section guides you through submitting a bug report. Following these guidelines helps maintainers understand your report :pencil:, reproduce the behavior :computer: :left_right_arrow: :computer:, and find related reports :mag_right:.
16
+
17
+ Before creating bug reports, please check before-submitting-a-bug-report, as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. If you have an Itential support contract, please create an Itential Service Desk ticket. If you don't have an Itential support contract, please send an email of the issue to support@itential.com.
18
+
19
+ #### Before Submitting A Bug Report
20
+
21
+ * **Check the README.md.** You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem __in the latest version__.
22
+ * **Work through the troubleshooting process.** Troubleshooting will include changing the log level of Itential Automation Platform (IAP) and adapters and checking the logs to see what the issues are. These logs should be included in any ticket you open for this issue.
23
+ * **Check for resolutions to the issue.** Check the <a href="https://itential.atlassian.net/servicedesk/customer/kb/view/286883841?applicationId=605994d2-2cb2-3174-af59-ed5b23ff5fd5&spaceKey=PKB&src=1187380921" target="_blank">Itential Knowledge Base</a> to see if there is a known resolution for the issue you are having.
24
+ * **Ask around in chat if you are an Itential employee** to see if others are experiencing the same issue.
25
+
26
+ #### How to Submit a (Good) Bug Report
27
+
28
+ Bugs are tracked through the Itential Service Desk. Explain the problem and include additional details to help maintainers reproduce the problem:
29
+
30
+ - **Use a clear and descriptive title** for the issue to identify the problem.
31
+ - **Describe the exact steps which reproduce the problem** in as much detail as possible. For example, start by explaining how you configured the adapter (e.g., which properties you used and how they were set) or how you are using an artifact.
32
+ - **Provide specific examples to demonstrate the steps**. Include logs, or copy/paste snippets, in your examples.
33
+ - **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
34
+ - **Explain which behavior you expected to see instead and why.**
35
+ - **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use <a href="https://www.cockos.com/licecap/" target="_blank">this tool</a> to record GIFs on macOS and Windows. Use <a href="https://github.com/colinkeenan/silentcast" target="_blank">this tool</a> or <a href="https://github.com/rhcarvalho/byzanz-guiz" target="_blank">program</a> on Linux.
36
+ - **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
37
+
38
+ Provide more context by answering these questions:
39
+
40
+ - **Did the problem start happening recently** (e.g. after updating to a new version/tag) or was this always a problem?
41
+ - If the problem started happening recently, **can you reproduce the problem in an older version/tag?** What's the most recent version in which the problem does not happen?
42
+ - **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
43
+
44
+ Include details about your configuration and environment:
45
+
46
+ - **Which version of the adapter/artifact are you using?** You can get the exact version by checking the project version in the package.json file.
47
+ - **What's the name and version of the OS you're using**?
48
+ - **Are you running or using IAP in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and guest?
49
+ - **Are there firewalls between IAP and any other system you are integrating with?** If so, have you tried running curl from the system IAP is on to the other system to verify you have connectivity between the systems?
50
+
51
+ ### Your First Code Contribution
52
+
53
+ #### Local development
54
+
55
+ This project can be developed locally on all operating systems. For instructions on how to do this, follow the steps highlighted in the README.md. The README.mdprovides many more details on cloning the repository for local development, how to lint and test your changes.
56
+
57
+ #### Development Process
58
+
59
+ The following provides a local copy of the repository along with dependencies.
60
+
61
+ ```json
62
+ go to the repository you are interested in working on
63
+ click on the Clone button to get the link(s) you can use to clone the repository
64
+ git clone <link to clone the project>
65
+ npm install
66
+ ```
67
+
68
+ Prior to making changes you should create a branch to work in. The branch should be named with the type of change (major, minor or patch) and then a Jira issue number or a description of the issue.
69
+
70
+ ```json
71
+ git checkout -b <name_of_your_new_branch>
72
+ ```
73
+
74
+ Make all of the desired changes.
75
+
76
+ > **Note:** All code changes should be accompanied by additional Unit and Integration tests to minimize the likelihood that any changes will negatively impact the adapter/artifact as well as to ensure the desired functionality is achieved.
77
+
78
+
79
+ <table border="1" class="bordered-table">
80
+ <tr>
81
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Files</span></th>
82
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Changes</span></th>
83
+ </tr>
84
+ <tr>
85
+ <td style="padding:15px">.codeclimate.yml, .eslintignore, .eslintrc.js, .gitignore, .gitlab-ci.yml, .jshintrc, .npmignore</td>
86
+ <td style="padding:15px">These are foundational files that are used in linting and building of the adapter. Changes to these files are heavily scrutinized and may be implemented in a different manner so that the changes can be implemented across all adapters.</td>
87
+ </tr>
88
+ <tr>
89
+ <td style="padding:15px">CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, README.md</td>
90
+ <td style="padding:15px">These are license and process files for the repository. Changes to these files may require legal review and may also be implemented in a different manner so that the changes can be implemented across all adapters.</td>
91
+ </tr>
92
+ <tr>
93
+ <td style="padding:15px">utils/*, adapterBase.js</td>
94
+ <td style="padding:15px">Changes to these files will rarely be accepted. These are process files that need to be changed through the builder process and migration.</td>
95
+ </tr>
96
+ <tr>
97
+ <td style="padding:15px">adapter.js</td>
98
+ <td style="padding:15px">Changes to this file are code changes. They should be accompanied by the appropriate unit and integration tests. If new methods are added, they should also be added to the pronghorn.json file, otherwise integration tests are likely to fail.</td>
99
+ </tr>
100
+ <tr>
101
+ <td style="padding:15px">error.json, propertiesSchema.json</td>
102
+ <td style="padding:15px">These files are utilized by the Itential Runtime libraries. You can make changes to these files, but the changes should be appending of new errors or properties. Removal of errors and properties can result in rejection of the changes.</td>
103
+ </tr>
104
+ <tr>
105
+ <td style="padding:15px">pacakge.json, package-lock.json</td>
106
+ <td style="padding:15px">The package-lock.json is automatically generated and should only be updated when the dependencies inside of the package.json are modified. You can make changes to the package.json to add additional scripts, add new dependencies, modify names, etc. However, changing the scripts or dependencies that are Itential specific will be overriden during the acceptance process.</td>
107
+ </tr>
108
+ <tr>
109
+ <td style="padding:15px">pronghorn.json</td>
110
+ <td style="padding:15px">Changes to this file are made for integration into IAP. The most common change here is adding new methods that shoud be exposed to the IAP Workflow.</td>
111
+ </tr>
112
+ <tr>
113
+ <td style="padding:15px">entities/*</td>
114
+ <td style="padding:15px">Changes to these files include adding new capabilities, updating existing capabilities, or removing deprecated capabilities in the adapter. Translation configuration can also be modified here.</td>
115
+ </tr>
116
+ <tr>
117
+ <td style="padding:15px">test/*</td>
118
+ <td style="padding:15px">Changes to these files include adding, updating, or removing unit and integration tests in the adapter. Tests should never be removed unless the methods that are being tested are removed also. Both the unit and integration test file should have a marker that identifies where modification can take place. Modifications above that marker are likely to be rejected or implemented in a different manner.</td>
119
+ </tr>
120
+ </table>
121
+ <br>
122
+
123
+ > **Note:** It is a best practice to lint and test your code prior to committing changes into the repository. You can lint your code by running **npm run lint** and test it by running **node utils/testRunner.sh**. However, there are pre-commit hooks that will run these scripts when you commit your changes.
124
+
125
+ Commit the changes to the repository.
126
+
127
+ ```json
128
+ git commit -a -m "<descriptive message>"
129
+ ```
130
+
131
+ > **Note:** There are pre-commit hooks in place. If the pre-commit hooks fail, you will need to address those issues before moving forward.
132
+
133
+ Push the changes into the repository. This should only be done after the commit has successfully completed.
134
+
135
+ ```json
136
+ git push origin <name_of_your_new_branch>
137
+ ```
138
+
139
+ Create a Merge Request.
140
+
141
+ ### Merge Requests
142
+
143
+ - Fill out the provided merge request template.
144
+ - Reference related issues and merge requests liberally.
145
+ - Include screenshots and animated GIFs in your merge request whenever possible.
146
+ - Follow the project Styleguide.
147
+ - End all files with a newline.
148
+
149
+ ## Styleguide
150
+
151
+ ### Git Commit Messages
152
+
153
+ - Use the present tense ("Add feature" not "Added feature")
154
+ - Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
155
+ - Consider starting the commit message with an applicable emoji _(not required)_:
156
+ - :art: `:art:` When improving the format/structure of the code.
157
+ - :racehorse: `:racehorse:` When improving performance
158
+ - :non-potable_water: `:non-potable_water:` When plugging memory leaks.
159
+ - :memo: `:memo:` When writing documentation.
160
+ - :penguin: `:penguin:` When fixing something on Linux.
161
+ - :apple: `:apple:` When fixing something on macOS.
162
+ - :checkered_flag: `:checkered_flag:` When fixing something on Windows.
163
+ - :bug: `:bug:` When fixing a bug.
164
+ - :fire: `:fire:` When removing code or files.
165
+ - :green_heart: `:green_heart:` When fixing the CI build.
166
+ - :white_check_mark: `:white_check_mark:` When adding tests,
167
+ - :lock: `:lock:` When dealing with security.
168
+ - :arrow_up: `:arrow_up:` When upgrading dependencies.
169
+ - :arrow_down: `:arrow_down:` When downgrading dependencies.
170
+ - :shirt: `:shirt:` When removing linter warnings.
171
+
172
+ __Avoid installing unnecessary packages.__ Do not install packages just because they might be "nice to have". Itential Opensource projects are supposed to be minimal, specific, and compact by design.