@itentialopensource/adapter-cyberark 0.3.3 → 0.4.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,342 @@
1
+ # Cyberark
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 CyberArk adapter with Basic Authentication and 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
+ CyberArk also has the ability to request an access token. This process is not documented here.
17
+
18
+ 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.
19
+
20
+ #### Basic Authentication
21
+ The CyberArk adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
22
+
23
+ STEPS
24
+ 1. Ensure you have access to a CyberArk server and that it is running
25
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
26
+ 3. Use the properties below for the ```properties.authentication``` field
27
+ ```json
28
+ "authentication": {
29
+ "auth_method": "basic user_password",
30
+ "username": "<username>",
31
+ "password": "<password>",
32
+ "auth_field": "header.headers.Authorization",
33
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
34
+ "auth_logging": false
35
+ }
36
+ ```
37
+ you can leave all of the other properties in the authentication section, they will not be used for CyberArk basic authentication.
38
+
39
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
40
+
41
+ #### API Key Authentication
42
+ The CyberArk adapter also supports API Key Authentication. However, this process is more like Basic Auth just using the API Key instead of a password. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
43
+
44
+ STEPS
45
+ 1. Ensure you have access to a CyberArk server and that it is running
46
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
47
+ 3. Use the properties below for the ```properties.authentication``` field
48
+ ```json
49
+ "authentication": {
50
+ "auth_method": "static_token",
51
+ "username": "username",
52
+ "password": "apikey",
53
+ "auth_field": "header.headers.Authorization",
54
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
55
+ "auth_logging": false
56
+ }
57
+ ```
58
+ you can leave all of the other properties in the authentication section, they will not be used for CyberArk token authentication.
59
+
60
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
61
+
62
+ #### Troubleshooting
63
+ - Make sure you copied over the correct username and password.
64
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
65
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
66
+ - Investigate the logs - in particular:
67
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
68
+ - The FULL BODY log to make sure the payload is accurate.
69
+ - The CALL RETURN log to see what the other system is telling us.
70
+ - 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.
71
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
72
+
73
+ ### Sample Properties
74
+
75
+ 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.
76
+
77
+ ```json
78
+ "properties": {
79
+ "host": "pvwa.example.com",
80
+ "port": 443,
81
+ "choosepath": "",
82
+ "base_path": "/",
83
+ "version": "",
84
+ "cache_location": "none",
85
+ "encode_pathvars": true,
86
+ "encode_queryvars": true,
87
+ "save_metric": false,
88
+ "stub": true,
89
+ "protocol": "https",
90
+ "authentication": {
91
+ "auth_method": "basic user_password",
92
+ "username": "username",
93
+ "password": "password",
94
+ "token": "token",
95
+ "token_timeout": 600000,
96
+ "token_cache": "local",
97
+ "invalid_token_error": 401,
98
+ "auth_field": "header.headers.Authorization",
99
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
100
+ "auth_logging": false,
101
+ "client_id": "",
102
+ "client_secret": "",
103
+ "grant_type": "",
104
+ "sensitive": [],
105
+ "sso": {
106
+ "protocol": "",
107
+ "host": "",
108
+ "port": 0
109
+ },
110
+ "multiStepAuthCalls": [
111
+ {
112
+ "name": "",
113
+ "requestFields": {},
114
+ "responseFields": {},
115
+ "successfullResponseCode": 200
116
+ }
117
+ ]
118
+ },
119
+ "healthcheck": {
120
+ "type": "none",
121
+ "frequency": 60000,
122
+ "query_object": {},
123
+ "addlHeaders": {}
124
+ },
125
+ "throttle": {
126
+ "throttle_enabled": false,
127
+ "number_pronghorns": 1,
128
+ "sync_async": "sync",
129
+ "max_in_queue": 1000,
130
+ "concurrent_max": 1,
131
+ "expire_timeout": 0,
132
+ "avg_runtime": 200,
133
+ "priorities": [
134
+ {
135
+ "value": 0,
136
+ "percent": 100
137
+ }
138
+ ]
139
+ },
140
+ "request": {
141
+ "number_redirects": 0,
142
+ "number_retries": 3,
143
+ "limit_retry_error": [
144
+ 0
145
+ ],
146
+ "failover_codes": [],
147
+ "attempt_timeout": 5000,
148
+ "global_request": {
149
+ "payload": {},
150
+ "uriOptions": {},
151
+ "addlHeaders": {},
152
+ "authData": {}
153
+ },
154
+ "healthcheck_on_timeout": true,
155
+ "return_raw": false,
156
+ "archiving": false,
157
+ "return_request": false
158
+ },
159
+ "proxy": {
160
+ "enabled": false,
161
+ "host": "",
162
+ "port": 1,
163
+ "protocol": "http",
164
+ "username": "",
165
+ "password": ""
166
+ },
167
+ "ssl": {
168
+ "ecdhCurve": "",
169
+ "enabled": false,
170
+ "accept_invalid_cert": false,
171
+ "ca_file": "",
172
+ "key_file": "",
173
+ "cert_file": "",
174
+ "secure_protocol": "",
175
+ "ciphers": ""
176
+ },
177
+ "mongo": {
178
+ "host": "",
179
+ "port": 0,
180
+ "database": "",
181
+ "username": "",
182
+ "password": "",
183
+ "replSet": "",
184
+ "db_ssl": {
185
+ "enabled": false,
186
+ "accept_invalid_cert": false,
187
+ "ca_file": "",
188
+ "key_file": "",
189
+ "cert_file": ""
190
+ }
191
+ },
192
+ "devicebroker": {
193
+ "enabled": false,
194
+ "getDevice": [
195
+ {
196
+ "path": "/not/mapped",
197
+ "method": "GET",
198
+ "query": {},
199
+ "body": {},
200
+ "headers": {},
201
+ "handleFailure": "ignore",
202
+ "requestFields": {
203
+ "insample": "{port}"
204
+ },
205
+ "responseDatakey": "",
206
+ "responseFields": {
207
+ "name": "{this}{||}{that}",
208
+ "ostype": "{osfield}",
209
+ "ostypePrefix": "meraki-",
210
+ "port": "{port}",
211
+ "ipaddress": "{ip_addr}",
212
+ "serial": "{serial}"
213
+ }
214
+ }
215
+ ],
216
+ "getDevicesFiltered": [
217
+ {
218
+ "path": "/not/mapped",
219
+ "method": "GET",
220
+ "pagination": {
221
+ "offsetVar": "",
222
+ "limitVar": "",
223
+ "incrementBy": "limit",
224
+ "requestLocation": "query"
225
+ },
226
+ "query": {},
227
+ "body": {},
228
+ "headers": {},
229
+ "handleFailure": "ignore",
230
+ "requestFields": {},
231
+ "responseDatakey": "",
232
+ "responseFields": {
233
+ "name": "{this}{||}{that}",
234
+ "ostype": "{osfield}",
235
+ "ostypePrefix": "meraki-",
236
+ "port": "{port}",
237
+ "ipaddress": "{ip_addr}",
238
+ "serial": "{serial}",
239
+ "id": "{myid}"
240
+ }
241
+ }
242
+ ],
243
+ "isAlive": [
244
+ {
245
+ "path": "/not/mapped/{devID}",
246
+ "method": "GET",
247
+ "query": {},
248
+ "body": {},
249
+ "headers": {},
250
+ "handleFailure": "ignore",
251
+ "requestFields": {
252
+ "devID": "{id}"
253
+ },
254
+ "responseDatakey": "",
255
+ "responseFields": {
256
+ "status": "return2xx",
257
+ "statusValue": "AD.200"
258
+ }
259
+ }
260
+ ],
261
+ "getConfig": [
262
+ {
263
+ "path": "/not/mapped/{devID}",
264
+ "method": "GET",
265
+ "query": {},
266
+ "body": {},
267
+ "headers": {},
268
+ "handleFailure": "ignore",
269
+ "requestFields": {
270
+ "devID": "{id}"
271
+ },
272
+ "responseDatakey": "",
273
+ "responseFields": {}
274
+ }
275
+ ],
276
+ "getCount": [
277
+ {
278
+ "path": "/not/mapped",
279
+ "method": "GET",
280
+ "query": {},
281
+ "body": {},
282
+ "headers": {},
283
+ "handleFailure": "ignore",
284
+ "requestFields": {},
285
+ "responseDatakey": "",
286
+ "responseFields": {}
287
+ }
288
+ ]
289
+ },
290
+ "cache": {
291
+ "enabled": false,
292
+ "entities": [
293
+ {
294
+ "entityType": "device",
295
+ "frequency": 3600,
296
+ "flushOnFail": false,
297
+ "limit": 10000,
298
+ "retryAttempts": 5,
299
+ "sort": true,
300
+ "populate": [
301
+ {
302
+ "path": "/not/mapped",
303
+ "method": "GET",
304
+ "pagination": {
305
+ "offsetVar": "",
306
+ "limitVar": "",
307
+ "incrementBy": "limit",
308
+ "requestLocation": "query"
309
+ },
310
+ "query": {},
311
+ "body": {},
312
+ "headers": {},
313
+ "handleFailure": "ignore",
314
+ "requestFields": {},
315
+ "responseDatakey": "",
316
+ "responseFields": {
317
+ "name": "{this}{||}{that}",
318
+ "ostype": "{osfield}",
319
+ "ostypePrefix": "meraki-",
320
+ "port": "{port}",
321
+ "ipaddress": "{ip_addr}",
322
+ "serial": "{serial}",
323
+ "id": "{myid}"
324
+ }
325
+ }
326
+ ],
327
+ "cachedTasks": [
328
+ {
329
+ "name": "",
330
+ "filterField": "",
331
+ "filterLoc": ""
332
+ }
333
+ ]
334
+ }
335
+ ]
336
+ }
337
+ }
338
+ ```
339
+ ### [Swagger](https://gitlab.com/itentialopensource/adapters/security/adapter-cyberark/-/blob/master/report/adapter-openapi.json)
340
+
341
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/security/adapter-cyberark/-/blob/master/README.md)
342
+
package/metadata.json CHANGED
@@ -36,20 +36,45 @@
36
36
  "isDeprecated": false
