@itentialopensource/adapter-rundeck 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/TAB2.md ADDED
@@ -0,0 +1,319 @@
1
+ # Rundeck
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 Rundeck adapter with static 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>.
15
+
16
+ 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.
17
+
18
+ #### API Key Authentication
19
+ The Rundeck adapter requires API Key Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
20
+
21
+ STEPS
22
+ 1. Ensure you have access to a Rundeck server and that it is running
23
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
24
+ 3. Use the properties below for the ```properties.authentication``` field
25
+ ```json
26
+ "authentication": {
27
+ "auth_method": "static_token",
28
+ "token": "<api key>",
29
+ "auth_field": "header.headers.X-Rundeck-Auth-Token",
30
+ "auth_field_format": "{token}",
31
+ "auth_logging": false
32
+ }
33
+ ```
34
+ you can leave all of the other properties in the authentication section, they will not be used for static API Key authentication.
35
+
36
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
37
+
38
+ #### Troubleshooting
39
+ - Make sure you copied over the correct API Key.
40
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
41
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
42
+ - Investigate the logs - in particular:
43
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
44
+ - The FULL BODY log to make sure the payload is accurate.
45
+ - The CALL RETURN log to see what the other system is telling us.
46
+ - 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.
47
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
48
+
49
+ ### Sample Properties
50
+
51
+ Sample Properties can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
52
+
53
+ ```json
54
+ "properties": {
55
+ "host": "localhost",
56
+ "port": 443,
57
+ "choosepath": "",
58
+ "base_path": "/api/44",
59
+ "version": "",
60
+ "cache_location": "none",
61
+ "encode_pathvars": true,
62
+ "encode_queryvars": true,
63
+ "save_metric": false,
64
+ "stub": true,
65
+ "protocol": "https",
66
+ "authentication": {
67
+ "auth_method": "static_token",
68
+ "username": "username",
69
+ "password": "password",
70
+ "token": "authtoken",
71
+ "token_timeout": 600000,
72
+ "token_cache": "local",
73
+ "invalid_token_error": 401,
74
+ "auth_field": "header.headers.X-Rundeck-Auth-Token",
75
+ "auth_field_format": "{token}",
76
+ "auth_logging": false,
77
+ "client_id": "",
78
+ "client_secret": "",
79
+ "grant_type": "",
80
+ "sensitive": [],
81
+ "multiStepAuthCalls": [
82
+ {
83
+ "name": "",
84
+ "requestFields": {},
85
+ "responseFields": {},
86
+ "successfullResponseCode": 200
87
+ }
88
+ ],
89
+ "sso": {
90
+ "protocol": "",
91
+ "host": "",
92
+ "port": 0
93
+ }
94
+ },
95
+ "healthcheck": {
96
+ "type": "none",
97
+ "frequency": 60000,
98
+ "query_object": {},
99
+ "addlHeaders": {}
100
+ },
101
+ "throttle": {
102
+ "throttle_enabled": false,
103
+ "number_pronghorns": 1,
104
+ "sync_async": "sync",
105
+ "max_in_queue": 1000,
106
+ "concurrent_max": 1,
107
+ "expire_timeout": 0,
108
+ "avg_runtime": 200,
109
+ "priorities": [
110
+ {
111
+ "value": 0,
112
+ "percent": 100
113
+ }
114
+ ]
115
+ },
116
+ "request": {
117
+ "number_redirects": 0,
118
+ "number_retries": 3,
119
+ "limit_retry_error": [
120
+ 0
121
+ ],
122
+ "failover_codes": [],
123
+ "attempt_timeout": 5000,
124
+ "global_request": {
125
+ "payload": {},
126
+ "uriOptions": {},
127
+ "addlHeaders": {},
128
+ "authData": {}
129
+ },
130
+ "healthcheck_on_timeout": true,
131
+ "return_raw": false,
132
+ "archiving": false,
133
+ "return_request": false
134
+ },
135
+ "proxy": {
136
+ "enabled": false,
137
+ "host": "",
138
+ "port": 1,
139
+ "protocol": "http",
140
+ "username": "",
141
+ "password": ""
142
+ },
143
+ "ssl": {
144
+ "ecdhCurve": "",
145
+ "enabled": false,
146
+ "accept_invalid_cert": false,
147
+ "ca_file": "",
148
+ "key_file": "",
149
+ "cert_file": "",
150
+ "secure_protocol": "",
151
+ "ciphers": ""
152
+ },
153
+ "mongo": {
154
+ "host": "",
155
+ "port": 0,
156
+ "database": "",
157
+ "username": "",
158
+ "password": "",
159
+ "replSet": "",
160
+ "db_ssl": {
161
+ "enabled": false,
162
+ "accept_invalid_cert": false,
163
+ "ca_file": "",
164
+ "key_file": "",
165
+ "cert_file": ""
166
+ }
167
+ },
168
+ "devicebroker": {
169
+ "enabled": false,
170
+ "getDevice": [
171
+ {
172
+ "path": "/not/mapped",
173
+ "method": "GET",
174
+ "query": {},
175
+ "body": {},
176
+ "headers": {},
177
+ "handleFailure": "ignore",
178
+ "requestFields": {
179
+ "insample": "{port}"
180
+ },
181
+ "responseDatakey": "",
182
+ "responseFields": {
183
+ "name": "{this}{||}{that}",
184
+ "ostype": "{osfield}",
185
+ "ostypePrefix": "meraki-",
186
+ "port": "{port}",
187
+ "ipaddress": "{ip_addr}",
188
+ "serial": "{serial}"
189
+ }
190
+ }
191
+ ],
192
+ "getDevicesFiltered": [
193
+ {
194
+ "path": "/not/mapped",
195
+ "method": "GET",
196
+ "pagination": {
197
+ "offsetVar": "",
198
+ "limitVar": "",
199
+ "incrementBy": "limit",
200
+ "requestLocation": "query"
201
+ },
202
+ "query": {},
203
+ "body": {},
204
+ "headers": {},
205
+ "handleFailure": "ignore",
206
+ "requestFields": {},
207
+ "responseDatakey": "",
208
+ "responseFields": {
209
+ "name": "{this}{||}{that}",
210
+ "ostype": "{osfield}",
211
+ "ostypePrefix": "meraki-",
212
+ "port": "{port}",
213
+ "ipaddress": "{ip_addr}",
214
+ "serial": "{serial}",
215
+ "id": "{myid}"
216
+ }
217
+ }
218
+ ],
219
+ "isAlive": [
220
+ {
221
+ "path": "/not/mapped/{devID}",
222
+ "method": "GET",
223
+ "query": {},
224
+ "body": {},
225
+ "headers": {},
226
+ "handleFailure": "ignore",
227
+ "requestFields": {
228
+ "devID": "{id}"
229
+ },
230
+ "responseDatakey": "",
231
+ "responseFields": {
232
+ "status": "return2xx",
233
+ "statusValue": "AD.200"
234
+ }
235
+ }
236
+ ],
237
+ "getConfig": [
238
+ {
239
+ "path": "/not/mapped/{devID}",
240
+ "method": "GET",
241
+ "query": {},
242
+ "body": {},
243
+ "headers": {},
244
+ "handleFailure": "ignore",
245
+ "requestFields": {
246
+ "devID": "{id}"
247
+ },
248
+ "responseDatakey": "",
249
+ "responseFields": {}
250
+ }
251
+ ],
252
+ "getCount": [
253
+ {
254
+ "path": "/not/mapped",
255
+ "method": "GET",
256
+ "query": {},
257
+ "body": {},
258
+ "headers": {},
259
+ "handleFailure": "ignore",
260
+ "requestFields": {},
261
+ "responseDatakey": "",
262
+ "responseFields": {}
263
+ }
264
+ ]
265
+ },
266
+ "cache": {
267
+ "enabled": false,
268
+ "entities": [
269
+ {
270
+ "entityType": "device",
271
+ "frequency": 3600,
272
+ "flushOnFail": false,
273
+ "limit": 10000,
274
+ "retryAttempts": 5,
275
+ "sort": true,
276
+ "populate": [
277
+ {
278
+ "path": "/not/mapped",
279
+ "method": "GET",
280
+ "pagination": {
281
+ "offsetVar": "",
282
+ "limitVar": "",
283
+ "incrementBy": "limit",
284
+ "requestLocation": "query"
285
+ },
286
+ "query": {},
287
+ "body": {},
288
+ "headers": {},
289
+ "handleFailure": "ignore",
290
+ "requestFields": {},
291
+ "responseDatakey": "",
292
+ "responseFields": {
293
+ "name": "{this}{||}{that}",
294
+ "ostype": "{osfield}",
295
+ "ostypePrefix": "meraki-",
296
+ "port": "{port}",
297
+ "ipaddress": "{ip_addr}",
298
+ "serial": "{serial}",
299
+ "id": "{myid}"
300
+ }
301
+ }
302
+ ],
303
+ "cachedTasks": [
304
+ {
305
+ "name": "",
306
+ "filterField": "",
307
+ "filterLoc": ""
308
+ }
309
+ ]
310
+ }
311
+ ]
312
+ }
313
+ }
314
+ ```
315
+ ### Swagger
316
+
317
+ 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.
318
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-rundeck/-/blob/master/README.md)
319
+
package/metadata.json CHANGED
@@ -10,26 +10,63 @@
10
10
  "iapVersions": [],
