@itentialopensource/adapter-zscaler 0.10.11 → 0.11.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/.eslintrc.js +1 -0
- package/AUTH.md +4 -4
- package/BROKER.md +4 -4
- package/CALLS.md +597 -9
- package/ENHANCE.md +3 -3
- package/PROPERTIES.md +24 -9
- package/README.md +24 -23
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +1 -1
- package/TAB1.md +2 -2
- package/TAB2.md +10 -6
- package/TROUBLESHOOT.md +10 -1
- package/UTILITIES.md +473 -0
- package/adapter.js +9958 -5
- package/adapterBase.js +52 -16
- package/entities/APIAuthentication/action.json +165 -0
- package/entities/APIAuthentication/schema.json +26 -0
- package/entities/AdvancedSettings/action.json +45 -0
- package/entities/AdvancedSettings/schema.json +20 -0
- package/entities/AdvancedThreatProtectionPolicy/action.json +127 -0
- package/entities/AdvancedThreatProtectionPolicy/schema.json +24 -0
- package/entities/AuthenticationSettings/action.json +66 -0
- package/entities/AuthenticationSettings/schema.json +21 -0
- package/entities/CloudAppControlPolicy/action.json +247 -0
- package/entities/CloudAppControlPolicy/schema.json +41 -0
- package/entities/CloudApplications/action.json +46 -0
- package/entities/CloudApplications/schema.json +20 -0
- package/entities/CloudNanologStreamingServiceNSS/action.json +252 -0
- package/entities/CloudNanologStreamingServiceNSS/schema.json +30 -0
- package/entities/DNSControlPolicy/action.json +106 -0
- package/entities/DNSControlPolicy/schema.json +23 -0
- package/entities/FileTypeControlPolicy/action.json +127 -0
- package/entities/FileTypeControlPolicy/schema.json +24 -0
- package/entities/ForwardingControlPolicy/action.json +204 -0
- package/entities/ForwardingControlPolicy/schema.json +11 -1
- package/entities/IPSControlPolicy/action.json +106 -0
- package/entities/IPSControlPolicy/schema.json +23 -0
- package/entities/MalwareProtectionPolicy/action.json +168 -0
- package/entities/MalwareProtectionPolicy/schema.json +26 -0
- package/entities/OrganizationDetails/action.json +67 -0
- package/entities/OrganizationDetails/schema.json +21 -0
- package/entities/RemoteAssistanceSupport/action.json +45 -0
- package/entities/RemoteAssistanceSupport/schema.json +20 -0
- package/entities/SSLInspectionPolicy/action.json +106 -0
- package/entities/SSLInspectionPolicy/schema.json +23 -0
- package/entities/SandBoxPolicy/action.json +168 -0
- package/entities/SandBoxPolicy/schema.json +26 -0
- package/entities/URLFilteringPolicy/action.json +148 -0
- package/entities/URLFilteringPolicy/schema.json +25 -0
- package/entities/URLFilteringandCloudAppControlSettings/action.json +45 -0
- package/entities/URLFilteringandCloudAppControlSettings/schema.json +20 -0
- package/package.json +24 -28
- package/pronghorn.json +4347 -13
- package/propertiesSchema.json +68 -7
- package/report/adapterInfo.json +8 -8
- package/report/auto-adapter-openapi.json +55355 -0
- package/report/updateReport1748556249696.json +120 -0
- package/sampleProperties.json +5 -1
- package/test/integration/adapterTestBasicGet.js +88 -54
- package/test/integration/adapterTestConnectivity.js +15 -16
- package/test/integration/adapterTestIntegration.js +2481 -38
- package/test/unit/adapterBaseTestUnit.js +641 -39
- package/test/unit/adapterTestUnit.js +2400 -54
- package/utils/adapterInfo.js +114 -164
- package/utils/argParser.js +44 -0
- package/utils/checkMigrate.js +77 -38
- package/utils/entitiesToDB.js +53 -42
- package/utils/logger.js +26 -0
- package/utils/modify.js +56 -55
- package/utils/mongoDbConnection.js +79 -0
- package/utils/mongoUtils.js +162 -0
- package/utils/taskMover.js +31 -32
- package/utils/tbScript.js +36 -172
- package/utils/tbUtils.js +84 -226
- package/utils/troubleshootingAdapter.js +68 -84
- package/utils/updateAdapterConfig.js +158 -0
- package/utils/addAuth.js +0 -94
- package/utils/artifactize.js +0 -146
- package/utils/basicGet.js +0 -50
- package/utils/packModificationScript.js +0 -35
- package/utils/patches2bundledDeps.js +0 -90
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actions": [
|
|
3
|
+
{
|
|
4
|
+
"name": "getUrlFilteringRules",
|
|
5
|
+
"protocol": "REST",
|
|
6
|
+
"method": "GET",
|
|
7
|
+
"entitypath": "{base_path}/{version}/urlFilteringRules?{query}",
|
|
8
|
+
"requestSchema": "schema.json",
|
|
9
|
+
"responseSchema": "schema.json",
|
|
10
|
+
"timeout": 0,
|
|
11
|
+
"sendEmpty": false,
|
|
12
|
+
"sendGetBody": false,
|
|
13
|
+
"requestDatatype": "JSON",
|
|
14
|
+
"responseDatatype": "JSON",
|
|
15
|
+
"headers": {},
|
|
16
|
+
"responseObjects": [
|
|
17
|
+
{
|
|
18
|
+
"type": "default",
|
|
19
|
+
"key": "",
|
|
20
|
+
"mockFile": ""
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "postUrlFilteringRules",
|
|
26
|
+
"protocol": "REST",
|
|
27
|
+
"method": "POST",
|
|
28
|
+
"entitypath": "{base_path}/{version}/urlFilteringRules?{query}",
|
|
29
|
+
"requestSchema": "schema.json",
|
|
30
|
+
"responseSchema": "schema.json",
|
|
31
|
+
"timeout": 0,
|
|
32
|
+
"sendEmpty": false,
|
|
33
|
+
"requestDatatype": "JSON",
|
|
34
|
+
"responseDatatype": "JSON",
|
|
35
|
+
"headers": {},
|
|
36
|
+
"responseObjects": [
|
|
37
|
+
{
|
|
38
|
+
"type": "default",
|
|
39
|
+
"key": "",
|
|
40
|
+
"mockFile": ""
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "getUrlFilteringRulesRuleId",
|
|
46
|
+
"protocol": "REST",
|
|
47
|
+
"method": "GET",
|
|
48
|
+
"entitypath": "{base_path}/{version}/urlFilteringRules/{pathv1}?{query}",
|
|
49
|
+
"requestSchema": "schema.json",
|
|
50
|
+
"responseSchema": "schema.json",
|
|
51
|
+
"timeout": 0,
|
|
52
|
+
"sendEmpty": false,
|
|
53
|
+
"sendGetBody": false,
|
|
54
|
+
"requestDatatype": "JSON",
|
|
55
|
+
"responseDatatype": "JSON",
|
|
56
|
+
"headers": {},
|
|
57
|
+
"responseObjects": [
|
|
58
|
+
{
|
|
59
|
+
"type": "default",
|
|
60
|
+
"key": "",
|
|
61
|
+
"mockFile": ""
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "putUrlFilteringRulesRuleId",
|
|
67
|
+
"protocol": "REST",
|
|
68
|
+
"method": "PUT",
|
|
69
|
+
"entitypath": "{base_path}/{version}/urlFilteringRules/{pathv1}?{query}",
|
|
70
|
+
"requestSchema": "schema.json",
|
|
71
|
+
"responseSchema": "schema.json",
|
|
72
|
+
"timeout": 0,
|
|
73
|
+
"sendEmpty": false,
|
|
74
|
+
"requestDatatype": "JSON",
|
|
75
|
+
"responseDatatype": "JSON",
|
|
76
|
+
"headers": {},
|
|
77
|
+
"responseObjects": [
|
|
78
|
+
{
|
|
79
|
+
"type": "default",
|
|
80
|
+
"key": "",
|
|
81
|
+
"mockFile": ""
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "deleteUrlFilteringRulesRuleId",
|
|
87
|
+
"protocol": "REST",
|
|
88
|
+
"method": "DELETE",
|
|
89
|
+
"entitypath": "{base_path}/{version}/urlFilteringRules/{pathv1}?{query}",
|
|
90
|
+
"requestSchema": "schema.json",
|
|
91
|
+
"responseSchema": "schema.json",
|
|
92
|
+
"timeout": 0,
|
|
93
|
+
"sendEmpty": false,
|
|
94
|
+
"requestDatatype": "JSON",
|
|
95
|
+
"responseDatatype": "JSON",
|
|
96
|
+
"headers": {},
|
|
97
|
+
"responseObjects": [
|
|
98
|
+
{
|
|
99
|
+
"type": "default",
|
|
100
|
+
"key": "",
|
|
101
|
+
"mockFile": ""
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "getTimeWindows",
|
|
107
|
+
"protocol": "REST",
|
|
108
|
+
"method": "GET",
|
|
109
|
+
"entitypath": "{base_path}/{version}/timeWindows?{query}",
|
|
110
|
+
"requestSchema": "schema.json",
|
|
111
|
+
"responseSchema": "schema.json",
|
|
112
|
+
"timeout": 0,
|
|
113
|
+
"sendEmpty": false,
|
|
114
|
+
"sendGetBody": false,
|
|
115
|
+
"requestDatatype": "JSON",
|
|
116
|
+
"responseDatatype": "JSON",
|
|
117
|
+
"headers": {},
|
|
118
|
+
"responseObjects": [
|
|
119
|
+
{
|
|
120
|
+
"type": "default",
|
|
121
|
+
"key": "",
|
|
122
|
+
"mockFile": ""
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "getTimeWindowsLite",
|
|
128
|
+
"protocol": "REST",
|
|
129
|
+
"method": "GET",
|
|
130
|
+
"entitypath": "{base_path}/{version}/timeWindows/lite?{query}",
|
|
131
|
+
"requestSchema": "schema.json",
|
|
132
|
+
"responseSchema": "schema.json",
|
|
133
|
+
"timeout": 0,
|
|
134
|
+
"sendEmpty": false,
|
|
135
|
+
"sendGetBody": false,
|
|
136
|
+
"requestDatatype": "JSON",
|
|
137
|
+
"responseDatatype": "JSON",
|
|
138
|
+
"headers": {},
|
|
139
|
+
"responseObjects": [
|
|
140
|
+
{
|
|
141
|
+
"type": "default",
|
|
142
|
+
"key": "",
|
|
143
|
+
"mockFile": ""
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "schema.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"translate": true,
|
|
6
|
+
"dynamicfields": true,
|
|
7
|
+
"properties": {
|
|
8
|
+
"ph_request_type": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "type of request (internal to adapter)",
|
|
11
|
+
"default": "getUrlFilteringRules",
|
|
12
|
+
"enum": [
|
|
13
|
+
"getUrlFilteringRules",
|
|
14
|
+
"postUrlFilteringRules",
|
|
15
|
+
"getUrlFilteringRulesRuleId",
|
|
16
|
+
"putUrlFilteringRulesRuleId",
|
|
17
|
+
"deleteUrlFilteringRulesRuleId",
|
|
18
|
+
"getTimeWindows",
|
|
19
|
+
"getTimeWindowsLite"
|
|
20
|
+
],
|
|
21
|
+
"external_name": "ph_request_type"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"definitions": {}
|
|
25
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actions": [
|
|
3
|
+
{
|
|
4
|
+
"name": "getAdvancedUrlFilterAndCloudAppSettings",
|
|
5
|
+
"protocol": "REST",
|
|
6
|
+
"method": "GET",
|
|
7
|
+
"entitypath": "{base_path}/{version}/advancedUrlFilterAndCloudAppSettings?{query}",
|
|
8
|
+
"requestSchema": "schema.json",
|
|
9
|
+
"responseSchema": "schema.json",
|
|
10
|
+
"timeout": 0,
|
|
11
|
+
"sendEmpty": false,
|
|
12
|
+
"sendGetBody": false,
|
|
13
|
+
"requestDatatype": "JSON",
|
|
14
|
+
"responseDatatype": "JSON",
|
|
15
|
+
"headers": {},
|
|
16
|
+
"responseObjects": [
|
|
17
|
+
{
|
|
18
|
+
"type": "default",
|
|
19
|
+
"key": "",
|
|
20
|
+
"mockFile": ""
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "putAdvancedUrlFilterAndCloudAppSettings",
|
|
26
|
+
"protocol": "REST",
|
|
27
|
+
"method": "PUT",
|
|
28
|
+
"entitypath": "{base_path}/{version}/advancedUrlFilterAndCloudAppSettings?{query}",
|
|
29
|
+
"requestSchema": "schema.json",
|
|
30
|
+
"responseSchema": "schema.json",
|
|
31
|
+
"timeout": 0,
|
|
32
|
+
"sendEmpty": false,
|
|
33
|
+
"requestDatatype": "JSON",
|
|
34
|
+
"responseDatatype": "JSON",
|
|
35
|
+
"headers": {},
|
|
36
|
+
"responseObjects": [
|
|
37
|
+
{
|
|
38
|
+
"type": "default",
|
|
39
|
+
"key": "",
|
|
40
|
+
"mockFile": ""
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "schema.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"translate": true,
|
|
6
|
+
"dynamicfields": true,
|
|
7
|
+
"properties": {
|
|
8
|
+
"ph_request_type": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "type of request (internal to adapter)",
|
|
11
|
+
"default": "getAdvancedUrlFilterAndCloudAppSettings",
|
|
12
|
+
"enum": [
|
|
13
|
+
"getAdvancedUrlFilterAndCloudAppSettings",
|
|
14
|
+
"putAdvancedUrlFilterAndCloudAppSettings"
|
|
15
|
+
],
|
|
16
|
+
"external_name": "ph_request_type"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"definitions": {}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-zscaler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "This adapter integrates with system Zscaler",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.
|
|
7
|
+
"engineVersion": "1.69.14",
|
|
8
8
|
"adapterType": "http",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
11
10
|
"preinstall": "node utils/setup.js",
|
|
12
11
|
"deinstall": "node utils/removeHooks.js",
|
|
13
12
|
"lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
17
16
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
18
17
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
19
|
-
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
20
18
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
21
19
|
"adapter:findPath": "node utils/findPath.js",
|
|
22
20
|
"adapter:migrate": "node utils/modify.js -m",
|
|
@@ -31,10 +29,9 @@
|
|
|
31
29
|
},
|
|
32
30
|
"keywords": [
|
|
33
31
|
"Itential",
|
|
34
|
-
"
|
|
32
|
+
"Itential Platform",
|
|
35
33
|
"Automation",
|
|
36
34
|
"Integration",
|
|
37
|
-
"App-Artifacts",
|
|
38
35
|
"Adapter",
|
|
39
36
|
"Security",
|
|
40
37
|
"Zscaler",
|
|
@@ -52,30 +49,29 @@
|
|
|
52
49
|
"author": "Itential",
|
|
53
50
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-zscaler#readme",
|
|
54
51
|
"dependencies": {
|
|
55
|
-
"@itentialopensource/adapter-utils": "
|
|
56
|
-
"acorn": "
|
|
57
|
-
"ajv": "
|
|
58
|
-
"axios": "
|
|
59
|
-
"commander": "
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"mocha": "
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"winston": "^3.17.0"
|
|
52
|
+
"@itentialopensource/adapter-utils": "5.10.16",
|
|
53
|
+
"acorn": "8.14.1",
|
|
54
|
+
"ajv": "8.17.1",
|
|
55
|
+
"axios": "1.9.0",
|
|
56
|
+
"commander": "11.1.0",
|
|
57
|
+
"fs-extra": "11.3.0",
|
|
58
|
+
"json-query": "2.2.2",
|
|
59
|
+
"mocha": "10.8.2",
|
|
60
|
+
"mocha-param": "2.0.1",
|
|
61
|
+
"mongodb": "4.17.2",
|
|
62
|
+
"ping": "0.4.4",
|
|
63
|
+
"prompts": "2.4.2",
|
|
64
|
+
"readline-sync": "1.4.10",
|
|
65
|
+
"semver": "7.7.2",
|
|
66
|
+
"winston": "3.17.0"
|
|
71
67
|
},
|
|
72
68
|
"devDependencies": {
|
|
73
|
-
"chai": "
|
|
74
|
-
"eslint": "
|
|
75
|
-
"eslint-config-airbnb-base": "
|
|
76
|
-
"eslint-plugin-import": "
|
|
77
|
-
"eslint-plugin-json": "
|
|
78
|
-
"testdouble": "
|
|
69
|
+
"chai": "4.5.0",
|
|
70
|
+
"eslint": "8.57.0",
|
|
71
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
72
|
+
"eslint-plugin-import": "2.31.0",
|
|
73
|
+
"eslint-plugin-json": "3.1.0",
|
|
74
|
+
"testdouble": "3.18.0"
|
|
79
75
|
},
|
|
80
76
|
"private": false
|
|
81
77
|
}
|