@itentialopensource/adapter-aruba_airwave 0.3.3 → 0.4.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.
package/TAB2.md ADDED
@@ -0,0 +1,334 @@
1
+ # Aruba AirWave
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 Aruba AirWave adapter with Dynamic 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
+ #### Dynamic Token Authentication
19
+ The Aruba AirWave adapter requires Dynamic Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
20
+
21
+ STEPS
22
+ 1. Ensure you have access to a Aruba AirWave 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": "request_token",
28
+ "username": "<username>",
29
+ "password": "<password>",
30
+ "token_timeout": 1800000,
31
+ "token_cache": "local",
32
+ "invalid_token_error": 401,
33
+ "auth_field": [
34
+ "header.headers.X-BISCOTTI",
35
+ "header.headers.Cookie"
36
+ ],
37
+ "auth_field_format": [
38
+ "{token}",
39
+ "MercuryAuthHandlerCookie_AMPAuth={tokenp2}"
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 for dynamic token authentication.
45
+
46
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
47
+
48
+ #### Troubleshooting
49
+ - Make sure you copied over the correct username and password.
50
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
51
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
52
+ - Investigate the logs - in particular:
53
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
54
+ - The FULL BODY log to make sure the payload is accurate.
55
+ - The CALL RETURN log to see what the other system is telling us.
56
+ - Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
57
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
58
+
59
+ ### Sample Properties
60
+
61
+ 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.
62
+
63
+ ```json
64
+ "properties": {
65
+ "host": "localhost",
66
+ "port": 443,
67
+ "choosepath": "",
68
+ "base_path": "/",
69
+ "version": "",
70
+ "cache_location": "none",
71
+ "encode_pathvars": true,
72
+ "encode_queryvars": true,
73
+ "save_metric": true,
74
+ "stub": true,
75
+ "protocol": "https",
76
+ "authentication": {
77
+ "auth_method": "request_token",
78
+ "username": "username",
79
+ "password": "password",
80
+ "token": "token",
81
+ "token_timeout": 600000,
82
+ "token_cache": "local",
83
+ "invalid_token_error": 401,
84
+ "auth_field": [
85
+ "header.headers.X-BISCOTTI",
86
+ "header.headers.Cookie"
87
+ ],
88
+ "auth_field_format": [
89
+ "{token}",
90
+ "MercuryAuthHandlerCookie_AMPAuth={tokenp2}"
91
+ ],
92
+ "auth_logging": false,
93
+ "client_id": "",
94
+ "client_secret": "",
95
+ "grant_type": "",
96
+ "sensitive": [],
97
+ "sso": {
98
+ "protocol": "",
99
+ "host": "",
100
+ "port": 0
101
+ },
102
+ "multiStepAuthCalls": [
103
+ {
104
+ "name": "",
105
+ "requestFields": {},
106
+ "responseFields": {},
107
+ "successfullResponseCode": 200
108
+ }
109
+ ]
110
+ },
111
+ "healthcheck": {
112
+ "type": "none",
113
+ "frequency": 60000,
114
+ "query_object": {},
115
+ "addlHeaders": {}
116
+ },
117
+ "throttle": {
118
+ "throttle_enabled": false,
119
+ "number_pronghorns": 1,
120
+ "sync_async": "sync",
121
+ "max_in_queue": 1000,
122
+ "concurrent_max": 1,
123
+ "expire_timeout": 0,
124
+ "avg_runtime": 200,
125
+ "priorities": [
126
+ {
127
+ "value": 0,
128
+ "percent": 100
129
+ }
130
+ ]
131
+ },
132
+ "request": {
133
+ "number_redirects": 0,
134
+ "number_retries": 3,
135
+ "limit_retry_error": [
136
+ 0
137
+ ],
138
+ "failover_codes": [],
139
+ "attempt_timeout": 5000,
140
+ "global_request": {
141
+ "payload": {},
142
+ "uriOptions": {},
143
+ "addlHeaders": {},
144
+ "authData": {}
145
+ },
146
+ "healthcheck_on_timeout": true,
147
+ "return_raw": false,
148
+ "archiving": false,
149
+ "return_request": false
150
+ },
151
+ "proxy": {
152
+ "enabled": false,
153
+ "host": "",
154
+ "port": 1,
155
+ "protocol": "http",
156
+ "username": "",
157
+ "password": ""
158
+ },
159
+ "ssl": {
160
+ "ecdhCurve": "",
161
+ "enabled": false,
162
+ "accept_invalid_cert": false,
163
+ "ca_file": "",
164
+ "key_file": "",
165
+ "cert_file": "",
166
+ "secure_protocol": "",
167
+ "ciphers": ""
168
+ },
169
+ "mongo": {
170
+ "host": "",
171
+ "port": 0,
172
+ "database": "",
173
+ "username": "",
174
+ "password": "",
175
+ "replSet": "",
176
+ "db_ssl": {
177
+ "enabled": false,
178
+ "accept_invalid_cert": false,
179
+ "ca_file": "",
180
+ "key_file": "",
181
+ "cert_file": ""
182
+ }
183
+ },
184
+ "devicebroker": {
185
+ "enabled": false,
186
+ "getDevice": [
187
+ {
188
+ "path": "/not/mapped",
189
+ "method": "GET",
190
+ "query": {},
191
+ "body": {},
192
+ "headers": {},
193
+ "handleFailure": "ignore",
194
+ "requestFields": {
195
+ "insample": "{port}"
196
+ },
197
+ "responseDatakey": "",
198
+ "responseFields": {
199
+ "name": "{this}{||}{that}",
200
+ "ostype": "{osfield}",
201
+ "ostypePrefix": "meraki-",
202
+ "port": "{port}",
203
+ "ipaddress": "{ip_addr}",
204
+ "serial": "{serial}"
205
+ }
206
+ }
207
+ ],
208
+ "getDevicesFiltered": [
209
+ {
210
+ "path": "/not/mapped",
211
+ "method": "GET",
212
+ "pagination": {
213
+ "offsetVar": "",
214
+ "limitVar": "",
215
+ "incrementBy": "limit",
216
+ "requestLocation": "query"
217
+ },
218
+ "query": {},
219
+ "body": {},
220
+ "headers": {},
221
+ "handleFailure": "ignore",
222
+ "requestFields": {},
223
+ "responseDatakey": "",
224
+ "responseFields": {
225
+ "name": "{this}{||}{that}",
226
+ "ostype": "{osfield}",
227
+ "ostypePrefix": "meraki-",
228
+ "port": "{port}",
229
+ "ipaddress": "{ip_addr}",
230
+ "serial": "{serial}",
231
+ "id": "{myid}"
232
+ }
233
+ }
234
+ ],
235
+ "isAlive": [
236
+ {
237
+ "path": "/not/mapped/{devID}",
238
+ "method": "GET",
239
+ "query": {},
240
+ "body": {},
241
+ "headers": {},
242
+ "handleFailure": "ignore",
243
+ "requestFields": {
244
+ "devID": "{id}"
245
+ },
246
+ "responseDatakey": "",
247
+ "responseFields": {
248
+ "status": "return2xx",
249
+ "statusValue": "AD.200"
250
+ }
251
+ }
252
+ ],
253
+ "getConfig": [
254
+ {
255
+ "path": "/not/mapped/{devID}",
256
+ "method": "GET",
257
+ "query": {},
258
+ "body": {},
259
+ "headers": {},
260
+ "handleFailure": "ignore",
261
+ "requestFields": {
262
+ "devID": "{id}"
263
+ },
264
+ "responseDatakey": "",
265
+ "responseFields": {}
266
+ }
267
+ ],
268
+ "getCount": [
269
+ {
270
+ "path": "/not/mapped",
271
+ "method": "GET",
272
+ "query": {},
273
+ "body": {},
274
+ "headers": {},
275
+ "handleFailure": "ignore",
276
+ "requestFields": {},
277
+ "responseDatakey": "",
278
+ "responseFields": {}
279
+ }
280
+ ]
281
+ },
282
+ "cache": {
283
+ "enabled": false,
284
+ "entities": [
285
+ {
286
+ "entityType": "device",
287
+ "frequency": 3600,
288
+ "flushOnFail": false,
289
+ "limit": 10000,
290
+ "retryAttempts": 5,
291
+ "sort": true,
292
+ "populate": [
293
+ {
294
+ "path": "/not/mapped",
295
+ "method": "GET",
296
+ "pagination": {
297
+ "offsetVar": "",
298
+ "limitVar": "",
299
+ "incrementBy": "limit",
300
+ "requestLocation": "query"
301
+ },
302
+ "query": {},
303
+ "body": {},
304
+ "headers": {},
305
+ "handleFailure": "ignore",
306
+ "requestFields": {},
307
+ "responseDatakey": "",
308
+ "responseFields": {
309
+ "name": "{this}{||}{that}",
310
+ "ostype": "{osfield}",
311
+ "ostypePrefix": "meraki-",
312
+ "port": "{port}",
313
+ "ipaddress": "{ip_addr}",
314
+ "serial": "{serial}",
315
+ "id": "{myid}"
316
+ }
317
+ }
318
+ ],
319
+ "cachedTasks": [
320
+ {
321
+ "name": "",
322
+ "filterField": "",
323
+ "filterLoc": ""
324
+ }
325
+ ]
326
+ }
327
+ ]
328
+ }
329
+ }
330
+ ```
331
+ ### [Swagger](https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-aruba_airwave/-/blob/master/report/adapter-openapi.json)
332
+
333
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-aruba_airwave/-/blob/master/README.md)
334
+
package/metadata.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "adapter-aruba_airwave",
3
- "webName": "Adapter for Integration to Aruba Airwave",
3
+ "webName": "Adapter for Integration to Aruba AirWave",
4
4
  "vendor": "Aruba Networks",