11
11
  "method": "REST",
12
12
  "type": "Adapter",
13
- "domains": [],
14
- "tags": [],
15
- "useCases": [],
13
+ "domains": [
14
+ "Data Center",
15
+ "Network Services"
16
+ ],
17
+ "tags": [
18
+ "Configuration & Compliance",
19
+ "Network Infrastructure Changes",
20
+ "Software Upgrades & Device Maintenance"
21
+ ],
22
+ "useCases": [
23
+ "Device Onboarding",
24
+ "Router configuration backup or restore",
25
+ "Run network compliance checks and remediation",
26
+ "Determine configuration drift",
27
+ "Golden Configuration",
28
+ "Port/VLAN Configuration",
29
+ "EVPN & VXLA",
30
+ "Port Turn-up",
31
+ "Assign Network & IP",
32
+ "Cloud Managed Networks",
33
+ "Software Upgrade"
34
+ ],
16
35
  "deprecated": {
17
36
  "isDeprecated": false
18
37
  },
19
38
  "brokerSince": "",
39
+ "authMethods": [
40
+ {
41
+ "type": "API Key",
42
+ "primary": true
43
+ }
44
+ ],
20
45
  "documentation": {
21
46
  "storeLink": "",
22
47
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-rundeck",
23
- "repoLink": "https://gitlab.com/@itentialopensource/adapters/controller-orchestrator/adapter-rundeck",
48
+ "repoLink": "https://gitlab.com/@itentialopensource/adapters/adapter-rundeck",
24
49
  "docLink": "https://docs.itential.com/opensource/docs/rundeck",
25
50
  "demoLinks": [],
51
+ "trainingLinks": [
52
+ {
53
+ "title": "Itential Academy",
54
+ "link": "https://www.itential.com/itential-academy/"
55
+ }
56
+ ],
26
57
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
27
58
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
28
59
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
29
60
  "webLink": "https://www.itential.com/adapters/rundeck",
30
- "vendorLink": "",
31
- "productLink": "",
32
- "apiLinks": []
61
+ "vendorLink": "https://www.pagerduty.com/",
62
+ "productLink": "https://www.rundeck.com/",
63
+ "apiLinks": [
64
+ {
65
+ "title": "Rundeck API Reference",
66
+ "link": "https://docs.rundeck.com/docs/api/",
67
+ "public": true
68
+ }
69
+ ]
33
70
  },
34
71
  "assets": [],
35
72
  "relatedItems": {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-rundeck",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "This adapter integrates with system described as: rundeck.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Rundeck",
7
- "wizardVersion": "3.0.3",
8
- "engineVersion": "1.67.12",
7
+ "wizardVersion": "2.44.7",
8
+ "engineVersion": "1.67.19",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -16,7 +16,6 @@
16
16
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
17
17
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
18
18
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
19
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
20
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
21
20
  "adapter:install": "npm i && node utils/tbScript.js install",
22
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -43,28 +42,27 @@
43
42
  ],
44
43
  "license": "Apache-2.0",
45
44
  "engines": {
46
- "node": ">= 8.0.0",
45
+ "node": ">= 14.0.0",
47
46
  "npm": ">= 6.0.0"
48
47
  },
49
48
  "repository": {
50
49
  "type": "git",
51
- "url": "git@gitlab.com:itentialopensource/adapters/controller-orchestrator/adapter-rundeck.git"
50
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-rundeck.git"
52
51
  },
53
52
  "author": "Itential",
54
- "homepage": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-rundeck#readme",
53
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-rundeck#readme",
55
54
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.3.8",
55
+ "@itentialopensource/adapter-utils": "^5.3.10",
57
56
  "acorn": "^8.10.0",
58
57
  "ajv": "^8.12.0",
59
- "axios": "^1.4.0",
58
+ "axios": "^1.6.8",
60
59
  "commander": "^11.0.0",
61
60
  "dns-lookup-promise": "^1.0.4",
62
61
  "fs-extra": "^11.1.1",
63
62
  "json-query": "^2.2.2",
64
- "mocha": "^10.2.0",
63
+ "mocha": "^10.3.0",
65
64
  "mocha-param": "^2.0.1",
66
65
  "mongodb": "^4.16.0",
67
- "nyc": "^15.1.0",
68
66
  "ping": "^0.4.4",
69
67
  "prompts": "^2.4.2",
70
68
  "readline-sync": "^1.4.10",