@itentialopensource/adapter-zscaler 0.8.3 → 0.10.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 (134) hide show
  1. package/AUTH.md +19 -16
  2. package/BROKER.md +31 -19
  3. package/CALLS.md +1173 -20
  4. package/CHANGELOG.md +16 -0
  5. package/PROPERTIES.md +5 -0
  6. package/README.md +60 -63
  7. package/SYSTEMINFO.md +18 -6
  8. package/TAB1.md +8 -0
  9. package/TAB2.md +86 -1495
  10. package/adapter.js +17190 -0
  11. package/entities/AdminRoleManagement/action.json +126 -0
  12. package/entities/AdminRoleManagement/schema.json +24 -0
  13. package/entities/AppViews/action.json +46 -0
  14. package/entities/AppViews/mockdatafiles/getViewApps-default.json +40 -0
  15. package/entities/AppViews/mockdatafiles/getViews-default.json +16 -0
  16. package/entities/AppViews/schema.json +20 -0
  17. package/entities/Applications/action.json +66 -0
  18. package/entities/Applications/mockdatafiles/appsSearchGET-default.json +186 -0
  19. package/entities/Applications/schema.json +21 -0
  20. package/entities/BrowserIsolation/action.json +25 -0
  21. package/entities/BrowserIsolation/mockdatafiles/getCloudBrowserIsolationProfiles-default.json +20 -0
  22. package/entities/BrowserIsolation/schema.json +19 -0
  23. package/entities/DataLossPrevention/action.json +767 -0
  24. package/entities/DataLossPrevention/mockdatafiles/getDLPDictionarySummary-default.json +808 -0
  25. package/entities/DataLossPrevention/mockdatafiles/getDLPEngines-default.json +26 -0
  26. package/entities/DataLossPrevention/mockdatafiles/getDLPEnginesSummary-default.json +18 -0
  27. package/entities/DataLossPrevention/mockdatafiles/getDlpDictionaries-default.json +402 -0
  28. package/entities/DataLossPrevention/mockdatafiles/getICAPServerSummary-default.json +14 -0
  29. package/entities/DataLossPrevention/mockdatafiles/getICAPServers-default.json +20 -0
  30. package/entities/DataLossPrevention/mockdatafiles/getIncidentReceiverServerSummary-default.json +30 -0
  31. package/entities/DataLossPrevention/mockdatafiles/getIncidentReceiverServers-default.json +30 -0
  32. package/entities/DataLossPrevention/mockdatafiles/getPredefinedHierarchicalIdentifiersByDictionaryId-default.json +4 -0
  33. package/entities/DataLossPrevention/mockdatafiles/getProfiles-default.json +94 -0
  34. package/entities/DataLossPrevention/mockdatafiles/getRules-default.json +5556 -0
  35. package/entities/DataLossPrevention/mockdatafiles/getSchemaLite-default.json +52 -0
  36. package/entities/DataLossPrevention/mockdatafiles/getSchemas-default.json +379 -0
  37. package/entities/DataLossPrevention/mockdatafiles/getSummary-default.json +56 -0
  38. package/entities/DataLossPrevention/mockdatafiles/getWebDlpRulesLite-default.json +5758 -0
  39. package/entities/DataLossPrevention/mockdatafiles/gettemplates-default.json +34 -0
  40. package/entities/DataLossPrevention/schema.json +55 -0
  41. package/entities/DeviceGroups/action.json +67 -0
  42. package/entities/DeviceGroups/mockdatafiles/getDeviceGroups-default.json +20 -0
  43. package/entities/DeviceGroups/mockdatafiles/getDevices-default.json +26 -0
  44. package/entities/DeviceGroups/mockdatafiles/getDevicesLite-default.json +38 -0
  45. package/entities/DeviceGroups/schema.json +21 -0
  46. package/entities/EventLogs/action.json +86 -0
  47. package/entities/EventLogs/schema.json +22 -0
  48. package/entities/FirewallPolicies/action.json +889 -0
  49. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpGroups-default.json +130 -0
  50. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpGroupsLite-default.json +94 -0
  51. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpv6Groups-default.json +111 -0
  52. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpv6GroupsLite-default.json +20 -0
  53. package/entities/FirewallPolicies/mockdatafiles/getFirewallFilteringRules-default.json +3884 -0
  54. package/entities/FirewallPolicies/mockdatafiles/getNetowrkApplicationGroups-default.json +21 -0
  55. package/entities/FirewallPolicies/mockdatafiles/getNetowrkApplicationGroupsLite-default.json +49 -0
  56. package/entities/FirewallPolicies/mockdatafiles/getNetworkApplications-default.json +20 -0
  57. package/entities/FirewallPolicies/mockdatafiles/getNetworkServiceGroups-default.json +657 -0
  58. package/entities/FirewallPolicies/mockdatafiles/getNetworkServiceGroupsLite-default.json +361 -0
  59. package/entities/FirewallPolicies/mockdatafiles/getNetworkServices-default.json +206 -0
  60. package/entities/FirewallPolicies/mockdatafiles/getNetworkServicesLite-default.json +322 -0
  61. package/entities/FirewallPolicies/mockdatafiles/getSourceIpGroups-default.json +57 -0
  62. package/entities/FirewallPolicies/mockdatafiles/getSourceIpGroupsLite-default.json +17 -0
  63. package/entities/FirewallPolicies/mockdatafiles/getSourceIpv6Groups-default.json +54 -0
  64. package/entities/FirewallPolicies/mockdatafiles/getSourceIpv6GroupsLite-default.json +15 -0
  65. package/entities/FirewallPolicies/mockdatafiles/getTimeWindowSummary-default.json +42 -0
  66. package/entities/FirewallPolicies/mockdatafiles/getTimeWindows-default.json +32 -0
  67. package/entities/FirewallPolicies/schema.json +61 -0
  68. package/entities/ForwardingControlPolicy/action.json +208 -0
  69. package/entities/ForwardingControlPolicy/mockdatafiles/getForwardingRules-default.json +2183 -0
  70. package/entities/ForwardingControlPolicy/mockdatafiles/getZpaGateways-default.json +60 -0
  71. package/entities/ForwardingControlPolicy/schema.json +28 -0
  72. package/entities/IntermediateCACertificates/action.json +455 -0
  73. package/entities/IntermediateCACertificates/mockdatafiles/getCertificatesInReadyToUseState-default.json +70 -0
  74. package/entities/IntermediateCACertificates/mockdatafiles/getIntermediateCaCertificates-default.json +19 -0
  75. package/entities/IntermediateCACertificates/mockdatafiles/getIntermediateCaCertificatesLite-default.json +53 -0
  76. package/entities/IntermediateCACertificates/schema.json +40 -0
  77. package/entities/IoTReport/action.json +88 -0
  78. package/entities/IoTReport/mockdatafiles/getCategories-default.json +22 -0
  79. package/entities/IoTReport/mockdatafiles/getClassifications-default.json +12 -0
  80. package/entities/IoTReport/mockdatafiles/getDeviceTypes-default.json +7 -0
  81. package/entities/IoTReport/schema.json +22 -0
  82. package/entities/LocationManagement/action.json +130 -0
  83. package/entities/LocationManagement/mockdatafiles/getGroups-default.json +372 -0
  84. package/entities/LocationManagement/mockdatafiles/getGroups__v1-default.json +372 -0
  85. package/entities/LocationManagement/mockdatafiles/getGroups__v2-default.json +372 -0
  86. package/entities/LocationManagement/mockdatafiles/getSubLocations-default.json +465 -0
  87. package/entities/LocationManagement/mockdatafiles/getTopLocations-default.json +191 -0
  88. package/entities/LocationManagement/schema.json +24 -0
  89. package/entities/RuleLabels/action.json +106 -0
  90. package/entities/RuleLabels/mockdatafiles/getRuleLabels-default.json +59 -0
  91. package/entities/RuleLabels/schema.json +23 -0
  92. package/entities/SandboxSettings/action.json +66 -0
  93. package/entities/SandboxSettings/schema.json +21 -0
  94. package/entities/SandboxSubmissionAPI/action.json +44 -0
  95. package/entities/SandboxSubmissionAPI/schema.json +20 -0
  96. package/entities/ShadowITReport/action.json +106 -0
  97. package/entities/ShadowITReport/mockdatafiles/getAllCustomTags-default.json +10 -0
  98. package/entities/ShadowITReport/mockdatafiles/getCloudApplicationsLite-default.json +10 -0
  99. package/entities/ShadowITReport/schema.json +23 -0
  100. package/entities/TrafficForwarding/action.json +459 -0
  101. package/entities/TrafficForwarding/mockdatafiles/getAllGreTunnels-default.json +70 -0
  102. package/entities/TrafficForwarding/mockdatafiles/getAllStaticIPs-default.json +90 -0
  103. package/entities/TrafficForwarding/mockdatafiles/getDns64Prefixes-default.json +34 -0
  104. package/entities/TrafficForwarding/mockdatafiles/getIPGWDetails-default.json +32 -0
  105. package/entities/TrafficForwarding/mockdatafiles/getNat64Prefixes-default.json +18 -0
  106. package/entities/TrafficForwarding/mockdatafiles/getRecommendedGreVips-default.json +20 -0
  107. package/entities/TrafficForwarding/mockdatafiles/getRecommendedVipsGroupedByDC-default.json +82 -0
  108. package/entities/TrafficForwarding/mockdatafiles/getRegionsByPrefix-default.json +26 -0
  109. package/entities/TrafficForwarding/mockdatafiles/getVpnCredentials-default.json +82 -0
  110. package/entities/TrafficForwarding/mockdatafiles/getVpnCredentials__v1-default.json +82 -0
  111. package/entities/TrafficForwarding/mockdatafiles/getVpnCredentials__v2-default.json +82 -0
  112. package/entities/TrafficForwarding/mockdatafiles/getZscalerNodesDetails-default.json +170 -0
  113. package/entities/TrafficForwarding/mockdatafiles/validateAndGetAvailableInternalIpRanges-default.json +18 -0
  114. package/entities/TrafficForwarding/schema.json +40 -0
  115. package/entities/URLFilteringPolicies/action.json +106 -0
  116. package/entities/URLFilteringPolicies/mockdatafiles/getUrlFilteringRules-default.json +2918 -0
  117. package/entities/URLFilteringPolicies/schema.json +23 -0
  118. package/entities/UserAuthenticationSettings/action.json +45 -0
  119. package/entities/UserAuthenticationSettings/schema.json +20 -0
  120. package/entities/WorkloadGroups/action.json +25 -0
  121. package/entities/WorkloadGroups/mockdatafiles/getWorkloadGroups-default.json +396 -0
  122. package/entities/WorkloadGroups/schema.json +19 -0
  123. package/metadata.json +29 -7
  124. package/package.json +5 -7
  125. package/pronghorn.json +17256 -0
  126. package/propertiesSchema.json +5 -0
  127. package/refs?service=git-upload-pack +0 -0
  128. package/report/adapter-openapi.json +17120 -2
  129. package/report/adapter-openapi.yaml +13753 -815
  130. package/report/adapterInfo.json +7 -7
  131. package/report/updateReport1715610332922.json +120 -0
  132. package/sampleProperties.json +40 -28
  133. package/test/integration/adapterTestIntegration.js +4883 -0
  134. package/test/unit/adapterTestUnit.js +3847 -2
package/AUTH.md CHANGED
@@ -1,39 +1,42 @@
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 Basic 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://www.itential.com/automation-platform/integrations/adapters-resources/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 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>.
4
4
 
5
- ### Basic Authentication
6
- The Adapter for Zscaler adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
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
+
7
+ ### Two Step Authentication
8
+ The Adapter for Zscaler requires Two Step Authentication based on obfuscated API key. The adapter makes request to create an authenticated session using provided username, password and apiKey. The response returns a cookie in the header called JSESSIONID that will be used in subsequent requests. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
7
9
 
8
10
  STEPS
9
11
  1. Ensure you have access to a Adapter for Zscaler server and that it is running
10
12
  2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
11
- 3. Use the properties below for the ```properties.authentication``` field
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
+ 4. Use the properties below for the ```properties.authentication``` field
12
15
  ```json
13
16
  "authentication": {
14
- "auth_method": "basic user_password",
15
- "username": "<username>",
16
- "password": "<password>",
17
- "token": "",
18
- "token_timeout": 1800000,
17
+ "auth_method": "request_token",
18
+ "username": "exampleUsername",
19
+ "password": "examplePassword",
20
+ "apiKey": "exampleApiKey",
21
+ "token_timeout": 180000,
19
22
  "token_cache": "local",
20
23
  "invalid_token_error": 401,
21
- "auth_field": "header.headers.Authorization",
22
- "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
23
- "auth_logging": false,
24
- "client_id": "",
25
- "client_secret": "",
26
- "grant_type": ""
24
+ "auth_field": "header.headers.Cookie",
25
+ "auth_field_format": "JSESSIONID={token}",
26
+ "auth_logging": false
27
27
  }
28
28
  ```
29
+ you can leave all of the other properties in the authentication section, they will not be used for request_token authentication
30
+
29
31
  4. Restart the adapter. If your properties were set correctly, the adapter should go online.
30
32
 
31
33
  ### Troubleshooting
32
- - Make sure you copied over the correct username and password.
34
+ - Make sure you copied over the correct username, password and apiKey.
33
35
  - Turn on debug level logs for the adapter in IAP Admin Essentials.
34
36
  - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
35
37
  - Investigate the logs - in particular:
36
38
  - The FULL REQUEST log to make sure the proper headers are being sent with the request.
37
39
  - The FULL BODY log to make sure the payload is accurate.
38
40
  - The CALL RETURN log to see what the other system is telling us.
41
+ - Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
39
42
  - Remember when you are done to turn auth_logging off as you do not want to log credentials.
package/BROKER.md CHANGED
@@ -22,18 +22,25 @@ Below is an example of how you may set up the properties for this call.
22
22
  {
23
23
  "path": "/{org}/get/devices",
24
24
  "method": "GET",
25
+ "pagination": {
26
+ "offsetVar": "",
27
+ "limitVar": "",
28
+ "incrementBy": "limit",
29
+ "requestLocation": "query"
30
+ },
25
31
  "query": {},
26
32
  "body": {},
27
33
  "headers": {},
28
34
  "handleFailure": "ignore",
35
+ "responseDataKey": "",
29
36
  "requestFields": {
30
37
  "org": "555"
31
38
  },
32
39
  "responseFields": {
33
- "name": "host",
34
- "ostype": "os",
40
+ "name": "{hostField}",
41
+ "ostype": "{osField}",
35
42
  "ostypePrefix": "system-",
36
- "ipaddress": "attributes.ipaddr",
43
+ "ipaddress": "{attributes.ipaddr}",
37
44
  "port": "443"
38
45
  }
39
46
  },
@@ -44,16 +51,17 @@ Below is an example of how you may set up the properties for this call.
44
51
  "body": {},
45
52
  "headers": {},
46
53
  "handleFailure": "ignore",
54
+ "responseDataKey": "",
47
55
  "requestFields": {
48
56
  "org": "777"
49
57
  },
50
58
  "responseFields": {
51
- "name": "host",
52
- "ostype": "os",
59
+ "name": "{hostField}",
60
+ "ostype": "{osField}",
53
61
  "ostypePrefix": "system-",
54
- "ipaddress": "attributes.ipaddr",
62
+ "ipaddress": "{attributes.ipaddr}",
55
63
  "port": "443",
56
- "myorg": "org"
64
+ "myorg": "{orgField}"
57
65
  }
58
66
  }
59
67
  ]
@@ -88,12 +96,13 @@ Below is an example of how you may set up the properties for this call.
88
96
  "headers": {},
89
97
  "handleFailure": "ignore",
90
98
  "statusValue": "online",
99
+ "responseDataKey": "",
91
100
  "requestFields": {
92
- "org": "myorg",
93
- "id": "name"
101
+ "org": "{myorg}",
102
+ "id": "{name}"
94
103
  },
95
104
  "responseFields": {
96
- "status": "status"
105
+ "status": "{status}"
97
106
  }
98
107
  }
99
108
  ]
@@ -129,9 +138,10 @@ Below is an example of how you may set up the properties for this call.
129
138
  "body": {},
130
139
  "headers": {},
131
140
  "handleFailure": "ignore",
141
+ "responseDataKey": "",
132
142
  "requestFields": {
133
- "org": "myorg",
134
- "id": "name"
143
+ "org": "{myorg}",
144
+ "id": "{name}"
135
145
  }
136
146
  "responseFields": {}
137
147
  },
@@ -142,8 +152,9 @@ Below is an example of how you may set up the properties for this call.
142
152
  "body": {},
143
153
  "headers": {},
144
154
  "handleFailure": "ignore",
155
+ "responseDataKey": "",
145
156
  "requestFields": {
146
- "org": "myorg"
157
+ "org": "{myorg}"
147
158
  }
148
159
  "responseFields": {}
149
160
  }
@@ -178,17 +189,18 @@ Below is an example of how you may set up the properties for this call.
178
189
  "body": {},
179
190
  "headers": {},
180
191
  "handleFailure": "ignore",
192
+ "responseDataKey": "",
181
193
  "requestFields": {
182
- "org": "myorg",
183
- "id": "name"
194
+ "org": "{myorg}",
195
+ "id": "{name}"
184
196
  },
185
197
  "responseFields": {
186
- "name": "host",
187
- "ostype": "os",
198
+ "name": "{hostField}",
199
+ "ostype": "{osField}",
188
200
  "ostypePrefix": "system-",
189
- "ipaddress": "attributes.ipaddr",
201
+ "ipaddress": "{attributes.ipaddr}",
190
202
  "port": "443",
191
- "myorg": "org"
203
+ "myorg": "{orgField}"
192
204
  }
193
205
  }
194
206
  ]