@itentialopensource/adapter-sectigo_certification_manager 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 (112) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +18 -0
  3. package/.jshintrc +3 -0
  4. package/AUTH.md +45 -0
  5. package/BROKER.md +211 -0
  6. package/CALLS.md +1323 -0
  7. package/CHANGELOG.md +9 -0
  8. package/CODE_OF_CONDUCT.md +43 -0
  9. package/CONTRIBUTING.md +13 -0
  10. package/ENHANCE.md +69 -0
  11. package/LICENSE +201 -0
  12. package/PROPERTIES.md +646 -0
  13. package/README.md +343 -0
  14. package/SUMMARY.md +9 -0
  15. package/SYSTEMINFO.md +18 -0
  16. package/TAB1.md +10 -0
  17. package/TAB2.md +325 -0
  18. package/TROUBLESHOOT.md +47 -0
  19. package/adapter.js +20171 -0
  20. package/adapterBase.js +1452 -0
  21. package/entities/.generic/action.json +214 -0
  22. package/entities/.generic/schema.json +28 -0
  23. package/entities/.system/action.json +50 -0
  24. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  25. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  26. package/entities/.system/schema.json +19 -0
  27. package/entities/.system/schemaTokenReq.json +53 -0
  28. package/entities/.system/schemaTokenResp.json +53 -0
  29. package/entities/ACMEEVDetailsValidation/action.json +24 -0
  30. package/entities/ACMEEVDetailsValidation/schema.json +19 -0
  31. package/entities/Administrators/action.json +230 -0
  32. package/entities/Administrators/schema.json +29 -0
  33. package/entities/AssignmentRules/action.json +127 -0
  34. package/entities/AssignmentRules/schema.json +24 -0
  35. package/entities/AzureAccounts/action.json +67 -0
  36. package/entities/AzureAccounts/schema.json +21 -0
  37. package/entities/CertificateBuckets/action.json +207 -0
  38. package/entities/CertificateBuckets/schema.json +28 -0
  39. package/entities/ClientCertificates/action.json +270 -0
  40. package/entities/ClientCertificates/schema.json +31 -0
  41. package/entities/CustomFields/action.json +106 -0
  42. package/entities/CustomFields/schema.json +23 -0
  43. package/entities/DeviceCertificates/action.json +289 -0
  44. package/entities/DeviceCertificates/schema.json +32 -0
  45. package/entities/DomainControlValidation/action.json +265 -0
  46. package/entities/DomainControlValidation/schema.json +31 -0
  47. package/entities/Domains/action.json +206 -0
  48. package/entities/Domains/schema.json +28 -0
  49. package/entities/MSADDiscoveryTasks/action.json +126 -0
  50. package/entities/MSADDiscoveryTasks/schema.json +24 -0
  51. package/entities/MSAgents/action.json +106 -0
  52. package/entities/MSAgents/schema.json +23 -0
  53. package/entities/NetworkAgents/action.json +250 -0
  54. package/entities/NetworkAgents/schema.json +30 -0
  55. package/entities/NetworkDiscoveryTasks/action.json +126 -0
  56. package/entities/NetworkDiscoveryTasks/schema.json +24 -0
  57. package/entities/Notifications/action.json +106 -0
  58. package/entities/Notifications/schema.json +23 -0
  59. package/entities/Operations/action.json +66 -0
  60. package/entities/Operations/schema.json +21 -0
  61. package/entities/Organizations/action.json +148 -0
  62. package/entities/Organizations/schema.json +36 -0
  63. package/entities/Persons/action.json +209 -0
  64. package/entities/Persons/schema.json +28 -0
  65. package/entities/Reports/action.json +104 -0
  66. package/entities/Reports/schema.json +34 -0
  67. package/entities/SSLCertificates/action.json +370 -0
  68. package/entities/SSLCertificates/schema.json +36 -0
  69. package/entities/SectigoPublicACMEAccounts/action.json +208 -0
  70. package/entities/SectigoPublicACMEAccounts/schema.json +28 -0
  71. package/entities/SectigoPublicACMEServers/action.json +25 -0
  72. package/entities/SectigoPublicACMEServers/schema.json +19 -0
  73. package/entities/TemplateAdministrators/action.json +106 -0
  74. package/entities/TemplateAdministrators/schema.json +23 -0
  75. package/entities/UniversalACMEAccounts/action.json +147 -0
  76. package/entities/UniversalACMEAccounts/schema.json +25 -0
  77. package/error.json +190 -0
  78. package/metadata.json +81 -0
  79. package/package.json +81 -0
  80. package/pronghorn.json +11368 -0
  81. package/propertiesDecorators.json +14 -0
  82. package/propertiesSchema.json +1574 -0
  83. package/refs?service=git-upload-pack +0 -0
  84. package/report/Sectigo-Certificate-Management-OpenAPI.json +20192 -0
  85. package/report/adapterInfo.json +10 -0
  86. package/report/auto-adapter-openapi.json +8898 -0
  87. package/report/creationReport.json +1485 -0
  88. package/sampleProperties.json +265 -0
  89. package/test/integration/adapterTestBasicGet.js +83 -0
  90. package/test/integration/adapterTestConnectivity.js +118 -0
  91. package/test/integration/adapterTestIntegration.js +5256 -0
  92. package/test/unit/adapterBaseTestUnit.js +1024 -0
  93. package/test/unit/adapterTestUnit.js +7204 -0
  94. package/utils/adapterInfo.js +206 -0
  95. package/utils/addAuth.js +94 -0
  96. package/utils/artifactize.js +146 -0
  97. package/utils/basicGet.js +50 -0
  98. package/utils/checkMigrate.js +63 -0
  99. package/utils/entitiesToDB.js +179 -0
  100. package/utils/findPath.js +74 -0
  101. package/utils/methodDocumentor.js +273 -0
  102. package/utils/modify.js +152 -0
  103. package/utils/packModificationScript.js +35 -0
  104. package/utils/patches2bundledDeps.js +90 -0
  105. package/utils/pre-commit.sh +32 -0
  106. package/utils/removeHooks.js +20 -0
  107. package/utils/setup.js +33 -0
  108. package/utils/taskMover.js +309 -0
  109. package/utils/tbScript.js +239 -0
  110. package/utils/tbUtils.js +489 -0
  111. package/utils/testRunner.js +298 -0
  112. package/utils/troubleshootingAdapter.js +193 -0
package/TAB2.md ADDED
@@ -0,0 +1,325 @@
1
+ # Sectigo_certification_manager
2
+
3
+ ## Table of Contents
4
+
5
+ - [Specific Adapter Information](#specific-adapter-information)
6
+ - [Authentication](#authentication)
7
+ - [Sample Properties](#sample-properties)
8
+ - [Swagger](#swagger)
9
+ - [Generic Adapter Information](#generic-adapter-information)
10
+
11
+ ## Specific Adapter Information
12
+ ### Authentication
13
+
14
+ This document will go through the steps for authenticating the Sectigo Certification Manager adapter with Personal Access Token authentication. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
15
+
16
+ Companies periodically change authentication methods to provide better security. As this happens this section should be updated and contributed/merge back into the adapter repository.
17
+
18
+ #### Static Token/Header Authentication
19
+ The Sectigo Certification Manager adapter authenticates using a Several static pieces of information in headers.
20
+
21
+ STEPS
22
+ 1. Ensure you have access to a Sectigo Certification Manager server and that it is running
23
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
24
+ 3. Use the properties below for the ```properties.authentication``` field
25
+ ```json
26
+ "authentication": {
27
+ "auth_method": "static_token",
28
+ "username": "<your_login>",
29
+ "password": "<your_password>",
30
+ "token": "<your_customerUri>",
31
+ "auth_field": [
32
+ "header.headers.login",
33
+ "header.headers.password",
34
+ "header.headers.customerUri"
35
+ ],
36
+ "auth_field_format": [
37
+ "{username}",
38
+ "{password}",
39
+ "{token}"
40
+ ],
41
+ "auth_logging": false
42
+ }
43
+ ```
44
+ you can leave all of the other properties in the authentication section, they will not be used when the auth_method is static_token.
45
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
46
+
47
+ #### Troubleshooting
48
+ - Make sure you copied over the correct token.
49
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
50
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
51
+ - Investigate the logs - in particular:
52
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
53
+ - The FULL BODY log to make sure the payload is accurate.
54
+ - The CALL RETURN log to see what the other system is telling us.
55
+ - Credentials should be ** masked ** by the adapter so make sure you verify token
56
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
57
+
58
+ ### Sample Properties
59
+
60
+ Sample Properties can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
61
+
62
+ ```json
63
+ "properties": {
64
+ "host": "localhost",
65
+ "port": 443,
66
+ "choosepath": "",
67
+ "base_path": "/",
68
+ "version": "",
69
+ "cache_location": "none",
70
+ "encode_pathvars": true,
71
+ "encode_queryvars": true,
72
+ "save_metric": false,
73
+ "stub": true,
74
+ "protocol": "https",
75
+ "authentication": {
76
+ "auth_method": "static_token",
77
+ "username": "username",
78
+ "password": "password",
79
+ "token": "token",
80
+ "token_timeout": 600000,
81
+ "token_cache": "local",
82
+ "invalid_token_error": 401,
83
+ "auth_field": [
84
+ "header.headers.login",
85
+ "header.headers.password",
86
+ "header.headers.customerUri"
87
+ ],
88
+ "auth_field_format": [
89
+ "{username}",
90
+ "{password}",
91
+ "{token}"
92
+ ],
93
+ "auth_logging": false,
94
+ "client_id": "",
95
+ "client_secret": "",
96
+ "grant_type": "",
97
+ "sensitive": [],
98
+ "multiStepAuthCalls": [
99
+ {
100
+ "name": "",
101
+ "requestFields": {},
102
+ "responseFields": {},
103
+ "successfullResponseCode": 200
104
+ }
105
+ ],
106
+ "sso": {
107
+ "protocol": "",
108
+ "host": "",
109
+ "port": 0
110
+ }
111
+ },
112
+ "healthcheck": {
113
+ "type": "none",
114
+ "frequency": 60000,
115
+ "query_object": {},
116
+ "addlHeaders": {}
117
+ },
118
+ "throttle": {
119
+ "throttle_enabled": false,
120
+ "number_pronghorns": 1,
121
+ "sync_async": "sync",
122
+ "max_in_queue": 1000,
123
+ "concurrent_max": 1,
124
+ "expire_timeout": 0,
125
+ "avg_runtime": 200,
126
+ "priorities": [
127
+ {
128
+ "value": 0,
129
+ "percent": 100
130
+ }
131
+ ]
132
+ },
133
+ "request": {
134
+ "number_redirects": 0,
135
+ "number_retries": 3,
136
+ "limit_retry_error": [
137
+ 0
138
+ ],
139
+ "failover_codes": [],
140
+ "attempt_timeout": 5000,
141
+ "global_request": {
142
+ "payload": {},
143
+ "uriOptions": {},
144
+ "addlHeaders": {},
145
+ "authData": {}
146
+ },
147
+ "healthcheck_on_timeout": true,
148
+ "return_raw": false,
149
+ "archiving": false,
150
+ "return_request": false
151
+ },
152
+ "proxy": {
153
+ "enabled": false,
154
+ "host": "",
155
+ "port": 1,
156
+ "protocol": "http",
157
+ "username": "",
158
+ "password": ""
159
+ },
160
+ "ssl": {
161
+ "ecdhCurve": "",
162
+ "enabled": false,
163
+ "accept_invalid_cert": false,
164
+ "ca_file": "",
165
+ "key_file": "",
166
+ "cert_file": "",
167
+ "secure_protocol": "",
168
+ "ciphers": ""
169
+ },
170
+ "mongo": {
171
+ "host": "",
172
+ "port": 0,
173
+ "database": "",
174
+ "username": "",
175
+ "password": "",
176
+ "replSet": "",
177
+ "db_ssl": {
178
+ "enabled": false,
179
+ "accept_invalid_cert": false,
180
+ "ca_file": "",
181
+ "key_file": "",
182
+ "cert_file": ""
183
+ }
184
+ },
185
+ "devicebroker": {
186
+ "enabled": false,
187
+ "getDevice": [
188
+ {
189
+ "path": "/get/devices/{id}",
190
+ "method": "GET",
191
+ "query": {},
192
+ "body": {},
193
+ "headers": {},
194
+ "handleFailure": "fail",
195
+ "requestFields": {
196
+ "id": "name"
197
+ },
198
+ "responseDatakey": "",
199
+ "responseFields": {
200
+ "name": "host",
201
+ "ostype": "os",
202
+ "ostypePrefix": "system-",
203
+ "ipaddress": "attributes.ipaddr",
204
+ "port": "443"
205
+ }
206
+ }
207
+ ],
208
+ "getDevicesFiltered": [
209
+ {
210
+ "path": "/get/devices",
211
+ "method": "GET",
212
+ "pagination": {
213
+ "offsetVar": "",
214
+ "limitVar": "",
215
+ "incrementBy": "limit",
216
+ "requestLocation": "query"
217
+ },
218
+ "query": {},
219
+ "body": {},
220
+ "headers": {},
221
+ "handleFailure": "fail",
222
+ "requestFields": {},
223
+ "responseDatakey": "",
224
+ "responseFields": {
225
+ "name": "host",
226
+ "ostype": "os",
227
+ "ostypePrefix": "system-",
228
+ "ipaddress": "attributes.ipaddr",
229
+ "port": "443"
230
+ }
231
+ }
232
+ ],
233
+ "isAlive": [
234
+ {
235
+ "path": "/get/devices/{id}/status",
236
+ "method": "GET",
237
+ "query": {},
238
+ "body": {},
239
+ "headers": {},
240
+ "handleFailure": "fail",
241
+ "requestFields": {
242
+ "id": "name"
243
+ },
244
+ "responseDatakey": "",
245
+ "responseFields": {
246
+ "status": "status",
247
+ "statusValue": "online"
248
+ }
249
+ }
250
+ ],
251
+ "getConfig": [
252
+ {
253
+ "path": "/get/devices/{id}/configPart1",
254
+ "method": "GET",
255
+ "query": {},
256
+ "body": {},
257
+ "headers": {},
258
+ "handleFailure": "fail",
259
+ "requestFields": {
260
+ "id": "name"
261
+ },
262
+ "responseDatakey": "",
263
+ "responseFields": {}
264
+ }
265
+ ],
266
+ "getCount": [
267
+ {
268
+ "path": "/get/devices",
269
+ "method": "GET",
270
+ "query": {},
271
+ "body": {},
272
+ "headers": {},
273
+ "handleFailure": "fail",
274
+ "requestFields": {},
275
+ "responseDatakey": "",
276
+ "responseFields": {}
277
+ }
278
+ ]
279
+ },
280
+ "cache": {
281
+ "enabled": false,
282
+ "entities": [
283
+ {
284
+ "entityType": "",
285
+ "frequency": 1440,
286
+ "flushOnFail": false,
287
+ "limit": 1000,
288
+ "retryAttempts": 5,
289
+ "sort": true,
290
+ "populate": [
291
+ {
292
+ "path": "",
293
+ "method": "GET",
294
+ "pagination": {
295
+ "offsetVar": "",
296
+ "limitVar": "",
297
+ "incrementBy": "limit",
298
+ "requestLocation": "query"
299
+ },
300
+ "query": {},
301
+ "body": {},
302
+ "headers": {},
303
+ "handleFailure": "ignore",
304
+ "requestFields": {},
305
+ "responseDatakey": "",
306
+ "responseFields": {}
307
+ }
308
+ ],
309
+ "cachedTasks": [
310
+ {
311
+ "name": "",
312
+ "filterField": "",
313
+ "filterLoc": ""
314
+ }
315
+ ]
316
+ }
317
+ ]
318
+ }
319
+ }
320
+ ```
321
+ ### Swagger
322
+
323
+ Note: The content for this section may be missing as its corresponding .json file is unavailable. This sections will be updated once adapter-openapi.json file is added.
324
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/adapter-sectigo_certification_manager/-/blob/master/README.md)
325
+
@@ -0,0 +1,47 @@
1
+ ## Troubleshoot
2
+
3
+ Run `npm run troubleshoot` to start the interactive troubleshooting process. The command allows you to verify and update connection, authentication as well as healthcheck configuration. After that it will test these properties by sending HTTP request to the endpoint. If the tests pass, it will persist these changes into IAP.
4
+
5
+ You also have the option to run individual commands to perform specific test:
6
+
7
+ - `npm run healthcheck` will perform a healthcheck request of with current setting.
8
+ - `npm run basicget` will perform some non-parameter GET request with current setting.
9
+ - `npm run connectivity` will perform networking diagnostics of the adatper endpoint.
10
+
11
+ ### Connectivity Issues
12
+
13
+ 1. You can run the adapter troubleshooting script which will check connectivity, run the healthcheck and run basic get calls.
14
+
15
+ ```bash
16
+ npm run troubleshoot
17
+ ```
18
+
19
+ 2. Verify the adapter properties are set up correctly.
20
+
21
+ ```text
22
+ Go into the Itential Platform GUI and verify/update the properties
23
+ ```
24
+
25
+ 3. Verify there is connectivity between the Itential Platform Server and Sectigo_certification_manager Server.
26
+
27
+ ```text
28
+ ping the ip address of Sectigo_certification_manager server
29
+ try telnet to the ip address port of Sectigo_certification_manager
30
+ execute a curl command to the other system
31
+ ```
32
+
33
+ 4. Verify the credentials provided for Sectigo_certification_manager.
34
+
35
+ ```text
36
+ login to Sectigo_certification_manager using the provided credentials
37
+ ```
38
+
39
+ 5. Verify the API of the call utilized for Sectigo_certification_manager Healthcheck.
40
+
41
+ ```text
42
+ Go into the Itential Platform GUI and verify/update the properties
43
+ ```
44
+
45
+ ### Functional Issues
46
+
47
+ Adapter logs are located in `/var/log/pronghorn`. In older releases of the Itential Platform, there is a `pronghorn.log` file which contains logs for all of the Itential Platform. In newer versions, adapters can be configured to log into their own files.