@itentialopensource/adapter-aws_lambda 0.1.1 → 0.1.2
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/TAB1.md +8 -0
- package/TAB2.md +328 -0
- package/package.json +2 -2
- package/report/auto-adapter-openapi.json +3130 -0
package/TAB1.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
This adapter is used to integrate the Itential Platform with the Aws_lambda System. The API that was used to build the adapter for Aws_lambda is usually available in the report directory of this adapter. The adapter utilizes the Aws_lambda API to provide the integrations that are deemed pertinent to Itential Platform. The ReadMe file is intended to provide information on this adapter it is generated from various other Markdown files.
|
|
4
|
+
|
|
5
|
+
## Details
|
|
6
|
+
This adapter from Itential is used to integrate the Itential Platform with Aws_lambda. With this adapter you have the ability to perform operations such as:
|
|
7
|
+
|
|
8
|
+
For further technical details on how to install and use this adapter, please click the Technical Documentation tab.
|
package/TAB2.md
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Aws_lambda
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
- [Specific Adapter Information](#specific-adapter-information)
|
|
6
|
+
- [Authentication](#authentication)
|
|
7
|
+
- [Sample Properties](#sample-properties)
|
|
8
|
+
- [Swagger](#swagger)
|
|
9
|
+
- [Generic Adapter Information](#generic-adapter-information)
|
|
10
|
+
|
|
11
|
+
## Specific Adapter Information
|
|
12
|
+
### Authentication
|
|
13
|
+
|
|
14
|
+
This document will go through the steps for authenticating the Aws_lambda adapter with Basic 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>.
|
|
15
|
+
|
|
16
|
+
#### Basic Authentication
|
|
17
|
+
The Aws_lambda adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
|
|
18
|
+
|
|
19
|
+
STEPS
|
|
20
|
+
1. Ensure you have access to a Aws_lambda server and that it is running
|
|
21
|
+
2. Follow the steps in the README.md to import the adapter into Itential Platform if you have not already done so
|
|
22
|
+
3. Use the properties below for the ```properties.authentication``` field
|
|
23
|
+
```json
|
|
24
|
+
"authentication": {
|
|
25
|
+
"auth_method": "basic user_password",
|
|
26
|
+
"username": "<username>",
|
|
27
|
+
"password": "<password>",
|
|
28
|
+
"token": "",
|
|
29
|
+
"token_timeout": 1800000,
|
|
30
|
+
"token_cache": "local",
|
|
31
|
+
"invalid_token_error": 401,
|
|
32
|
+
"auth_field": "header.headers.Authorization",
|
|
33
|
+
"auth_field_format": "Basic {b64}{username}:{password}{/b64}",
|
|
34
|
+
"auth_logging": false,
|
|
35
|
+
"client_id": "",
|
|
36
|
+
"client_secret": "",
|
|
37
|
+
"grant_type": ""
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
|
41
|
+
|
|
42
|
+
#### Troubleshooting
|
|
43
|
+
- Make sure you copied over the correct username and password.
|
|
44
|
+
- Turn on debug level logs for the adapter in Itential Platform Admin Essentials.
|
|
45
|
+
- Turn on auth_logging for the adapter in Itential Platform Admin Essentials (adapter properties).
|
|
46
|
+
- Investigate the logs - in particular:
|
|
47
|
+
- The FULL REQUEST log to make sure the proper headers are being sent with the request.
|
|
48
|
+
- The FULL BODY log to make sure the payload is accurate.
|
|
49
|
+
- The CALL RETURN log to see what the other system is telling us.
|
|
50
|
+
- Remember when you are done to turn auth_logging off as you do not want to log credentials.
|
|
51
|
+
|
|
52
|
+
### Sample Properties
|
|
53
|
+
|
|
54
|
+
Sample Properties can be used to help you configure the adapter in the Itential Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
"properties": {
|
|
58
|
+
"host": "lambda.amazonaws.com",
|
|
59
|
+
"region": "us-east-1",
|
|
60
|
+
"port": 80,
|
|
61
|
+
"choosepath": "",
|
|
62
|
+
"base_path": "/",
|
|
63
|
+
"version": "",
|
|
64
|
+
"cache_location": "none",
|
|
65
|
+
"encode_pathvars": true,
|
|
66
|
+
"encode_queryvars": true,
|
|
67
|
+
"save_metric": false,
|
|
68
|
+
"stub": true,
|
|
69
|
+
"protocol": "http",
|
|
70
|
+
"authentication": {
|
|
71
|
+
"auth_method": "aws_authentication",
|
|
72
|
+
"username": "username",
|
|
73
|
+
"password": "password",
|
|
74
|
+
"token": "token",
|
|
75
|
+
"token_timeout": 600000,
|
|
76
|
+
"token_cache": "local",
|
|
77
|
+
"invalid_token_error": 401,
|
|
78
|
+
"auth_field": "header.headers.Authorization",
|
|
79
|
+
"auth_field_format": "Basic {b64}{username}:{password}{/b64}",
|
|
80
|
+
"auth_logging": false,
|
|
81
|
+
"client_id": "",
|
|
82
|
+
"client_secret": "",
|
|
83
|
+
"grant_type": "",
|
|
84
|
+
"sensitive": [],
|
|
85
|
+
"sso": {
|
|
86
|
+
"protocol": "",
|
|
87
|
+
"host": "",
|
|
88
|
+
"port": 0
|
|
89
|
+
},
|
|
90
|
+
"multiStepAuthCalls": [
|
|
91
|
+
{
|
|
92
|
+
"name": "",
|
|
93
|
+
"requestFields": {},
|
|
94
|
+
"responseFields": {},
|
|
95
|
+
"successfullResponseCode": 200
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"aws_access_key": "aws_access_key",
|
|
99
|
+
"aws_secret_key": "aws_secret_key",
|
|
100
|
+
"aws_session_token": "aws_session_token",
|
|
101
|
+
"aws_iam_role": "",
|
|
102
|
+
"aws_sts": {
|
|
103
|
+
"region": "us-east-1",
|
|
104
|
+
"sslEnable": true,
|
|
105
|
+
"endpoint": "",
|
|
106
|
+
"proxy": "",
|
|
107
|
+
"proxyagent": "",
|
|
108
|
+
"use_proxy_for_initial_auth": false,
|
|
109
|
+
"externalId": ""
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"healthcheck": {
|
|
113
|
+
"type": "none",
|
|
114
|
+
"frequency": 60000,
|
|
115
|
+
"query_object": {},
|
|
116
|
+
"addlHeaders": {}
|
|
117
|
+
},
|
|
118
|
+
"throttle": {
|
|
119
|
+
"throttle_enabled": false,
|
|
120
|
+
"number_pronghorns": 1,
|
|
121
|
+
"sync_async": "sync",
|
|
122
|
+
"max_in_queue": 1000,
|
|
123
|
+
"concurrent_max": 1,
|
|
124
|
+
"expire_timeout": 0,
|
|
125
|
+
"avg_runtime": 200,
|
|
126
|
+
"priorities": [
|
|
127
|
+
{
|
|
128
|
+
"value": 0,
|
|
129
|
+
"percent": 100
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"request": {
|
|
134
|
+
"number_redirects": 0,
|
|
135
|
+
"number_retries": 3,
|
|
136
|
+
"limit_retry_error": [
|
|
137
|
+
0
|
|
138
|
+
],
|
|
139
|
+
"failover_codes": [],
|
|
140
|
+
"attempt_timeout": 5000,
|
|
141
|
+
"global_request": {
|
|
142
|
+
"payload": {},
|
|
143
|
+
"uriOptions": {},
|
|
144
|
+
"addlHeaders": {},
|
|
145
|
+
"authData": {}
|
|
146
|
+
},
|
|
147
|
+
"healthcheck_on_timeout": true,
|
|
148
|
+
"return_raw": false,
|
|
149
|
+
"archiving": false,
|
|
150
|
+
"return_request": false
|
|
151
|
+
},
|
|
152
|
+
"proxy": {
|
|
153
|
+
"enabled": false,
|
|
154
|
+
"host": "",
|
|
155
|
+
"port": 1,
|
|
156
|
+
"protocol": "http",
|
|
157
|
+
"username": "",
|
|
158
|
+
"password": ""
|
|
159
|
+
},
|
|
160
|
+
"ssl": {
|
|
161
|
+
"ecdhCurve": "",
|
|
162
|
+
"enabled": false,
|
|
163
|
+
"accept_invalid_cert": false,
|
|
164
|
+
"ca_file": "",
|
|
165
|
+
"key_file": "",
|
|
166
|
+
"cert_file": "",
|
|
167
|
+
"secure_protocol": "",
|
|
168
|
+
"ciphers": ""
|
|
169
|
+
},
|
|
170
|
+
"mongo": {
|
|
171
|
+
"url": "",
|
|
172
|
+
"host": "",
|
|
173
|
+
"port": 0,
|
|
174
|
+
"database": "",
|
|
175
|
+
"dbAuth": false,
|
|
176
|
+
"username": "",
|
|
177
|
+
"password": "",
|
|
178
|
+
"replSet": "",
|
|
179
|
+
"addSrv": false,
|
|
180
|
+
"db_ssl": {
|
|
181
|
+
"enabled": false,
|
|
182
|
+
"accept_invalid_cert": false,
|
|
183
|
+
"ca_file": "",
|
|
184
|
+
"key_file": "",
|
|
185
|
+
"cert_file": ""
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"devicebroker": {
|
|
189
|
+
"enabled": false,
|
|
190
|
+
"getDevice": [
|
|
191
|
+
{
|
|
192
|
+
"path": "/get/devices/{id}",
|
|
193
|
+
"method": "GET",
|
|
194
|
+
"query": {},
|
|
195
|
+
"body": {},
|
|
196
|
+
"headers": {},
|
|
197
|
+
"handleFailure": "fail",
|
|
198
|
+
"requestFields": {
|
|
199
|
+
"id": "name"
|
|
200
|
+
},
|
|
201
|
+
"responseDatakey": "",
|
|
202
|
+
"responseFields": {
|
|
203
|
+
"name": "host",
|
|
204
|
+
"ostype": "os",
|
|
205
|
+
"ostypePrefix": "system-",
|
|
206
|
+
"ipaddress": "attributes.ipaddr",
|
|
207
|
+
"port": "443"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"getDevicesFiltered": [
|
|
212
|
+
{
|
|
213
|
+
"path": "/get/devices",
|
|
214
|
+
"method": "GET",
|
|
215
|
+
"pagination": {
|
|
216
|
+
"offsetVar": "",
|
|
217
|
+
"limitVar": "",
|
|
218
|
+
"incrementBy": "limit",
|
|
219
|
+
"requestLocation": "query"
|
|
220
|
+
},
|
|
221
|
+
"query": {},
|
|
222
|
+
"body": {},
|
|
223
|
+
"headers": {},
|
|
224
|
+
"handleFailure": "fail",
|
|
225
|
+
"requestFields": {},
|
|
226
|
+
"responseDatakey": "",
|
|
227
|
+
"responseFields": {
|
|
228
|
+
"name": "host",
|
|
229
|
+
"ostype": "os",
|
|
230
|
+
"ostypePrefix": "system-",
|
|
231
|
+
"ipaddress": "attributes.ipaddr",
|
|
232
|
+
"port": "443"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"isAlive": [
|
|
237
|
+
{
|
|
238
|
+
"path": "/get/devices/{id}/status",
|
|
239
|
+
"method": "GET",
|
|
240
|
+
"query": {},
|
|
241
|
+
"body": {},
|
|
242
|
+
"headers": {},
|
|
243
|
+
"handleFailure": "fail",
|
|
244
|
+
"requestFields": {
|
|
245
|
+
"id": "name"
|
|
246
|
+
},
|
|
247
|
+
"responseDatakey": "",
|
|
248
|
+
"responseFields": {
|
|
249
|
+
"status": "status",
|
|
250
|
+
"statusValue": "online"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"getConfig": [
|
|
255
|
+
{
|
|
256
|
+
"path": "/get/devices/{id}/configPart1",
|
|
257
|
+
"method": "GET",
|
|
258
|
+
"query": {},
|
|
259
|
+
"body": {},
|
|
260
|
+
"headers": {},
|
|
261
|
+
"handleFailure": "fail",
|
|
262
|
+
"requestFields": {
|
|
263
|
+
"id": "name"
|
|
264
|
+
},
|
|
265
|
+
"responseDatakey": "",
|
|
266
|
+
"responseFields": {}
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"getCount": [
|
|
270
|
+
{
|
|
271
|
+
"path": "/get/devices",
|
|
272
|
+
"method": "GET",
|
|
273
|
+
"query": {},
|
|
274
|
+
"body": {},
|
|
275
|
+
"headers": {},
|
|
276
|
+
"handleFailure": "fail",
|
|
277
|
+
"requestFields": {},
|
|
278
|
+
"responseDatakey": "",
|
|
279
|
+
"responseFields": {}
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"cache": {
|
|
284
|
+
"enabled": false,
|
|
285
|
+
"entities": [
|
|
286
|
+
{
|
|
287
|
+
"entityType": "",
|
|
288
|
+
"frequency": 1440,
|
|
289
|
+
"flushOnFail": false,
|
|
290
|
+
"limit": 1000,
|
|
291
|
+
"retryAttempts": 5,
|
|
292
|
+
"sort": true,
|
|
293
|
+
"populate": [
|
|
294
|
+
{
|
|
295
|
+
"path": "",
|
|
296
|
+
"method": "GET",
|
|
297
|
+
"pagination": {
|
|
298
|
+
"offsetVar": "",
|
|
299
|
+
"limitVar": "",
|
|
300
|
+
"incrementBy": "limit",
|
|
301
|
+
"requestLocation": "query"
|
|
302
|
+
},
|
|
303
|
+
"query": {},
|
|
304
|
+
"body": {},
|
|
305
|
+
"headers": {},
|
|
306
|
+
"handleFailure": "ignore",
|
|
307
|
+
"requestFields": {},
|
|
308
|
+
"responseDatakey": "",
|
|
309
|
+
"responseFields": {}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"cachedTasks": [
|
|
313
|
+
{
|
|
314
|
+
"name": "",
|
|
315
|
+
"filterField": "",
|
|
316
|
+
"filterLoc": ""
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
### Swagger
|
|
325
|
+
|
|
326
|
+
Note: The content for this section may be missing as its corresponding .json file is unavailable. This sections will be updated once adapter-openapi.json file is added.
|
|
327
|
+
## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/adapter-aws_lambda/-/blob/master/README.md)
|
|
328
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-aws_lambda",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "This adapter integrates with system described as: awsLambda.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Aws_lambda",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"author": "Itential",
|
|
50
50
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-aws_lambda#readme",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@itentialopensource/adapter-utils": "5.10.
|
|
52
|
+
"@itentialopensource/adapter-utils": "5.10.28",
|
|
53
53
|
"acorn": "8.14.1",
|
|
54
54
|
"ajv": "8.17.1",
|
|
55
55
|
"axios": "1.12.0",
|