@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.
Files changed (81) hide show
  1. package/.eslintrc.js +1 -0
  2. package/AUTH.md +4 -4
  3. package/BROKER.md +4 -4
  4. package/CALLS.md +597 -9
  5. package/ENHANCE.md +3 -3
  6. package/PROPERTIES.md +24 -9
  7. package/README.md +24 -23
  8. package/SUMMARY.md +2 -2
  9. package/SYSTEMINFO.md +1 -1
  10. package/TAB1.md +2 -2
  11. package/TAB2.md +10 -6
  12. package/TROUBLESHOOT.md +10 -1
  13. package/UTILITIES.md +473 -0
  14. package/adapter.js +9958 -5
  15. package/adapterBase.js +52 -16
  16. package/entities/APIAuthentication/action.json +165 -0
  17. package/entities/APIAuthentication/schema.json +26 -0
  18. package/entities/AdvancedSettings/action.json +45 -0
  19. package/entities/AdvancedSettings/schema.json +20 -0
  20. package/entities/AdvancedThreatProtectionPolicy/action.json +127 -0
  21. package/entities/AdvancedThreatProtectionPolicy/schema.json +24 -0
  22. package/entities/AuthenticationSettings/action.json +66 -0
  23. package/entities/AuthenticationSettings/schema.json +21 -0
  24. package/entities/CloudAppControlPolicy/action.json +247 -0
  25. package/entities/CloudAppControlPolicy/schema.json +41 -0
  26. package/entities/CloudApplications/action.json +46 -0
  27. package/entities/CloudApplications/schema.json +20 -0
  28. package/entities/CloudNanologStreamingServiceNSS/action.json +252 -0
  29. package/entities/CloudNanologStreamingServiceNSS/schema.json +30 -0
  30. package/entities/DNSControlPolicy/action.json +106 -0
  31. package/entities/DNSControlPolicy/schema.json +23 -0
  32. package/entities/FileTypeControlPolicy/action.json +127 -0
  33. package/entities/FileTypeControlPolicy/schema.json +24 -0
  34. package/entities/ForwardingControlPolicy/action.json +204 -0
  35. package/entities/ForwardingControlPolicy/schema.json +11 -1
  36. package/entities/IPSControlPolicy/action.json +106 -0
  37. package/entities/IPSControlPolicy/schema.json +23 -0
  38. package/entities/MalwareProtectionPolicy/action.json +168 -0
  39. package/entities/MalwareProtectionPolicy/schema.json +26 -0
  40. package/entities/OrganizationDetails/action.json +67 -0
  41. package/entities/OrganizationDetails/schema.json +21 -0
  42. package/entities/RemoteAssistanceSupport/action.json +45 -0
  43. package/entities/RemoteAssistanceSupport/schema.json +20 -0
  44. package/entities/SSLInspectionPolicy/action.json +106 -0
  45. package/entities/SSLInspectionPolicy/schema.json +23 -0
  46. package/entities/SandBoxPolicy/action.json +168 -0
  47. package/entities/SandBoxPolicy/schema.json +26 -0
  48. package/entities/URLFilteringPolicy/action.json +148 -0
  49. package/entities/URLFilteringPolicy/schema.json +25 -0
  50. package/entities/URLFilteringandCloudAppControlSettings/action.json +45 -0
  51. package/entities/URLFilteringandCloudAppControlSettings/schema.json +20 -0
  52. package/package.json +24 -28
  53. package/pronghorn.json +4347 -13
  54. package/propertiesSchema.json +68 -7
  55. package/report/adapterInfo.json +8 -8
  56. package/report/auto-adapter-openapi.json +55355 -0
  57. package/report/updateReport1748556249696.json +120 -0
  58. package/sampleProperties.json +5 -1
  59. package/test/integration/adapterTestBasicGet.js +88 -54
  60. package/test/integration/adapterTestConnectivity.js +15 -16
  61. package/test/integration/adapterTestIntegration.js +2481 -38
  62. package/test/unit/adapterBaseTestUnit.js +641 -39
  63. package/test/unit/adapterTestUnit.js +2400 -54
  64. package/utils/adapterInfo.js +114 -164
  65. package/utils/argParser.js +44 -0
  66. package/utils/checkMigrate.js +77 -38
  67. package/utils/entitiesToDB.js +53 -42
  68. package/utils/logger.js +26 -0
  69. package/utils/modify.js +56 -55
  70. package/utils/mongoDbConnection.js +79 -0
  71. package/utils/mongoUtils.js +162 -0
  72. package/utils/taskMover.js +31 -32
  73. package/utils/tbScript.js +36 -172
  74. package/utils/tbUtils.js +84 -226
  75. package/utils/troubleshootingAdapter.js +68 -84
  76. package/utils/updateAdapterConfig.js +158 -0
  77. package/utils/addAuth.js +0 -94
  78. package/utils/artifactize.js +0 -146
  79. package/utils/basicGet.js +0 -50
  80. package/utils/packModificationScript.js +0 -35
  81. package/utils/patches2bundledDeps.js +0 -90
package/.eslintrc.js CHANGED
@@ -9,6 +9,7 @@ module.exports = {
9
9
  'json'
10
10
  ],
11
11
  parserOptions: {
12
+ ecmaVersion: 2020,
12
13
  sourceType: 'module'
13
14
  },
14
15
  rules: {
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 IAP 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>.
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 IAP if you have not already done so
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 IAP Admin Essentials.
36
- - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
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 IAP Device Broker
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 IAP's Device Broker. IAP Device Broker integration allows for easier interation into several of IAPs applications (e.g. Configuration Manager). Properly configuring the properties for the adapter in IAP 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.
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 IAP applications (e.g. Config Manager). There are other fields that can be set as well but consider these the minimal fields.
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 IAP 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.
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