37
37
  },
38
38
  "brokerSince": "",
39
+ "authMethods": [
40
+ {
41
+ "type": "Basic Auth",
42
+ "primary": true
43
+ },
44
+ {
45
+ "type": "API Key",
46
+ "primary": true
47
+ },
48
+ {
49
+ "type": "Token",
50
+ "primary": true
51
+ }
52
+ ],
39
53
  "documentation": {
40
54
  "storeLink": "",
41
55
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-cyberark",
42
- "repoLink": "https://gitlab.com/itentialopensource/adapters/security/adapter-cyberark",
56
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-cyberark",
43
57
  "docLink": "https://docs.itential.com/opensource/docs/cyberark",
44
58
  "demoLinks": [],
45
- "trainingLinks": [],
59
+ "trainingLinks": [
60
+ {
61
+ "title": "Itential Academy",
62
+ "link": "https://www.itential.com/itential-academy/"
63
+ }
64
+ ],
46
65
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
47
66
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
48
67
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
49
68
  "webLink": "https://www.itential.com/adapters/cyberark-access-management/",
50
- "vendorLink": "",
51
- "productLink": "",
52
- "apiLinks": []
69
+ "vendorLink": "https://www.cyberark.com/",
70
+ "productLink": "https://www.cyberark.com/products/",
71
+ "apiLinks": [
72
+ {
73
+ "title": "CyberArk REST API",
74
+ "link": "https://docs.cyberark.com/conjur-enterprise/latest/en/Content/Developer/lp_REST_API.htm?tocpath=Developer%7CREST%C2%A0APIs%7C_____0",
75
+ "public": true
76
+ }
77
+ ]
53
78
  },
