@itentialopensource/adapter-okta 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/AUTH.md +12 -16
- package/BROKER.md +31 -19
- package/CALLS.md +59 -22
- package/CHANGELOG.md +8 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +12 -3
- package/TAB1.md +7 -0
- package/TAB2.md +76 -2716
- package/metadata.json +29 -15
- package/package.json +5 -7
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1715610125500.json +120 -0
- package/sampleProperties.json +37 -25
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +1 -3
package/metadata.json
CHANGED
|
@@ -17,39 +17,53 @@
|
|
|
17
17
|
"Security (SASE)"
|
|
18
18
|
],
|
|
19
19
|
"tags": [
|
|
20
|
-
"Security Policy Management"
|
|
21
|
-
"Configuration & Compliance",
|
|
22
|
-
"Network Infrastructure Changes",
|
|
23
|
-
"Software Upgrades & Device Maintenance"
|
|
20
|
+
"Security Policy Management"
|
|
24
21
|
],
|
|
25
22
|
"useCases": [
|
|
26
23
|
"Security Group updates",
|
|
27
24
|
"Security Rule Removal",
|
|
28
|
-
"Security Rule Creation"
|
|
29
|
-
"Run network compliance checks and remediation",
|
|
30
|
-
"Determine configuration drift",
|
|
31
|
-
"Device Onboarding",
|
|
32
|
-
"Software Upgrade",
|
|
33
|
-
"Firewall Configuration backup or restore"
|
|
25
|
+
"Security Rule Creation"
|
|
34
26
|
],
|
|
35
27
|
"deprecated": {
|
|
36
28
|
"isDeprecated": false
|
|
37
29
|
},
|
|
38
30
|
"brokerSince": "",
|
|
31
|
+
"authMethods": [
|
|
32
|
+
{
|
|
33
|
+
"type": "API Key",
|
|
34
|
+
"primary": true
|
|
35
|
+
}
|
|
36
|
+
],
|
|
39
37
|
"documentation": {
|
|
40
38
|
"storeLink": "",
|
|
41
39
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-okta",
|
|
42
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/
|
|
40
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-okta",
|
|
43
41
|
"docLink": "https://docs.itential.com/opensource/docs/okta",
|
|
44
42
|
"demoLinks": [],
|
|
45
|
-
"trainingLinks": [
|
|
43
|
+
"trainingLinks": [
|
|
44
|
+
{
|
|
45
|
+
"title": "Itential Academy",
|
|
46
|
+
"link": "https://www.itential.com/itential-academy/"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
46
49
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
47
50
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
48
51
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
49
52
|
"webLink": "https://www.itential.com/adapters/okta/",
|
|
50
|
-
"vendorLink": "",
|
|
51
|
-
"productLink": "",
|
|
52
|
-
"apiLinks": [
|
|
53
|
+
"vendorLink": "https://www.okta.com/",
|
|
54
|
+
"productLink": "https://www.okta.com/",
|
|
55
|
+
"apiLinks": [
|
|
56
|
+
{
|
|
57
|
+
"title": "Core Okta API",
|
|
58
|
+
"link": "https://developer.okta.com/docs/reference/core-okta-api/",
|
|
59
|
+
"public": true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"title": "Okta Developer Reference",
|
|
63
|
+
"link": "https://developer.okta.com/docs/reference/",
|
|
64
|
+
"public": true
|
|
65
|
+
}
|
|
66
|
+
]
|
|
53
67
|
},
|
|
54
68
|
"assets": [],
|
|
55
69
|
"relatedItems": {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-okta",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "This adapter integrates with system described as: okta.",
|
|
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-okta.git"
|
|
52
51
|
},
|
|
53
52
|
"author": "Itential",
|
|
54
|
-
"homepage": "https://gitlab.com/itentialopensource/adapters/
|
|
53
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-okta#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
|
@@ -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
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.3.3",
|
|
3
|
+
"configLines": 72669,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 24573,
|
|
6
|
-
"testLines":
|
|
6
|
+
"testLines": 23698,
|
|
7
7
|
"testCases": 1074,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 50054,
|
|
9
9
|
"wfTasks": 286
|
|
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": 11541
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 735
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 10905
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 269
|
|
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": 23899
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 1004
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -116,30 +116,32 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"devicebroker": {
|
|
119
|
+
"enabled": false,
|
|
119
120
|
"getDevice": [
|
|
120
121
|
{
|
|
121
|
-
"path": "/
|
|
122
|
+
"path": "/not/mapped",
|
|
122
123
|
"method": "GET",
|
|
123
124
|
"query": {},
|
|
124
125
|
"body": {},
|
|
125
126
|
"headers": {},
|
|
126
127
|
"handleFailure": "ignore",
|
|
127
128
|
"requestFields": {
|
|
128
|
-
"
|
|
129
|
+
"insample": "{port}"
|
|
129
130
|
},
|
|
130
131
|
"responseDatakey": "",
|
|
131
132
|
"responseFields": {
|
|
132
|
-
"name": "
|
|
133
|
-
"ostype": "
|
|
134
|
-
"ostypePrefix": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
133
|
+
"name": "{this}{||}{that}",
|
|
134
|
+
"ostype": "{osfield}",
|
|
135
|
+
"ostypePrefix": "meraki-",
|
|
136
|
+
"port": "{port}",
|
|
137
|
+
"ipaddress": "{ip_addr}",
|
|
138
|
+
"serial" : "{serial}"
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
],
|
|
140
142
|
"getDevicesFiltered": [
|
|
141
143
|
{
|
|
142
|
-
"path": "/
|
|
144
|
+
"path": "/not/mapped",
|
|
143
145
|
"method": "GET",
|
|
144
146
|
"pagination": {
|
|
145
147
|
"offsetVar": "",
|
|
@@ -154,42 +156,44 @@
|
|
|
154
156
|
"requestFields": {},
|
|
155
157
|
"responseDatakey": "",
|
|
156
158
|
"responseFields": {
|
|
157
|
-
"name": "
|
|
158
|
-
"ostype": "
|
|
159
|
-
"ostypePrefix": "
|
|
160
|
-
"
|
|
161
|
-
"
|
|
159
|
+
"name": "{this}{||}{that}",
|
|
160
|
+
"ostype": "{osfield}",
|
|
161
|
+
"ostypePrefix": "meraki-",
|
|
162
|
+
"port": "{port}",
|
|
163
|
+
"ipaddress": "{ip_addr}",
|
|
164
|
+
"serial" : "{serial}",
|
|
165
|
+
"id": "{myid}"
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
],
|
|
165
169
|
"isAlive": [
|
|
166
170
|
{
|
|
167
|
-
"path": "/
|
|
171
|
+
"path": "/not/mapped/{devID}",
|
|
168
172
|
"method": "GET",
|
|
169
173
|
"query": {},
|
|
170
174
|
"body": {},
|
|
171
175
|
"headers": {},
|
|
172
176
|
"handleFailure": "ignore",
|
|
173
177
|
"requestFields": {
|
|
174
|
-
"
|
|
178
|
+
"devID": "{id}"
|
|
175
179
|
},
|
|
176
180
|
"responseDatakey": "",
|
|
177
181
|
"responseFields": {
|
|
178
|
-
"status": "
|
|
179
|
-
"statusValue": "
|
|
182
|
+
"status": "return2xx",
|
|
183
|
+
"statusValue": "AD.200"
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
],
|
|
183
187
|
"getConfig": [
|
|
184
188
|
{
|
|
185
|
-
"path": "/
|
|
189
|
+
"path": "/not/mapped/{devID}",
|
|
186
190
|
"method": "GET",
|
|
187
191
|
"query": {},
|
|
188
192
|
"body": {},
|
|
189
193
|
"headers": {},
|
|
190
194
|
"handleFailure": "ignore",
|
|
191
195
|
"requestFields": {
|
|
192
|
-
"
|
|
196
|
+
"devID": "{id}"
|
|
193
197
|
},
|
|
194
198
|
"responseDatakey": "",
|
|
195
199
|
"responseFields": {}
|
|
@@ -197,7 +201,7 @@
|
|
|
197
201
|
],
|
|
198
202
|
"getCount": [
|
|
199
203
|
{
|
|
200
|
-
"path": "/
|
|
204
|
+
"path": "/not/mapped",
|
|
201
205
|
"method": "GET",
|
|
202
206
|
"query": {},
|
|
203
207
|
"body": {},
|
|
@@ -213,15 +217,15 @@
|
|
|
213
217
|
"enabled": false,
|
|
214
218
|
"entities": [
|
|
215
219
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
220
|
+
"entityType": "device",
|
|
221
|
+
"frequency": 3600,
|
|
218
222
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
223
|
+
"limit": 10000,
|
|
220
224
|
"retryAttempts": 5,
|
|
221
225
|
"sort": true,
|
|
222
226
|
"populate": [
|
|
223
227
|
{
|
|
224
|
-
"path": "",
|
|
228
|
+
"path": "/not/mapped",
|
|
225
229
|
"method": "GET",
|
|
226
230
|
"pagination": {
|
|
227
231
|
"offsetVar": "",
|
|
@@ -235,7 +239,15 @@
|
|
|
235
239
|
"handleFailure": "ignore",
|
|
236
240
|
"requestFields": {},
|
|
237
241
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
242
|
+
"responseFields": {
|
|
243
|
+
"name": "{this}{||}{that}",
|
|
244
|
+
"ostype": "{osfield}",
|
|
245
|
+
"ostypePrefix": "meraki-",
|
|
246
|
+
"port": "{port}",
|
|
247
|
+
"ipaddress": "{ip_addr}",
|
|
248
|
+
"serial" : "{serial}",
|
|
249
|
+
"id": "{myid}"
|
|
250
|
+
}
|
|
239
251
|
}
|
|
240
252
|
],
|
|
241
253
|
"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] Okta 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] Okta 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);
|
|
@@ -563,7 +561,7 @@ describe('[unit] Okta Adapter Test', () => {
|
|
|
563
561
|
log.error(`Adapter Exception: ${error}`);
|
|
564
562
|
done(error);
|
|
565
563
|
}
|
|
566
|
-
});
|
|
564
|
+
}).timeout(attemptTimeout);
|
|
567
565
|
});
|
|
568
566
|
|
|
569
567
|
describe('propertiesSchema.json', () => {
|