5
- "product": "Airwave",
5
+ "product": "AirWave",
6
6
  "osVersion": [],
7
7
  "apiVersions": [],
8
8
  "iapVersions": [
@@ -39,20 +39,41 @@
39
39
  "isDeprecated": false
40
40
  },
41
41
  "brokerSince": "",
42
+ "authMethods": [
43
+ {
44
+ "type": "Complex",
45
+ "subtypes": [
46
+ "Cookie",
47
+ "Token"
48
+ ],
49
+ "primary": true
50
+ }
51
+ ],
42
52
  "documentation": {
43
53
  "storeLink": "",
44
54
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-aruba_airwave",
45
- "repoLink": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-aruba_airwave",
55
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-aruba_airwave",
46
56
  "docLink": "https://docs.itential.com/opensource/docs/aruba-airwave",
47
57
  "demoLinks": [],
48
- "trainingLinks": [],
58
+ "trainingLinks": [
59
+ {
60
+ "title": "Itential Academy",
61
+ "link": "https://www.itential.com/itential-academy/"
62
+ }
63
+ ],
49
64
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
50
65
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
51
66
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
52
67
  "webLink": "https://www.itential.com/adapters/aruba-airwave/",
53
- "vendorLink": "",
54
- "productLink": "",
55
- "apiLinks": []
68
+ "vendorLink": "https://www.arubanetworks.com/",
69
+ "productLink": "https://www.arubanetworks.com/products/network-management-operations/airwave/",
70
+ "apiLinks": [
71
+ {
72
+ "title": "AirWave API Guide",
73
+ "link": "https://www.arubanetworks.com/techdocs/AirWave/82130/Content/API%20Guide/API%20Guide.htm",
74
+ "public": true
75
+ }
76
+ ]
56
77
  },
