@itentialopensource/adapter-zscaler 0.9.0 → 0.10.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.
- package/AUTH.md +19 -16
- package/BROKER.md +31 -19
- package/CALLS.md +57 -20
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +18 -6
- package/TAB1.md +8 -0
- package/TAB2.md +86 -1495
- package/adapter.js +235 -2378
- package/metadata.json +29 -7
- package/package.json +5 -7
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +5 -5
- package/report/updateReport1715610332922.json +120 -0
- package/sampleProperties.json +40 -28
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +0 -2
package/metadata.json
CHANGED
|
@@ -36,20 +36,42 @@
|
|
|
36
36
|
"isDeprecated": false
|
|
37
37
|
},
|
|
38
38
|
"brokerSince": "",
|
|
39
|
+
"authMethods": [
|
|
40
|
+
{
|
|
41
|
+
"type": "Cookie",
|
|
42
|
+
"primary": true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
39
45
|
"documentation": {
|
|
40
46
|
"storeLink": "",
|
|
41
47
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-zscaler",
|
|
42
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/
|
|
48
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-zscaler",
|
|
43
49
|
"docLink": "https://docs.itential.com/opensource/docs/zscaler",
|
|
44
|
-
"demoLinks": [
|
|
45
|
-
|
|
50
|
+
"demoLinks": [
|
|
51
|
+
{
|
|
52
|
+
"title": "SD-WAN & Multi-Cloud Network Automation with Itential (ONUG)",
|
|
53
|
+
"link": "https://www.itential.com/resource/demo/onug-spring-2019-poc-sd-wan-2-0-multi-cloud-network-automation/"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"trainingLinks": [
|
|
57
|
+
{
|
|
58
|
+
"title": "Itential Academy",
|
|
59
|
+
"link": "https://www.itential.com/itential-academy/"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
46
62
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
47
63
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
48
64
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
49
65
|
"webLink": "https://www.itential.com/adapters/zscaler/",
|
|
50
|
-
"vendorLink": "",
|
|
51
|
-
"productLink": "",
|
|
52
|
-
"apiLinks": [
|
|
66
|
+
"vendorLink": "https://www.zscaler.com/",
|
|
67
|
+
"productLink": "https://www.zscaler.com/products/zscaler-internet-access",
|
|
68
|
+
"apiLinks": [
|
|
69
|
+
{
|
|
70
|
+
"title": "Zscaler Internet Access (ZIA)",
|
|
71
|
+
"link": "https://help.zscaler.com/zia",
|
|
72
|
+
"public": true
|
|
73
|
+
}
|
|
74
|
+
]
|
|
53
75
|
},
|
|
54
76
|
"assets": [],
|
|
55
77
|
"relatedItems": {
|
|
@@ -60,4 +82,4 @@
|
|
|
60
82
|
"transformationProjects": [],
|
|
61
83
|
"exampleProjects": []
|
|
62
84
|
}
|
|
63
|
-
}
|
|
85
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-zscaler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "This adapter integrates with system Zscaler",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.67.
|
|
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",
|
|
@@ -43,15 +42,15 @@
|
|
|
43
42
|
],
|
|
44
43
|
"license": "Apache-2.0",
|
|
45
44
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
45
|
+
"node": ">= 14.0.0",
|
|
47
46
|
"npm": ">= 6.0.0"
|
|
48
47
|
},
|
|
49
48
|
"repository": {
|
|
50
49
|
"type": "git",
|
|
51
|
-
"url": "git@gitlab.com:itentialopensource/adapters/
|
|
50
|
+
"url": "git@gitlab.com:itentialopensource/adapters/adapter-zscaler.git"
|
|
52
51
|
},
|
|
53
52
|
"author": "Itential",
|
|
54
|
-
"homepage": "https://gitlab.com/itentialopensource/adapters/
|
|
53
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-zscaler#readme",
|
|
55
54
|
"dependencies": {
|
|
56
55
|
"@itentialopensource/adapter-utils": "^5.3.10",
|
|
57
56
|
"acorn": "^8.10.0",
|
|
@@ -64,7 +63,6 @@
|
|
|
64
63
|
"mocha": "^10.3.0",
|
|
65
64
|
"mocha-param": "^2.0.1",
|
|
66
65
|
"mongodb": "^4.16.0",
|
|
67
|
-
"nyc": "^15.1.0",
|
|
68
66
|
"ping": "^0.4.4",
|
|
69
67
|
"prompts": "^2.4.2",
|
|
70
68
|
"readline-sync": "^1.4.10",
|
package/propertiesSchema.json
CHANGED
|
@@ -950,6 +950,11 @@
|
|
|
950
950
|
"devicebroker": {
|
|
951
951
|
"type": "object",
|
|
952
952
|
"properties": {
|
|
953
|
+
"enabled": {
|
|
954
|
+
"type": "boolean",
|
|
955
|
+
"description": "Whether or not the device broker calls have been mapped",
|
|
956
|
+
"default": false
|
|
957
|
+
},
|
|
953
958
|
"getDevice": {
|
|
954
959
|
"type": "array",
|
|
955
960
|
"description": "Broker call(s) to getDevice",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.10.0",
|
|
3
|
+
"configLines": 22098,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
5
|
+
"codeLines": 20937,
|
|
6
|
+
"testLines": 14658,
|
|
7
7
|
"testCases": 746,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 37378,
|
|
9
9
|
"wfTasks": 268
|
|
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": 79
|
|
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": 6344
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 424
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 7062
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 252
|
|
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": 14859
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 676
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"stub": true,
|
|
15
15
|
"protocol": "https",
|
|
16
16
|
"authentication": {
|
|
17
|
-
"auth_method": "
|
|
17
|
+
"auth_method": "request_token",
|
|
18
18
|
"username": "exampleUsername",
|
|
19
19
|
"password": "examplePassword",
|
|
20
20
|
"apiKey": "exampleApiKey",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"token_timeout": 180000,
|
|
23
23
|
"token_cache": "local",
|
|
24
24
|
"invalid_token_error": 401,
|
|
25
|
-
"auth_field": "header.headers.
|
|
26
|
-
"auth_field_format": "
|
|
25
|
+
"auth_field": "header.headers.Cookie",
|
|
26
|
+
"auth_field_format": "JSESSIONID={token}",
|
|
27
27
|
"auth_logging": false,
|
|
28
28
|
"client_id": "",
|
|
29
29
|
"client_secret": "",
|
|
@@ -115,30 +115,32 @@
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"devicebroker": {
|
|
118
|
+
"enabled": false,
|
|
118
119
|
"getDevice": [
|
|
119
120
|
{
|
|
120
|
-
"path": "/
|
|
121
|
+
"path": "/not/mapped",
|
|
121
122
|
"method": "GET",
|
|
122
123
|
"query": {},
|
|
123
124
|
"body": {},
|
|
124
125
|
"headers": {},
|
|
125
126
|
"handleFailure": "ignore",
|
|
126
127
|
"requestFields": {
|
|
127
|
-
"
|
|
128
|
+
"insample": "{port}"
|
|
128
129
|
},
|
|
129
130
|
"responseDatakey": "",
|
|
130
131
|
"responseFields": {
|
|
131
|
-
"name": "
|
|
132
|
-
"ostype": "
|
|
133
|
-
"ostypePrefix": "
|
|
134
|
-
"
|
|
135
|
-
"
|
|
132
|
+
"name": "{this}{||}{that}",
|
|
133
|
+
"ostype": "{osfield}",
|
|
134
|
+
"ostypePrefix": "meraki-",
|
|
135
|
+
"port": "{port}",
|
|
136
|
+
"ipaddress": "{ip_addr}",
|
|
137
|
+
"serial" : "{serial}"
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
140
|
],
|
|
139
141
|
"getDevicesFiltered": [
|
|
140
142
|
{
|
|
141
|
-
"path": "/
|
|
143
|
+
"path": "/not/mapped",
|
|
142
144
|
"method": "GET",
|
|
143
145
|
"pagination": {
|
|
144
146
|
"offsetVar": "",
|
|
@@ -153,42 +155,44 @@
|
|
|
153
155
|
"requestFields": {},
|
|
154
156
|
"responseDatakey": "",
|
|
155
157
|
"responseFields": {
|
|
156
|
-
"name": "
|
|
157
|
-
"ostype": "
|
|
158
|
-
"ostypePrefix": "
|
|
159
|
-
"
|
|
160
|
-
"
|
|
158
|
+
"name": "{this}{||}{that}",
|
|
159
|
+
"ostype": "{osfield}",
|
|
160
|
+
"ostypePrefix": "meraki-",
|
|
161
|
+
"port": "{port}",
|
|
162
|
+
"ipaddress": "{ip_addr}",
|
|
163
|
+
"serial" : "{serial}",
|
|
164
|
+
"id": "{myid}"
|
|
161
165
|
}
|
|
162
166
|
}
|
|
163
167
|
],
|
|
164
168
|
"isAlive": [
|
|
165
169
|
{
|
|
166
|
-
"path": "/
|
|
170
|
+
"path": "/not/mapped/{devID}",
|
|
167
171
|
"method": "GET",
|
|
168
172
|
"query": {},
|
|
169
173
|
"body": {},
|
|
170
174
|
"headers": {},
|
|
171
175
|
"handleFailure": "ignore",
|
|
172
176
|
"requestFields": {
|
|
173
|
-
"
|
|
177
|
+
"devID": "{id}"
|
|
174
178
|
},
|
|
175
179
|
"responseDatakey": "",
|
|
176
180
|
"responseFields": {
|
|
177
|
-
"status": "
|
|
178
|
-
"statusValue": "
|
|
181
|
+
"status": "return2xx",
|
|
182
|
+
"statusValue": "AD.200"
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
185
|
],
|
|
182
186
|
"getConfig": [
|
|
183
187
|
{
|
|
184
|
-
"path": "/
|
|
188
|
+
"path": "/not/mapped/{devID}",
|
|
185
189
|
"method": "GET",
|
|
186
190
|
"query": {},
|
|
187
191
|
"body": {},
|
|
188
192
|
"headers": {},
|
|
189
193
|
"handleFailure": "ignore",
|
|
190
194
|
"requestFields": {
|
|
191
|
-
"
|
|
195
|
+
"devID": "{id}"
|
|
192
196
|
},
|
|
193
197
|
"responseDatakey": "",
|
|
194
198
|
"responseFields": {}
|
|
@@ -196,7 +200,7 @@
|
|
|
196
200
|
],
|
|
197
201
|
"getCount": [
|
|
198
202
|
{
|
|
199
|
-
"path": "/
|
|
203
|
+
"path": "/not/mapped",
|
|
200
204
|
"method": "GET",
|
|
201
205
|
"query": {},
|
|
202
206
|
"body": {},
|
|
@@ -212,15 +216,15 @@
|
|
|
212
216
|
"enabled": false,
|
|
213
217
|
"entities": [
|
|
214
218
|
{
|
|
215
|
-
"entityType": "",
|
|
216
|
-
"frequency":
|
|
219
|
+
"entityType": "device",
|
|
220
|
+
"frequency": 3600,
|
|
217
221
|
"flushOnFail": false,
|
|
218
|
-
"limit":
|
|
222
|
+
"limit": 10000,
|
|
219
223
|
"retryAttempts": 5,
|
|
220
224
|
"sort": true,
|
|
221
225
|
"populate": [
|
|
222
226
|
{
|
|
223
|
-
"path": "",
|
|
227
|
+
"path": "/not/mapped",
|
|
224
228
|
"method": "GET",
|
|
225
229
|
"pagination": {
|
|
226
230
|
"offsetVar": "",
|
|
@@ -234,7 +238,15 @@
|
|
|
234
238
|
"handleFailure": "ignore",
|
|
235
239
|
"requestFields": {},
|
|
236
240
|
"responseDatakey": "",
|
|
237
|
-
"responseFields": {
|
|
241
|
+
"responseFields": {
|
|
242
|
+
"name": "{this}{||}{that}",
|
|
243
|
+
"ostype": "{osfield}",
|
|
244
|
+
"ostypePrefix": "meraki-",
|
|
245
|
+
"port": "{port}",
|
|
246
|
+
"ipaddress": "{ip_addr}",
|
|
247
|
+
"serial" : "{serial}",
|
|
248
|
+
"id": "{myid}"
|
|
249
|
+
}
|
|
238
250
|
}
|
|
239
251
|
],
|
|
240
252
|
"cachedTasks": [
|
|
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
|
|
|
46
46
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
47
|
samProps.request.attempt_timeout = 30000;
|
|
48
48
|
}
|
|
49
|
+
samProps.devicebroker.enabled = true;
|
|
49
50
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
51
|
const { stub } = samProps;
|
|
51
52
|
|
|
@@ -284,7 +284,6 @@ describe('[unit] Zscaler Adapter Test', () => {
|
|
|
284
284
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
285
285
|
assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
|
|
286
286
|
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
287
|
-
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
288
287
|
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
289
288
|
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
290
289
|
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
@@ -321,7 +320,6 @@ describe('[unit] Zscaler Adapter Test', () => {
|
|
|
321
320
|
assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
|
|
322
321
|
assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
|
|
323
322
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
324
|
-
assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
|
|
325
323
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
326
324
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
327
325
|
assert.equal('^7.5.3', packageDotJson.dependencies.semver);
|