@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
package/.eslintrc.js
CHANGED
package/AUTH.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Authenticating Adapter for Zscaler Adapter
|
|
2
2
|
|
|
3
|
-
This document will go through the steps for authenticating the Adapter for Zscaler adapter with Two Step Authentication. Properly configuring the properties for an adapter in
|
|
3
|
+
This document will go through the steps for authenticating the Adapter for Zscaler adapter with Two Step Authentication. Properly configuring the properties for an adapter in Itential Platform 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>.
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ The Adapter for Zscaler requires Two Step Authentication based on obfuscated API
|
|
|
9
9
|
|
|
10
10
|
STEPS
|
|
11
11
|
1. Ensure you have access to a Adapter for Zscaler server and that it is running
|
|
12
|
-
2. Follow the steps in the README.md to import the adapter into
|
|
12
|
+
2. Follow the steps in the README.md to import the adapter into Itential Platform if you have not already done so
|
|
13
13
|
3. To authenticate with Zscaler, apiKey has to be sent in request headers: https://help.zscaler.com/zia/getting-started-zia-api#RetrieveAPIKey
|
|
14
14
|
4. Use the properties below for the ```properties.authentication``` field
|
|
15
15
|
```json
|
|
@@ -32,8 +32,8 @@ you can leave all of the other properties in the authentication section, they wi
|
|
|
32
32
|
|
|
33
33
|
### Troubleshooting
|
|
34
34
|
- Make sure you copied over the correct username, password and apiKey.
|
|
35
|
-
- Turn on debug level logs for the adapter in
|
|
36
|
-
- Turn on auth_logging for the adapter in
|
|
35
|
+
- Turn on debug level logs for the adapter in Itential Platform Admin Essentials.
|
|
36
|
+
- Turn on auth_logging for the adapter in Itential Platform Admin Essentials (adapter properties).
|
|
37
37
|
- Investigate the logs - in particular:
|
|
38
38
|
- The FULL REQUEST log to make sure the proper headers are being sent with the request.
|
|
39
39
|
- The FULL BODY log to make sure the payload is accurate.
|
package/BROKER.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## Integrating Zscaler Adapter with
|
|
1
|
+
## Integrating Zscaler Adapter with Itential Platform Device Broker
|
|
2
2
|
|
|
3
|
-
This document will go through the steps for integrating the Zscaler adapter with
|
|
3
|
+
This document will go through the steps for integrating the Zscaler adapter with Itential Platform's Device Broker. Itential Platform Device Broker integration allows for easier interation into several of Itential Platform's applications (e.g. Configuration Manager). Properly configuring the properties for the adapter in Itential Platform is critical for getting the device broker integration to work. Their is additional information in the configuration section of the adapter readme. This document will go through each of the calls that are utilized by the Device Broker.
|
|
4
4
|
|
|
5
5
|
### getDevicesFiltered
|
|
6
6
|
getDevicesFiltered(options, callback) → This call returns all of the devices within Zscaler that match the provided filter.
|
|
@@ -13,7 +13,7 @@ options {object}: defines the options for the search. At current filter is the m
|
|
|
13
13
|
|
|
14
14
|
An Object containing the total number of matching devices and a list containing an array of the details for each device. For example, { total: 2, list: [ { name: ‘abc’, ostype: ‘type’, port: 80, ipaddress: ‘10.10.10.10’ }, { name: ‘def’, ostype: ‘type2’, port: 443, ipaddress: ‘10.10.10.15’ }] }
|
|
15
15
|
|
|
16
|
-
The fields name and ostype are required by the broker and should be mapped through properties to data from the other system. In addition, ipaddress and port should also be mapped as it is utilized by some north bound
|
|
16
|
+
The fields name and ostype are required by the broker and should be mapped through properties to data from the other system. In addition, ipaddress and port should also be mapped as it is utilized by some north bound Itential Platform applications (e.g. Config Manager). There are other fields that can be set as well but consider these the minimal fields.
|
|
17
17
|
|
|
18
18
|
Below is an example of how you may set up the properties for this call.
|
|
19
19
|
|
|
@@ -69,7 +69,7 @@ Below is an example of how you may set up the properties for this call.
|
|
|
69
69
|
|
|
70
70
|
Notice with the path, there is a variable in it ({org}). This variable must be provided in the data available to the call. For getDevicesFiltered this means the requestFields as a static value. In other calls, it may also come from the result of the getDevicesFiltered call.
|
|
71
71
|
|
|
72
|
-
Notice with the responseFields, it wants the
|
|
72
|
+
Notice with the responseFields, it wants the Itential Platform data key as the key and where it is supposed to find the data in the response as the value. You can use nested fields in the response object using standard object notation. You can also add static data as shown in the port field. Finally, you can append data to the response from the requestInformation using its key (e.g. org). The ostypePrefix is a special field that allows you to add static data to the ostype to help define the system you are getting the device from.
|
|
73
73
|
|
|
74
74
|
Notice here that you can also have multiple calls that make up the results provided to the Device Broker. In this example we are making calls to two different organizations and returning the results from both.
|
|
75
75
|
|