54
79
  "assets": [],
55
80
  "relatedItems": {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-cyberark",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "This adapter integrates with system described as: cyberark",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.14",
7
+ "engineVersion": "1.67.19",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -15,7 +15,6 @@
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
16
16
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
17
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
18
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
19
18
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
20
19
  "adapter:install": "npm i && node utils/tbScript.js install",
21
20
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -43,20 +42,20 @@
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/security/adapter-cyberark.git"
50
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-cyberark.git"
52
51
  },
53
52
  "author": "Itential",
54
- "homepage": "https://gitlab.com/itentialopensource/adapters/security/adapter-cyberark#readme",
53
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-cyberark#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.6.7",
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",
@@ -64,7 +63,6 @@
64
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",
@@ -945,6 +945,11 @@
945
945
  "devicebroker": {
946
946
  "type": "object",
947
947
  "properties": {
948
+ "enabled": {
949
+ "type": "boolean",
950
+ "description": "Whether or not the device broker calls have been mapped",
951
+ "default": false
952
+ },
948
953
  "getDevice": {
949
954
  "type": "array",
950
955
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.0",
3
- "configLines": 43197,
2
+ "version": "0.3.4",
3
+ "configLines": 43202,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 67677,
6
- "testLines": 43678,
6
+ "testLines": 43677,
7
7
  "testCases": 2250,
8
- "totalCodeLines": 113138,
8
+ "totalCodeLines": 113137,
9
9
  "wfTasks": 730
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 16
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.3.10"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 647
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 21748
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 1466
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 20677
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 714
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 43878
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 2180
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }