@itentialopensource/adapter-zero_networks 0.1.2 → 0.2.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/.eslintignore +0 -1
- package/.jshintrc +3 -0
- package/AUTH.md +14 -18
- package/BROKER.md +31 -19
- package/CALLS.md +1175 -23
- package/CHANGELOG.md +8 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +14 -6
- package/TAB1.md +8 -0
- package/TAB2.md +83 -6564
- package/adapter.js +16661 -39
- package/entities/Asset/action.json +872 -0
- package/entities/Asset/schema.json +43 -1
- package/entities/AssetOTIoT/action.json +851 -0
- package/entities/AssetOTIoT/schema.json +42 -1
- package/entities/Assets/action.json +83 -0
- package/entities/Assets/schema.json +5 -1
- package/entities/Download/action.json +88 -0
- package/entities/Download/schema.json +22 -0
- package/entities/Group/action.json +518 -0
- package/entities/Group/schema.json +26 -1
- package/entities/Groups/action.json +354 -0
- package/entities/Groups/schema.json +18 -1
- package/entities/GroupsCustom/action.json +20 -0
- package/entities/GroupsCustom/schema.json +2 -1
- package/entities/GroupsTag/action.json +45 -0
- package/entities/GroupsTag/schema.json +20 -0
- package/entities/MFAIdentity/action.json +295 -0
- package/entities/MFAIdentity/schema.json +32 -0
- package/entities/MFAInbound/action.json +21 -0
- package/entities/MFAInbound/schema.json +2 -1
- package/entities/MFAOutbound/action.json +21 -0
- package/entities/MFAOutbound/schema.json +2 -1
- package/entities/Rules/action.json +40 -0
- package/entities/Rules/schema.json +3 -1
- package/entities/RulesInbound/action.json +293 -0
- package/entities/RulesInbound/schema.json +32 -0
- package/entities/RulesOutboundAllow/action.json +21 -0
- package/entities/RulesOutboundAllow/schema.json +2 -1
- package/entities/SettingsInactiveAssets/action.json +45 -0
- package/entities/SettingsInactiveAssets/schema.json +20 -0
- package/entities/SettingsLicenses/action.json +25 -0
- package/entities/SettingsLicenses/schema.json +19 -0
- package/entities/User/action.json +291 -0
- package/entities/User/schema.json +15 -1
- package/entities/Users/action.json +21 -0
- package/entities/Users/schema.json +2 -1
- package/metadata.json +14 -3
- package/package.json +5 -7
- package/pronghorn.json +12801 -490
- package/propertiesSchema.json +133 -36
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +115977 -0
- package/report/adapterInfo.json +7 -7
- package/report/updateReport1715609939167.json +120 -0
- package/sampleProperties.json +43 -31
- package/test/integration/adapterTestIntegration.js +4700 -0
- package/test/unit/adapterTestUnit.js +8580 -3
- package/utils/artifactize.js +0 -0
package/.eslintignore
CHANGED
package/.jshintrc
CHANGED
package/AUTH.md
CHANGED
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
## Authenticating
|
|
1
|
+
## Authenticating Zero Networks Adapter
|
|
2
2
|
|
|
3
|
-
This document will go through the steps for authenticating the
|
|
3
|
+
This document will go through the steps for authenticating the Zero Networks adapter with API Key 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
|
-
|
|
6
|
-
|
|
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
|
+
### API Key Authentication
|
|
8
|
+
The Zero Networks adapter authenticates using an API Key.
|
|
7
9
|
|
|
8
10
|
STEPS
|
|
9
|
-
1. Ensure you have access to a
|
|
11
|
+
1. Ensure you have access to a Zero Networks 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
13
|
3. Use the properties below for the ```properties.authentication``` field
|
|
12
14
|
```json
|
|
13
15
|
"authentication": {
|
|
14
|
-
"auth_method": "
|
|
15
|
-
"
|
|
16
|
-
"password": "<password>",
|
|
17
|
-
"token": "",
|
|
18
|
-
"token_timeout": 1800000,
|
|
19
|
-
"token_cache": "local",
|
|
20
|
-
"invalid_token_error": 401,
|
|
16
|
+
"auth_method": "static_token",
|
|
17
|
+
"token": "<your_token>",
|
|
21
18
|
"auth_field": "header.headers.Authorization",
|
|
22
|
-
"auth_field_format": "
|
|
23
|
-
"auth_logging": false
|
|
24
|
-
"client_id": "",
|
|
25
|
-
"client_secret": "",
|
|
26
|
-
"grant_type": ""
|
|
19
|
+
"auth_field_format": "{token}",
|
|
20
|
+
"auth_logging": false
|
|
27
21
|
}
|
|
28
22
|
```
|
|
23
|
+
you can leave all of the other properties in the authentication section, they will not be used when the auth_method is static_token.
|
|
29
24
|
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
|
30
25
|
|
|
31
26
|
### Troubleshooting
|
|
32
|
-
- Make sure you copied over the correct
|
|
27
|
+
- Make sure you copied over the correct token.
|
|
33
28
|
- Turn on debug level logs for the adapter in IAP Admin Essentials.
|
|
34
29
|
- Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
|
|
35
30
|
- Investigate the logs - in particular:
|
|
36
31
|
- The FULL REQUEST log to make sure the proper headers are being sent with the request.
|
|
37
32
|
- The FULL BODY log to make sure the payload is accurate.
|
|
38
33
|
- The CALL RETURN log to see what the other system is telling us.
|
|
34
|
+
- Credentials should be ** masked ** by the adapter so make sure you verify token
|
|
39
35
|
- 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": "
|
|
34
|
-
"ostype": "
|
|
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": "
|
|
52
|
-
"ostype": "
|
|
59
|
+
"name": "{hostField}",
|
|
60
|
+
"ostype": "{osField}",
|
|
53
61
|
"ostypePrefix": "system-",
|
|
54
|
-
"ipaddress": "attributes.ipaddr",
|
|
62
|
+
"ipaddress": "{attributes.ipaddr}",
|
|
55
63
|
"port": "443",
|
|
56
|
-
"myorg": "
|
|
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": "
|
|
187
|
-
"ostype": "
|
|
198
|
+
"name": "{hostField}",
|
|
199
|
+
"ostype": "{osField}",
|
|
188
200
|
"ostypePrefix": "system-",
|
|
189
|
-
"ipaddress": "attributes.ipaddr",
|
|
201
|
+
"ipaddress": "{attributes.ipaddr}",
|
|
190
202
|
"port": "443",
|
|
191
|
-
"myorg": "
|
|
203
|
+
"myorg": "{orgField}"
|
|
192
204
|
}
|
|
193
205
|
}
|
|
194
206
|
]
|