@itentialopensource/adapter-paragon_iam 0.2.4 → 0.3.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 +44 -14
- package/BROKER.md +31 -19
- package/CALLS.md +0 -43
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +18 -6
- package/TAB1.md +10 -0
- package/TAB2.md +145 -2350
- package/compliance-report.json +9 -0
- package/compliance-report.txt +5 -0
- package/entities/.system/action.json +40 -0
- package/entities/.system/mockdatafiles/MFA_Step_1-default.json +31 -0
- package/entities/.system/mockdatafiles/MFA_Step_2-default.json +107 -0
- package/entities/.system/schemaTokenReq.json +1 -1
- package/entities/.system/schemaTokenReq_MFA_Step_1.json +19 -0
- package/entities/.system/schemaTokenReq_MFA_Step_2.json +24 -0
- package/entities/.system/schemaTokenResp_MFA_Step_1.json +38 -0
- package/entities/.system/schemaTokenResp_MFA_Step_2.json +33 -0
- package/metadata.json +19 -14
- package/package.json +13 -15
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1715609950650.json +120 -0
- package/sampleProperties.json +70 -32
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +6 -8
package/sampleProperties.json
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"stub": true,
|
|
15
15
|
"protocol": "https",
|
|
16
16
|
"authentication": {
|
|
17
|
-
"auth_method": "
|
|
18
|
-
"username": "
|
|
19
|
-
"password": "
|
|
17
|
+
"auth_method": "multi_step_authentication",
|
|
18
|
+
"username": "admin",
|
|
19
|
+
"password": "pass",
|
|
20
20
|
"token": "token",
|
|
21
21
|
"token_timeout": 1800000,
|
|
22
22
|
"token_cache": "local",
|
|
23
23
|
"invalid_token_error": 401,
|
|
24
24
|
"auth_field": "header.headers.x-iam-token",
|
|
25
|
-
"auth_field_format": "{
|
|
25
|
+
"auth_field_format": "{tokenp2}",
|
|
26
26
|
"auth_logging": false,
|
|
27
27
|
"client_id": "",
|
|
28
28
|
"client_secret": "",
|
|
@@ -35,9 +35,35 @@
|
|
|
35
35
|
},
|
|
36
36
|
"multiStepAuthCalls": [
|
|
37
37
|
{
|
|
38
|
-
"name": "",
|
|
39
|
-
"requestFields": {
|
|
40
|
-
|
|
38
|
+
"name": "getFirstToken",
|
|
39
|
+
"requestFields": {
|
|
40
|
+
"user": {
|
|
41
|
+
"domain": "",
|
|
42
|
+
"name": ""
|
|
43
|
+
},
|
|
44
|
+
"password": "",
|
|
45
|
+
"methods": [
|
|
46
|
+
"PASSWORD"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"responseFields": {
|
|
50
|
+
"firstIdToken": "id_token",
|
|
51
|
+
"scopeId": "scopes.0.id"
|
|
52
|
+
},
|
|
53
|
+
"successfullResponseCode": 200
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "getSecondToken",
|
|
57
|
+
"requestFields": {
|
|
58
|
+
"token": "{getFirstToken.responseFields.firstIdToken}",
|
|
59
|
+
"scopeId": "{getFirstToken.responseFields.scopeId}",
|
|
60
|
+
"methods": [
|
|
61
|
+
"TOKEN"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"responseFields": {
|
|
65
|
+
"tokenp2": "id_token"
|
|
66
|
+
},
|
|
41
67
|
"successfullResponseCode": 200
|
|
42
68
|
}
|
|
43
69
|
]
|
|
@@ -116,30 +142,32 @@
|
|
|
116
142
|
}
|
|
117
143
|
},
|
|
118
144
|
"devicebroker": {
|
|
145
|
+
"enabled": false,
|
|
119
146
|
"getDevice": [
|
|
120
147
|
{
|
|
121
|
-
"path": "/
|
|
148
|
+
"path": "/not/mapped",
|
|
122
149
|
"method": "GET",
|
|
123
150
|
"query": {},
|
|
124
151
|
"body": {},
|
|
125
152
|
"headers": {},
|
|
126
153
|
"handleFailure": "ignore",
|
|
127
154
|
"requestFields": {
|
|
128
|
-
"
|
|
155
|
+
"insample": "{port}"
|
|
129
156
|
},
|
|
130
157
|
"responseDatakey": "",
|
|
131
158
|
"responseFields": {
|
|
132
|
-
"name": "
|
|
133
|
-
"ostype": "
|
|
134
|
-
"ostypePrefix": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
159
|
+
"name": "{this}{||}{that}",
|
|
160
|
+
"ostype": "{osfield}",
|
|
161
|
+
"ostypePrefix": "meraki-",
|
|
162
|
+
"port": "{port}",
|
|
163
|
+
"ipaddress": "{ip_addr}",
|
|
164
|
+
"serial": "{serial}"
|
|
137
165
|
}
|
|
138
166
|
}
|
|
139
167
|
],
|
|
140
168
|
"getDevicesFiltered": [
|
|
141
169
|
{
|
|
142
|
-
"path": "/
|
|
170
|
+
"path": "/not/mapped",
|
|
143
171
|
"method": "GET",
|
|
144
172
|
"pagination": {
|
|
145
173
|
"offsetVar": "",
|
|
@@ -154,42 +182,44 @@
|
|
|
154
182
|
"requestFields": {},
|
|
155
183
|
"responseDatakey": "",
|
|
156
184
|
"responseFields": {
|
|
157
|
-
"name": "
|
|
158
|
-
"ostype": "
|
|
159
|
-
"ostypePrefix": "
|
|
160
|
-
"
|
|
161
|
-
"
|
|
185
|
+
"name": "{this}{||}{that}",
|
|
186
|
+
"ostype": "{osfield}",
|
|
187
|
+
"ostypePrefix": "meraki-",
|
|
188
|
+
"port": "{port}",
|
|
189
|
+
"ipaddress": "{ip_addr}",
|
|
190
|
+
"serial": "{serial}",
|
|
191
|
+
"id": "{myid}"
|
|
162
192
|
}
|
|
163
193
|
}
|
|
164
194
|
],
|
|
165
195
|
"isAlive": [
|
|
166
196
|
{
|
|
167
|
-
"path": "/
|
|
197
|
+
"path": "/not/mapped/{devID}",
|
|
168
198
|
"method": "GET",
|
|
169
199
|
"query": {},
|
|
170
200
|
"body": {},
|
|
171
201
|
"headers": {},
|
|
172
202
|
"handleFailure": "ignore",
|
|
173
203
|
"requestFields": {
|
|
174
|
-
"
|
|
204
|
+
"devID": "{id}"
|
|
175
205
|
},
|
|
176
206
|
"responseDatakey": "",
|
|
177
207
|
"responseFields": {
|
|
178
|
-
"status": "
|
|
179
|
-
"statusValue": "
|
|
208
|
+
"status": "return2xx",
|
|
209
|
+
"statusValue": "AD.200"
|
|
180
210
|
}
|
|
181
211
|
}
|
|
182
212
|
],
|
|
183
213
|
"getConfig": [
|
|
184
214
|
{
|
|
185
|
-
"path": "/
|
|
215
|
+
"path": "/not/mapped/{devID}",
|
|
186
216
|
"method": "GET",
|
|
187
217
|
"query": {},
|
|
188
218
|
"body": {},
|
|
189
219
|
"headers": {},
|
|
190
220
|
"handleFailure": "ignore",
|
|
191
221
|
"requestFields": {
|
|
192
|
-
"
|
|
222
|
+
"devID": "{id}"
|
|
193
223
|
},
|
|
194
224
|
"responseDatakey": "",
|
|
195
225
|
"responseFields": {}
|
|
@@ -197,7 +227,7 @@
|
|
|
197
227
|
],
|
|
198
228
|
"getCount": [
|
|
199
229
|
{
|
|
200
|
-
"path": "/
|
|
230
|
+
"path": "/not/mapped",
|
|
201
231
|
"method": "GET",
|
|
202
232
|
"query": {},
|
|
203
233
|
"body": {},
|
|
@@ -213,15 +243,15 @@
|
|
|
213
243
|
"enabled": false,
|
|
214
244
|
"entities": [
|
|
215
245
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
246
|
+
"entityType": "device",
|
|
247
|
+
"frequency": 3600,
|
|
218
248
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
249
|
+
"limit": 10000,
|
|
220
250
|
"retryAttempts": 5,
|
|
221
251
|
"sort": true,
|
|
222
252
|
"populate": [
|
|
223
253
|
{
|
|
224
|
-
"path": "",
|
|
254
|
+
"path": "/not/mapped",
|
|
225
255
|
"method": "GET",
|
|
226
256
|
"pagination": {
|
|
227
257
|
"offsetVar": "",
|
|
@@ -235,7 +265,15 @@
|
|
|
235
265
|
"handleFailure": "ignore",
|
|
236
266
|
"requestFields": {},
|
|
237
267
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
268
|
+
"responseFields": {
|
|
269
|
+
"name": "{this}{||}{that}",
|
|
270
|
+
"ostype": "{osfield}",
|
|
271
|
+
"ostypePrefix": "meraki-",
|
|
272
|
+
"port": "{port}",
|
|
273
|
+
"ipaddress": "{ip_addr}",
|
|
274
|
+
"serial": "{serial}",
|
|
275
|
+
"id": "{myid}"
|
|
276
|
+
}
|
|
239
277
|
}
|
|
240
278
|
],
|
|
241
279
|
"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] Paragon_iam 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);
|
|
@@ -315,17 +314,16 @@ describe('[unit] Paragon_iam Adapter Test', () => {
|
|
|
315
314
|
assert.notEqual(undefined, packageDotJson.dependencies);
|
|
316
315
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
317
316
|
assert.notEqual('', packageDotJson.dependencies);
|
|
318
|
-
assert.equal('^8.
|
|
319
|
-
assert.equal('^1.
|
|
317
|
+
assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
|
|
318
|
+
assert.equal('^1.7.2', packageDotJson.dependencies.axios);
|
|
320
319
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
321
|
-
assert.equal('^11.
|
|
322
|
-
assert.equal('^10.
|
|
320
|
+
assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
|
|
321
|
+
assert.equal('^10.7.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
|
-
assert.equal('^7.
|
|
328
|
-
assert.equal('^3.
|
|
325
|
+
assert.equal('^7.6.3', packageDotJson.dependencies.semver);
|
|
326
|
+
assert.equal('^3.13.1', packageDotJson.dependencies.winston);
|
|
329
327
|
done();
|
|
330
328
|
} catch (error) {
|
|
331
329
|
log.error(`Test Failure: ${error}`);
|