57
78
  "assets": [],
58
79
  "relatedItems": {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-aruba_airwave",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "This adapter integrates with system described as: Aruba Airwave",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.14",
7
+ "engineVersion": "1.67.19",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -15,7 +15,6 @@
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
16
16
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
17
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
18
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
19
18
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
20
19
  "adapter:install": "npm i && node utils/tbScript.js install",
21
20
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -44,20 +43,20 @@
44
43
  ],
45
44
  "license": "Apache-2.0",
46
45
  "engines": {
47
- "node": ">= 8.0.0",
46
+ "node": ">= 14.0.0",
48
47
  "npm": ">= 6.0.0"
49
48
  },
50
49
  "repository": {
51
50
  "type": "git",
52
- "url": "git@gitlab.com:itentialopensource/adapters/controller-orchestrator/adapter-aruba_airwave.git"
51
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-aruba_airwave.git"
53
52
  },
54
53
  "author": "Itential",
55
- "homepage": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-aruba_airwave#readme",
54
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-aruba_airwave#readme",
56
55
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^5.3.8",
56
+ "@itentialopensource/adapter-utils": "^5.3.10",
58
57
  "acorn": "^8.10.0",
59
58
  "ajv": "^8.12.0",
60
- "axios": "^1.6.7",
59
+ "axios": "^1.6.8",
61
60
  "commander": "^11.0.0",
62
61
  "dns-lookup-promise": "^1.0.4",
63
62
  "fs-extra": "^11.1.1",
@@ -65,7 +64,6 @@
65
64
  "mocha": "^10.3.0",
66
65
  "mocha-param": "^2.0.1",
67
66
  "mongodb": "^4.16.0",
68
- "nyc": "^15.1.0",
69
67
  "ping": "^0.4.4",
70
68
  "prompts": "^2.4.2",
71
69
  "readline-sync": "^1.4.10",
@@ -945,6 +945,11 @@
945
945
  "devicebroker": {
946
946
  "type": "object",
947
947
  "properties": {
948
+ "enabled": {
949
+ "type": "boolean",
950
+ "description": "Whether or not the device broker calls have been mapped",
951
+ "default": false
952
+ },
948
953
  "getDevice": {
949
954
  "type": "array",
950
955
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.1",
3
- "configLines": 4215,
2
+ "version": "0.3.4",
3
+ "configLines": 4220,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 4651,
6
- "testLines": 4610,
6
+ "testLines": 4609,
7
7
  "testCases": 221,
8
- "totalCodeLines": 11044,
8
+ "totalCodeLines": 11043,
9
9
  "wfTasks": 55
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 16
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.3.10"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 647
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 2171
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 115
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 1186
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 36
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 4810
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 151
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }