@itentialopensource/adapter-microsoft_graph 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintignore +6 -0
- package/.eslintrc.js +18 -0
- package/.gitlab/.gitkeep +0 -0
- package/.gitlab/issue_templates/.gitkeep +0 -0
- package/.gitlab/issue_templates/Default.md +17 -0
- package/.gitlab/issue_templates/bugReportTemplate.md +42 -0
- package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
- package/.jshintrc +0 -0
- package/AUTH.md +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +170 -0
- package/CHANGELOG.md +9 -0
- package/CODE_OF_CONDUCT.md +43 -0
- package/CONTRIBUTING.md +172 -0
- package/ENHANCE.md +69 -0
- package/LICENSE +201 -0
- package/PROPERTIES.md +641 -0
- package/README.md +337 -0
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +18798 -0
- package/adapterBase.js +1787 -0
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/.system/action.json +50 -0
- package/entities/.system/mockdatafiles/getToken-default.json +3 -0
- package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
- package/entities/.system/schema.json +19 -0
- package/entities/.system/schemaTokenReq.json +53 -0
- package/entities/.system/schemaTokenResp.json +53 -0
- package/entities/Applications/action.json +127 -0
- package/entities/Applications/schema.json +35 -0
- package/entities/AzureADDevice/action.json +106 -0
- package/entities/AzureADDevice/schema.json +45 -0
- package/entities/Batch/action.json +24 -0
- package/entities/Batch/schema.json +19 -0
- package/entities/CaseCreation/action.json +249 -0
- package/entities/CaseCreation/schema.json +30 -0
- package/entities/Catalog/action.json +25 -0
- package/entities/Catalog/schema.json +19 -0
- package/entities/ConnectionSetup/action.json +148 -0
- package/entities/ConnectionSetup/schema.json +25 -0
- package/entities/ContentSync/action.json +65 -0
- package/entities/ContentSync/schema.json +21 -0
- package/entities/CreateDSR/action.json +45 -0
- package/entities/CreateDSR/schema.json +20 -0
- package/entities/Deployment/action.json +106 -0
- package/entities/Deployment/schema.json +34 -0
- package/entities/DeploymentAudience/action.json +66 -0
- package/entities/DeploymentAudience/schema.json +32 -0
- package/entities/Events/action.json +108 -0
- package/entities/Events/schema.json +34 -0
- package/entities/Files/action.json +108 -0
- package/entities/Files/schema.json +23 -0
- package/entities/Groups/action.json +25 -0
- package/entities/Groups/schema.json +19 -0
- package/entities/IdentitySync/action.json +105 -0
- package/entities/IdentitySync/schema.json +23 -0
- package/entities/Insights/action.json +46 -0
- package/entities/Insights/schema.json +20 -0
- package/entities/LabelManagement/action.json +106 -0
- package/entities/LabelManagement/schema.json +23 -0
- package/entities/Mail/action.json +212 -0
- package/entities/Mail/schema.json +72 -0
- package/entities/Memberships/action.json +167 -0
- package/entities/Memberships/schema.json +70 -0
- package/entities/Misc/action.json +66 -0
- package/entities/Misc/schema.json +21 -0
- package/entities/Notebooks/action.json +107 -0
- package/entities/Notebooks/schema.json +34 -0
- package/entities/OpenExtensions/action.json +65 -0
- package/entities/OpenExtensions/schema.json +54 -0
- package/entities/People/action.json +46 -0
- package/entities/People/schema.json +31 -0
- package/entities/SchemaExtensions/action.json +65 -0
- package/entities/SchemaExtensions/schema.json +32 -0
- package/entities/Search/action.json +24 -0
- package/entities/Search/schema.json +19 -0
- package/entities/Security/action.json +151 -0
- package/entities/Security/schema.json +58 -0
- package/entities/SharePoint/action.json +214 -0
- package/entities/SharePoint/schema.json +39 -0
- package/entities/Subscriptions/action.json +65 -0
- package/entities/Subscriptions/schema.json +32 -0
- package/entities/TasksPlanner/action.json +272 -0
- package/entities/TasksPlanner/schema.json +86 -0
- package/entities/TasksTodo/action.json +187 -0
- package/entities/TasksTodo/schema.json +49 -0
- package/entities/Teams/action.json +519 -0
- package/entities/Teams/schema.json +120 -0
- package/entities/TrackDSRStatus/action.json +108 -0
- package/entities/TrackDSRStatus/schema.json +23 -0
- package/entities/TriggerEventForExistingLabel/action.json +108 -0
- package/entities/TriggerEventForExistingLabel/schema.json +23 -0
- package/entities/Users/action.json +213 -0
- package/entities/Users/schema.json +50 -0
- package/entities/WorkflowAutomation/action.json +249 -0
- package/entities/WorkflowAutomation/schema.json +30 -0
- package/error.json +190 -0
- package/package.json +87 -0
- package/pronghorn.json +8654 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +1248 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/creationReport.json +1715 -0
- package/report/graph.json +14709 -0
- package/sampleProperties.json +195 -0
- package/test/integration/adapterTestBasicGet.js +83 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +6059 -0
- package/test/unit/adapterBaseTestUnit.js +949 -0
- package/test/unit/adapterTestUnit.js +7492 -0
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +146 -0
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +178 -0
- package/utils/findPath.js +74 -0
- package/utils/methodDocumentor.js +225 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +35 -0
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +32 -0
- package/utils/removeHooks.js +20 -0
- package/utils/setup.js +33 -0
- package/utils/tbScript.js +246 -0
- package/utils/tbUtils.js +490 -0
- package/utils/testRunner.js +298 -0
- package/utils/troubleshootingAdapter.js +195 -0
- package/workflows/README.md +3 -0
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
module.exports = {
|
2
|
+
env: {
|
3
|
+
browser: true,
|
4
|
+
es6: true,
|
5
|
+
node: true
|
6
|
+
},
|
7
|
+
extends: 'airbnb-base',
|
8
|
+
plugins: [
|
9
|
+
'json'
|
10
|
+
],
|
11
|
+
parserOptions: {
|
12
|
+
sourceType: 'module'
|
13
|
+
},
|
14
|
+
rules: {
|
15
|
+
'max-len': 'warn',
|
16
|
+
'comma-dangle': ['error', 'never']
|
17
|
+
}
|
18
|
+
};
|
package/.gitlab/.gitkeep
ADDED
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Issue Report
|
2
|
+
|
3
|
+
Thanks for taking the time to fill out this issue report.
|
4
|
+
|
5
|
+
## Describe the Issue
|
6
|
+
|
7
|
+
_[A clear and concise description of what the problem is.]_
|
8
|
+
|
9
|
+
## Possible Solutions
|
10
|
+
|
11
|
+
_[List out possible suggestions on how to solve this issue if you have any.]_
|
12
|
+
|
13
|
+
### Screenshots/Video
|
14
|
+
|
15
|
+
_[If applicable, add screenshots/video to help explain or demo the issue here.]_
|
16
|
+
|
17
|
+
/assign @ishita.prakash
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Bug Report
|
2
|
+
|
3
|
+
Thanks for taking the time to fill out this bug report!
|
4
|
+
|
5
|
+
## Describe the bug
|
6
|
+
|
7
|
+
_[A clear and concise description of what the bug is.]_
|
8
|
+
|
9
|
+
## IAP Version
|
10
|
+
|
11
|
+
_[List the IAP Version that the bug is happening in.]_
|
12
|
+
|
13
|
+
## NPM Package version
|
14
|
+
|
15
|
+
_[List the npm package version.]_
|
16
|
+
|
17
|
+
## Steps To Reproduce
|
18
|
+
|
19
|
+
_[List out the exact steps to reproduce the issue here.]_
|
20
|
+
|
21
|
+
### Expected behavior
|
22
|
+
|
23
|
+
_[A clear and concise description of what you expected to happen.]_
|
24
|
+
|
25
|
+
### Current behavior
|
26
|
+
|
27
|
+
_[List out the current behavior here.]_
|
28
|
+
|
29
|
+
### Screenshots/Video
|
30
|
+
|
31
|
+
_[If applicable, add screenshots/video to help explain or demo the issue here.]_
|
32
|
+
|
33
|
+
## Possible fixes
|
34
|
+
|
35
|
+
_[If you can, link to the line of code that might be responsible for the problem.]_
|
36
|
+
|
37
|
+
## Additional context
|
38
|
+
|
39
|
+
_[Add any other context about the problem here.]_
|
40
|
+
|
41
|
+
/label ~"Issue Type::Bug"
|
42
|
+
/assign @ishita.prakash
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- markdownlint-disable MD036 -->
|
2
|
+
|
3
|
+
# Feature Request
|
4
|
+
|
5
|
+
## Describe the new feature
|
6
|
+
|
7
|
+
_[A clear and concise description of what changes you would like to see.]_
|
8
|
+
|
9
|
+
## Possible Solutions
|
10
|
+
|
11
|
+
_[List out possible suggestions on how to add this feature if you have any.]_
|
12
|
+
|
13
|
+
/label ~"Issue Type::Feature Request"
|
14
|
+
/assign @ishita.prakash
|
package/.jshintrc
ADDED
File without changes
|
package/AUTH.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
## Authenticating Microsoft_graph Adapter
|
2
|
+
|
3
|
+
This document will go through the steps for authenticating the Microsoft_graph 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>.
|
4
|
+
|
5
|
+
### Basic Authentication
|
6
|
+
The Microsoft_graph adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
|
7
|
+
|
8
|
+
STEPS
|
9
|
+
1. Ensure you have access to a Microsoft_graph server and that it is running
|
10
|
+
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
|
12
|
+
```json
|
13
|
+
"authentication": {
|
14
|
+
"auth_method": "basic user_password",
|
15
|
+
"username": "<username>",
|
16
|
+
"password": "<password>",
|
17
|
+
"token": "",
|
18
|
+
"token_timeout": 1800000,
|
19
|
+
"token_cache": "local",
|
20
|
+
"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": ""
|
27
|
+
}
|
28
|
+
```
|
29
|
+
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
30
|
+
|
31
|
+
### Troubleshooting
|
32
|
+
- Make sure you copied over the correct username and password.
|
33
|
+
- Turn on debug level logs for the adapter in IAP Admin Essentials.
|
34
|
+
- Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
|
35
|
+
- Investigate the logs - in particular:
|
36
|
+
- The FULL REQUEST log to make sure the proper headers are being sent with the request.
|
37
|
+
- The FULL BODY log to make sure the payload is accurate.
|
38
|
+
- The CALL RETURN log to see what the other system is telling us.
|
39
|
+
- Remember when you are done to turn auth_logging off as you do not want to log credentials.
|
package/BROKER.md
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
## Integrating Microsoft_graph Adapter with IAP Device Broker
|
2
|
+
|
3
|
+
This document will go through the steps for integrating the Microsoft_graph 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.
|
4
|
+
|
5
|
+
### getDevicesFiltered
|
6
|
+
getDevicesFiltered(options, callback) → This call returns all of the devices within Microsoft_graph that match the provided filter.
|
7
|
+
|
8
|
+
#### input
|
9
|
+
|
10
|
+
options {object}: defines the options for the search. At current filter is the most important one. The filter can contain the device name (e.g. the options can be { filter: { name: [‘abc’, ‘def’] }}. The adapter currently filters by doing a contains on the name(s) provided in the array and not an exact match. So deviceabc will be returned when this filter is applied. In many adapters, other options (start, limit, sort and order) are not implemented.
|
11
|
+
|
12
|
+
#### output
|
13
|
+
|
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
|
+
|
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.
|
17
|
+
|
18
|
+
Below is an example of how you may set up the properties for this call.
|
19
|
+
|
20
|
+
```json
|
21
|
+
"getDevicesFiltered": [
|
22
|
+
{
|
23
|
+
"path": "/{org}/get/devices",
|
24
|
+
"method": "GET",
|
25
|
+
"query": {},
|
26
|
+
"body": {},
|
27
|
+
"headers": {},
|
28
|
+
"handleFailure": "ignore",
|
29
|
+
"requestFields": {
|
30
|
+
"org": "555"
|
31
|
+
},
|
32
|
+
"responseFields": {
|
33
|
+
"name": "host",
|
34
|
+
"ostype": "os",
|
35
|
+
"ostypePrefix": "system-",
|
36
|
+
"ipaddress": "attributes.ipaddr",
|
37
|
+
"port": "443"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"path": "/{org}/get/devices",
|
42
|
+
"method": "GET",
|
43
|
+
"query": {},
|
44
|
+
"body": {},
|
45
|
+
"headers": {},
|
46
|
+
"handleFailure": "ignore",
|
47
|
+
"requestFields": {
|
48
|
+
"org": "777"
|
49
|
+
},
|
50
|
+
"responseFields": {
|
51
|
+
"name": "host",
|
52
|
+
"ostype": "os",
|
53
|
+
"ostypePrefix": "system-",
|
54
|
+
"ipaddress": "attributes.ipaddr",
|
55
|
+
"port": "443",
|
56
|
+
"myorg": "org"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
]
|
60
|
+
```
|
61
|
+
|
62
|
+
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.
|
63
|
+
|
64
|
+
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.
|
65
|
+
|
66
|
+
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.
|
67
|
+
|
68
|
+
### isAlive
|
69
|
+
isAlive(deviceName, callback) → This call returns whether the device provided is operational.
|
70
|
+
|
71
|
+
input
|
72
|
+
|
73
|
+
deviceName {string}: the name of the device to get details of. The adapter will always call getDevicesFiltered first with this name in the filter in order to get any additional details it needs for this call (e.g. id).
|
74
|
+
|
75
|
+
output
|
76
|
+
|
77
|
+
A boolean value. This usually needs to be determined from a particular field in the data returned from the other system. This is where definind a status value and a status field is critical to properly configuring the call.
|
78
|
+
|
79
|
+
Below is an example of how you may set up the properties for this call.
|
80
|
+
|
81
|
+
```json
|
82
|
+
"isAlive": [
|
83
|
+
{
|
84
|
+
"path": "/{org}/get/devices/{id}/status",
|
85
|
+
"method": "GET",
|
86
|
+
"query": {},
|
87
|
+
"body": {},
|
88
|
+
"headers": {},
|
89
|
+
"handleFailure": "ignore",
|
90
|
+
"statusValue": "online",
|
91
|
+
"requestFields": {
|
92
|
+
"org": "myorg",
|
93
|
+
"id": "name"
|
94
|
+
},
|
95
|
+
"responseFields": {
|
96
|
+
"status": "status"
|
97
|
+
}
|
98
|
+
}
|
99
|
+
]
|
100
|
+
```
|
101
|
+
|
102
|
+
Notice with the requestFields, it will use the org and name that it got from the response of the getDevicesFiltered call to complete the path for the call.
|
103
|
+
|
104
|
+
Notice with the responseFields, it use the status field that came back and test to see if the value is online since that is what you defined as the statusValue. If it is it will return true otherwise it will return false.
|
105
|
+
|
106
|
+
You could have multiple calls here if needed but generally that will not be the case.
|
107
|
+
|
108
|
+
### getConfig
|
109
|
+
getConfig(deviceName, format, callback) → This call returns the configuration for the device. This can be a simple call or a complex/multiple calls to get all of the “configuration” desirable.
|
110
|
+
|
111
|
+
input
|
112
|
+
|
113
|
+
deviceName {string}: the name of the device to get details of. The adapter will always call getDevicesFiltered first with this name in the filter in order to get any additional details it needs for this call (e.g. id).
|
114
|
+
|
115
|
+
format {string}: is an optional format you want provided back. Most adapters do not support formats by default and just return the “stringified” json object.
|
116
|
+
|
117
|
+
output
|
118
|
+
|
119
|
+
An object containing a response field which has the value of the stringified config (e.g. { response: ‘stringified configuration data’ }
|
120
|
+
|
121
|
+
Below is an example of how you may set up the properties for this call.
|
122
|
+
|
123
|
+
```json
|
124
|
+
"getConfig": [
|
125
|
+
{
|
126
|
+
"path": "/{org}/get/devices/{id}/configPart1",
|
127
|
+
"method": "GET",
|
128
|
+
"query": {},
|
129
|
+
"body": {},
|
130
|
+
"headers": {},
|
131
|
+
"handleFailure": "ignore",
|
132
|
+
"requestFields": {
|
133
|
+
"org": "myorg",
|
134
|
+
"id": "name"
|
135
|
+
}
|
136
|
+
"responseFields": {}
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"path": "/{org}/get/devices/configPart2",
|
140
|
+
"method": "GET",
|
141
|
+
"query": {},
|
142
|
+
"body": {},
|
143
|
+
"headers": {},
|
144
|
+
"handleFailure": "ignore",
|
145
|
+
"requestFields": {
|
146
|
+
"org": "myorg"
|
147
|
+
}
|
148
|
+
"responseFields": {}
|
149
|
+
}
|
150
|
+
]
|
151
|
+
```
|
152
|
+
|
153
|
+
The example above shows multiple calls. With the handleFailure property set to ignore, if one of the calls fails, the adapter will still send the response with that configuration missing. If you want it to fail set the handleFailure property to fail.
|
154
|
+
|
155
|
+
There is no limit on the number of calls you can make however understand that the adapter will make all of these calls prior to providing a response so there can be performance implications.
|
156
|
+
|
157
|
+
### getDevice - may be deprecated
|
158
|
+
getDevice(deviceName, callback) → This call returns details of the device provided. In many systems the getDevicesFiltered only returns summary information and so we also want a more detailed call to get device details.
|
159
|
+
|
160
|
+
input
|
161
|
+
|
162
|
+
deviceName {string}: the name of the device to get details of. The adapter will always call getDevicesFiltered first with this name in the filter in order to get any additional details it needs for this call (e.g. id).
|
163
|
+
|
164
|
+
output
|
165
|
+
|
166
|
+
An Object containing the details of the device. The object should contain at least the same information that was provided in the getDevicesFiltered call (e.g. the fields name, ostype, port and ipaddress should be mapped in the adapter properties to data from the other system) and may contain many more details about the device.
|
167
|
+
|
168
|
+
Below is an example of how you may set up the properties for this call.
|
169
|
+
|
170
|
+
```json
|
171
|
+
"getDevice": [
|
172
|
+
{
|
173
|
+
"path": "/{org}/get/device",
|
174
|
+
"method": "GET",
|
175
|
+
"query": {
|
176
|
+
"id": "{id}"
|
177
|
+
},
|
178
|
+
"body": {},
|
179
|
+
"headers": {},
|
180
|
+
"handleFailure": "ignore",
|
181
|
+
"requestFields": {
|
182
|
+
"org": "myorg",
|
183
|
+
"id": "name"
|
184
|
+
},
|
185
|
+
"responseFields": {
|
186
|
+
"name": "host",
|
187
|
+
"ostype": "os",
|
188
|
+
"ostypePrefix": "system-",
|
189
|
+
"ipaddress": "attributes.ipaddr",
|
190
|
+
"port": "443",
|
191
|
+
"myorg": "org"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
]
|
195
|
+
```
|
196
|
+
|
197
|
+
In this example, we show a query parameter being used. Notice that the value is still provided via the requestFields and then like with the path, we use curly braces in the query to denote a variable. The body and header variables work in this same manner.
|
198
|
+
|
199
|
+
You could have multiple calls here if needed but generally that will not be the case.
|
package/CALLS.md
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
## Using this Adapter
|
2
|
+
|
3
|
+
The `adapter.js` file contains the calls the adapter makes available to the rest of the Itential Platform. The API detailed for these calls should be available through JSDOC. The following is a brief summary of the calls.
|
4
|
+
|
5
|
+
### Generic Adapter Calls
|
6
|
+
|
7
|
+
These are adapter methods that IAP or you might use. There are some other methods not shown here that might be used for internal adapter functionality.
|
8
|
+
|
9
|
+
<table border="1" class="bordered-table">
|
10
|
+
<tr>
|
11
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
|
12
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
13
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td style="padding:15px">connect()</td>
|
17
|
+
<td style="padding:15px">This call is run when the Adapter is first loaded by he Itential Platform. It validates the properties have been provided correctly.</td>
|
18
|
+
<td style="padding:15px">No</td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td style="padding:15px">healthCheck(callback)</td>
|
22
|
+
<td style="padding:15px">This call ensures that the adapter can communicate with Microsoft_graph. The actual call that is used is defined in the adapter properties and .system entities action.json file.</td>
|
23
|
+
<td style="padding:15px">No</td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td style="padding:15px">refreshProperties(properties)</td>
|
27
|
+
<td style="padding:15px">This call provides the adapter the ability to accept property changes without having to restart the adapter.</td>
|
28
|
+
<td style="padding:15px">No</td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td style="padding:15px">encryptProperty(property, technique, callback)</td>
|
32
|
+
<td style="padding:15px">This call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Microsoft_graph.</td>
|
33
|
+
<td style="padding:15px">No</td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td style="padding:15px">iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback)</td>
|
37
|
+
<td style="padding:15px">This call provides the ability to update the adapter configuration from IAP - includes actions, schema, mockdata and other configurations.</td>
|
38
|
+
<td style="padding:15px">Yes</td>
|
39
|
+
</tr>
|
40
|
+
<tr>
|
41
|
+
<td style="padding:15px">iapFindAdapterPath(apiPath, callback)</td>
|
42
|
+
<td style="padding:15px">This call provides the ability to see if a particular API path is supported by the adapter.</td>
|
43
|
+
<td style="padding:15px">Yes</td>
|
44
|
+
</tr>
|
45
|
+
<tr>
|
46
|
+
<td style="padding:15px">iapSuspendAdapter(mode, callback)</td>
|
47
|
+
<td style="padding:15px">This call provides the ability to suspend the adapter and either have requests rejected or put into a queue to be processed after the adapter is resumed.</td>
|
48
|
+
<td style="padding:15px">Yes</td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td style="padding:15px">iapUnsuspendAdapter(callback)</td>
|
52
|
+
<td style="padding:15px">This call provides the ability to resume a suspended adapter. Any requests in queue will be processed before new requests.</td>
|
53
|
+
<td style="padding:15px">Yes</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td style="padding:15px">iapGetAdapterQueue(callback)</td>
|
57
|
+
<td style="padding:15px">This call will return the requests that are waiting in the queue if throttling is enabled.</td>
|
58
|
+
<td style="padding:15px">Yes</td>
|
59
|
+
</tr>
|
60
|
+
<tr>
|
61
|
+
<td style="padding:15px">iapTroubleshootAdapter(props, persistFlag, adapter, callback)</td>
|
62
|
+
<td style="padding:15px">This call can be used to check on the performance of the adapter - it checks connectivity, healthcheck and basic get calls.</td>
|
63
|
+
<td style="padding:15px">Yes</td>
|
64
|
+
</tr>
|
65
|
+
|
66
|
+
<tr>
|
67
|
+
<td style="padding:15px">iapRunAdapterHealthcheck(adapter, callback)</td>
|
68
|
+
<td style="padding:15px">This call will return the results of a healthcheck.</td>
|
69
|
+
<td style="padding:15px">Yes</td>
|
70
|
+
</tr>
|
71
|
+
<tr>
|
72
|
+
<td style="padding:15px">iapRunAdapterConnectivity(callback)</td>
|
73
|
+
<td style="padding:15px">This call will return the results of a connectivity check.</td>
|
74
|
+
<td style="padding:15px">Yes</td>
|
75
|
+
</tr>
|
76
|
+
<tr>
|
77
|
+
<td style="padding:15px">iapRunAdapterBasicGet(callback)</td>
|
78
|
+
<td style="padding:15px">This call will return the results of running basic get API calls.</td>
|
79
|
+
<td style="padding:15px">Yes</td>
|
80
|
+
</tr>
|
81
|
+
<tr>
|
82
|
+
<td style="padding:15px">iapMoveAdapterEntitiesToDB(callback)</td>
|
83
|
+
<td style="padding:15px">This call will push the adapter configuration from the entities directory into the Adapter or IAP Database.</td>
|
84
|
+
<td style="padding:15px">Yes</td>
|
85
|
+
</tr>
|
86
|
+
<tr>
|
87
|
+
<td style="padding:15px">genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td>
|
88
|
+
<td style="padding:15px">This call allows you to provide the path to have the adapter call. It is an easy way to incorporate paths that have not been built into the adapter yet.</td>
|
89
|
+
<td style="padding:15px">Yes</td>
|
90
|
+
</tr>
|
91
|
+
<tr>
|
92
|
+
<td style="padding:15px">genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td>
|
93
|
+
<td style="padding:15px">This call is the same as the genericAdapterRequest only it does not add a base_path or version to the call.</td>
|
94
|
+
<td style="padding:15px">Yes</td>
|
95
|
+
</tr>
|
96
|
+
<tr>
|
97
|
+
<td style="padding:15px">iapHasAdapterEntity(entityType, entityId, callback)</td>
|
98
|
+
<td style="padding:15px">This call verifies the adapter has the specific entity.</td>
|
99
|
+
<td style="padding:15px">No</td>
|
100
|
+
</tr>
|
101
|
+
<tr>
|
102
|
+
<td style="padding:15px">iapVerifyAdapterCapability(entityType, actionType, entityId, callback)</td>
|
103
|
+
<td style="padding:15px">This call verifies the adapter can perform the provided action on the specific entity.</td>
|
104
|
+
<td style="padding:15px">No</td>
|
105
|
+
</tr>
|
106
|
+
<tr>
|
107
|
+
<td style="padding:15px">iapUpdateAdapterEntityCache()</td>
|
108
|
+
<td style="padding:15px">This call will update the entity cache.</td>
|
109
|
+
<td style="padding:15px">No</td>
|
110
|
+
</tr>
|
111
|
+
</table>
|
112
|
+
<br>
|
113
|
+
|
114
|
+
### Adapter Broker Calls
|
115
|
+
|
116
|
+
These are adapter methods that are used to integrate to IAP Brokers. This adapter currently supports the following broker calls.
|
117
|
+
|
118
|
+
<table border="1" class="bordered-table">
|
119
|
+
<tr>
|
120
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
|
121
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
122
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
|
123
|
+
</tr>
|
124
|
+
<tr>
|
125
|
+
<td style="padding:15px">hasEntities(entityType, entityList, callback)</td>
|
126
|
+
<td style="padding:15px">This call is utilized by the IAP Device Broker to determine if the adapter has a specific entity and item of the entity.</td>
|
127
|
+
<td style="padding:15px">No</td>
|
128
|
+
</tr>
|
129
|
+
<tr>
|
130
|
+
<td style="padding:15px">getDevice(deviceName, callback)</td>
|
131
|
+
<td style="padding:15px">This call returns the details of the requested device.</td>
|
132
|
+
<td style="padding:15px">Yes</td>
|
133
|
+
</tr>
|
134
|
+
<tr>
|
135
|
+
<td style="padding:15px">getDevicesFiltered(options, callback)</td>
|
136
|
+
<td style="padding:15px">This call returns the list of devices that match the criteria provided in the options filter.</td>
|
137
|
+
<td style="padding:15px">Yes</td>
|
138
|
+
</tr>
|
139
|
+
<tr>
|
140
|
+
<td style="padding:15px">isAlive(deviceName, callback)</td>
|
141
|
+
<td style="padding:15px">This call returns whether the device status is active</td>
|
142
|
+
<td style="padding:15px">Yes</td>
|
143
|
+
</tr>
|
144
|
+
<tr>
|
145
|
+
<td style="padding:15px">getConfig(deviceName, format, callback)</td>
|
146
|
+
<td style="padding:15px">This call returns the configuration for the selected device.</td>
|
147
|
+
<td style="padding:15px">Yes</td>
|
148
|
+
</tr>
|
149
|
+
<tr>
|
150
|
+
<td style="padding:15px">iapGetDeviceCount(callback)</td>
|
151
|
+
<td style="padding:15px">This call returns the count of devices.</td>
|
152
|
+
<td style="padding:15px">Yes</td>
|
153
|
+
</tr>
|
154
|
+
</table>
|
155
|
+
<br>
|
156
|
+
|
157
|
+
|
158
|
+
### Specific Adapter Calls
|
159
|
+
|
160
|
+
Specific adapter calls are built based on the API of the Microsoft_graph. The Adapter Builder creates the proper method comments for generating JS-DOC for the adapter. This is the best way to get information on the calls.
|
161
|
+
|
162
|
+
<table border="1" class="bordered-table">
|
163
|
+
<tr>
|
164
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
|
165
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
166
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Path</span></th>
|
167
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
|
168
|
+
</tr>
|
169
|
+
</table>
|
170
|
+
<br>
|
package/CHANGELOG.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
## Our Standards
|
8
|
+
|
9
|
+
Examples of behavior that contributes to creating a positive environment include:
|
10
|
+
|
11
|
+
- Using welcoming and inclusive language
|
12
|
+
- Being respectful of differing viewpoints and experiences
|
13
|
+
- Gracefully accepting constructive criticism
|
14
|
+
- Focusing on what is best for the community
|
15
|
+
- Showing empathy towards other community members
|
16
|
+
|
17
|
+
Examples of unacceptable behavior by participants include:
|
18
|
+
|
19
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
20
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
21
|
+
- Public or private harassment
|
22
|
+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
23
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
24
|
+
|
25
|
+
## Our Responsibilities
|
26
|
+
|
27
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
28
|
+
|
29
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
30
|
+
|
31
|
+
## Scope
|
32
|
+
|
33
|
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
34
|
+
|
35
|
+
## Enforcement
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@itential.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
38
|
+
|
39
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
40
|
+
|
41
|
+
## Attribution
|
42
|
+
|
43
|
+
This Code of Conduct is adapted from the <a href="http://contributor-covenant.org" target="_blank">Contributor Covenant</a>, version 1.4, available at <a href="http://contributor-covenant.org/version/1/4/" target="_blank">version</a>
|