@itentialopensource/adapter-redis_cloud 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 0.3.3 [09-15-2024]
3
+
4
+ * add workshop and fix vulnerabilities
5
+
6
+ See merge request itentialopensource/adapters/adapter-redis_cloud!10
7
+
8
+ ---
9
+
2
10
  ## 0.3.2 [08-14-2024]
3
11
 
4
12
  * Changes made at 2024.08.14_17:22PM
package/SYSTEMINFO.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Redis_cloud
2
2
 
3
3
  Vendor: Redis
4
- Homepage: https://redis.com/
4
+ Homepage: https://redis.io/
5
5
 
6
6
  Product: Redis
7
- Product Page: https://redis.com/
7
+ Product Page: https://redis.io/
8
8
 
9
9
  ## Introduction
10
10
  We classify Redis into the Persistence domain as it is a in-memory data store platform.
package/TAB2.md CHANGED
@@ -66,7 +66,7 @@ Sample Properties can be used to help you configure the adapter in the Itential
66
66
  "auth_method": "static_token",
67
67
  "username": "username",
68
68
  "password": "password",
69
- "token": "accountKey",
69
+ "token": "token",
70
70
  "tokenp2": "userKey",
71
71
  "token_timeout": 1800000,
72
72
  "token_cache": "local",
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-redis_cloud",
3
3
  "webName": "Adapter for Integration to Redis Cloud",
4
+ "supportLevel": "community",
4
5
  "vendor": "Redis",
5
6
  "product": "Cloud",
7
+ "techAlliance": false,
6
8
  "osVersion": [
7
9
  "v1"
8
10
  ],
@@ -42,7 +44,7 @@
42
44
  "storeLink": "",
43
45
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-redis_cloud",
44
46
  "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-redis_cloud",
45
- "docLink": "",
47
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-redis_cloud/-/blob/master/README.md?ref_type=heads",
46
48
  "demoLinks": [],
47
49
  "trainingLinks": [
48
50
  {
@@ -53,9 +55,9 @@
53
55
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
54
56
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
55
57
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
56
- "webLink": "",
57
- "vendorLink": "https://redis.com/",
58
- "productLink": "https://redis.com/",
58
+ "webLink": "https://www.itential.com/adapters/redis-cloud/",
59
+ "vendorLink": "https://redis.io/",
60
+ "productLink": "https://redis.io/",
59
61
  "apiLinks": [
60
62
  {
61
63
  "title": "Redis - Cloud API",
@@ -74,7 +76,5 @@
74
76
  "workflowProjects": [],
75
77
  "transformationProjects": [],
76
78
  "exampleProjects": []
77
- },
78
- "supportLevel": "community",
79
- "techAlliance": false
79
+ }
80
80
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-redis_cloud",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "This adapter integrates with system described as: redisCloud.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.20",
7
+ "engineVersion": "1.68.2",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -53,7 +53,7 @@
53
53
  "author": "Itential",
54
54
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-redis_cloud#readme",
55
55
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.6.0",
56
+ "@itentialopensource/adapter-utils": "^5.8.0",
57
57
  "acorn": "^8.12.1",
58
58
  "ajv": "^8.17.1",
59
59
  "axios": "^1.7.4",
@@ -68,7 +68,7 @@
68
68
  "prompts": "^2.4.2",
69
69
  "readline-sync": "^1.4.10",
70
70
  "semver": "^7.6.3",
71
- "winston": "^3.13.1"
71
+ "winston": "^3.14.2"
72
72
  },
73
73
  "devDependencies": {
74
74
  "chai": "^4.3.7",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.5",
2
+ "version": "0.3.2",
3
3
  "configLines": 7691,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 8008,
6
- "testLines": 7700,
7
- "testCases": 379,
8
- "totalCodeLines": 17491,
6
+ "testLines": 7684,
7
+ "testCases": 378,
8
+ "totalCodeLines": 17475,
9
9
  "wfTasks": 95
10
10
  }
@@ -17,13 +17,19 @@
17
17
  "auth_method": "static_token",
18
18
  "username": "username",
19
19
  "password": "password",
20
- "token": "accountKey",
20
+ "token": "token",
21
21
  "tokenp2": "userKey",
22
22
  "token_timeout": 1800000,
23
23
  "token_cache": "local",
24
24
  "invalid_token_error": 401,
25
- "auth_field": ["header.headers.x-api-key", "header.headers.x-api-secret-key"],
26
- "auth_field_format": ["{token}", "{tokenp2}"],
25
+ "auth_field": [
26
+ "header.headers.x-api-key",
27
+ "header.headers.x-api-secret-key"
28
+ ],
29
+ "auth_field_format": [
30
+ "{token}",
31
+ "{tokenp2}"
32
+ ],
27
33
  "auth_logging": false,
28
34
  "client_id": "",
29
35
  "client_secret": "",
@@ -136,7 +142,7 @@
136
142
  "ostypePrefix": "meraki-",
137
143
  "port": "{port}",
138
144
  "ipaddress": "{ip_addr}",
139
- "serial" : "{serial}"
145
+ "serial": "{serial}"
140
146
  }
141
147
  }
142
148
  ],
@@ -162,7 +168,7 @@
162
168
  "ostypePrefix": "meraki-",
163
169
  "port": "{port}",
164
170
  "ipaddress": "{ip_addr}",
165
- "serial" : "{serial}",
171
+ "serial": "{serial}",
166
172
  "id": "{myid}"
167
173
  }
168
174
  }
@@ -246,7 +252,7 @@
246
252
  "ostypePrefix": "meraki-",
247
253
  "port": "{port}",
248
254
  "ipaddress": "{ip_addr}",
249
- "serial" : "{serial}",
255
+ "serial": "{serial}",
250
256
  "id": "{myid}"
251
257
  }
252
258
  }
@@ -4,7 +4,6 @@
4
4
  /* eslint no-unused-vars: warn */
5
5
 
6
6
  const assert = require('assert');
7
- const http = require('http');
8
7
  const https = require('https');
9
8
  const mocha = require('mocha');
10
9
  const ping = require('ping');
@@ -53,29 +52,6 @@ describe('[integration] Adapter Test', () => {
53
52
  });
54
53
  });
55
54
 
56
- it('Support HTTP on port 80', (done) => {
57
- const requestOptions = {
58
- host,
59
- port: 80,
60
- method: 'HEAD'
61
- };
62
-
63
- const req = http.request(requestOptions, (res) => {
64
- try {
65
- assert.ok(res.statusCode >= 200 && res.statusCode < 400);
66
- done();
67
- } catch (error) {
68
- done(error);
69
- }
70
- });
71
-
72
- req.on('error', (err) => {
73
- done(err);
74
- });
75
-
76
- req.end();
77
- });
78
-
79
55
  it('Support HTTPS on port 443', (done) => {
80
56
  const requestOptions = {
81
57
  host,
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
36
36
  // these variables can be changed to run in integrated mode so easier to set them here
37
37
  // always check these in with bogus data!!!
38
38
  samProps.stub = true;
39
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
46
50
  if (samProps.request.attempt_timeout < 30000) {
47
51
  samProps.request.attempt_timeout = 30000;
48
52
  }
@@ -1097,9 +1101,9 @@ describe('[integration] Redis_cloud Adapter Test', () => {
1097
1101
  ],
1098
1102
  supportOSSClusterApi: true,
1099
1103
  useExternalEndpointForOSSClusterApi: true,
1100
- password: 'P@ssw0rd',
1104
+ password: samProps.authentication.password,
1101
1105
  saslUsername: 'mc-HR7gb',
1102
- saslPassword: '7igza2WZ0UPgMyqjsxuIZtla8xBdzkJT',
1106
+ saslPassword: samProps.authentication.password,
1103
1107
  sourceIp: [
1104
1108
  'string'
1105
1109
  ],
@@ -1215,7 +1219,7 @@ describe('[integration] Redis_cloud Adapter Test', () => {
1215
1219
  readOperationsPerSecond: 7
1216
1220
  },
1217
1221
  dataPersistence: 'snapshot-every-6-hours',
1218
- password: 'P@ssw0rd',
1222
+ password: samProps.authentication.password,
1219
1223
  sourceIp: [
1220
1224
  'string'
1221
1225
  ],
@@ -1552,7 +1556,7 @@ describe('[integration] Redis_cloud Adapter Test', () => {
1552
1556
  ],
1553
1557
  clientSslCertificate: 'string',
1554
1558
  enableTls: true,
1555
- password: 'string',
1559
+ password: samProps.authentication.password,
1556
1560
  enableDefaultUser: false,
1557
1561
  alerts: [
1558
1562
  {
@@ -1790,7 +1794,7 @@ describe('[integration] Redis_cloud Adapter Test', () => {
1790
1794
  const accessControlListCreateUserBodyParam = {
1791
1795
  name: 'ACL-user-example',
1792
1796
  role: 'Redis-role-example',
1793
- password: 'some-random-password'
1797
+ password: samProps.authentication.password
1794
1798
  };
1795
1799
  describe('#createUser - errors', () => {
1796
1800
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
@@ -1969,7 +1973,7 @@ describe('[integration] Redis_cloud Adapter Test', () => {
1969
1973
  const accessControlListUpdateUser1BodyParam = {
1970
1974
  userId: 5,
1971
1975
  role: 'Redis-role-example',
1972
- password: 'some-random-password',
1976
+ password: samProps.authentication.password,
1973
1977
  commandType: 'string'
1974
1978
  };
1975
1979
  describe('#updateUser1 - errors', () => {
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
36
36
  // these variables can be changed to run in integrated mode so easier to set them here
37
37
  // always check these in with bogus data!!!
38
38
  samProps.stub = true;
39
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
46
50
  samProps.request.attempt_timeout = 1200000;
47
51
  const attemptTimeout = samProps.request.attempt_timeout;
48
52
  const { stub } = samProps;
@@ -323,7 +327,7 @@ describe('[unit] Redis_cloud Adapter Test', () => {
323
327
  assert.equal('^0.4.4', packageDotJson.dependencies.ping);
324
328
  assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
325
329
  assert.equal('^7.6.3', packageDotJson.dependencies.semver);
326
- assert.equal('^3.13.1', packageDotJson.dependencies.winston);
330
+ assert.equal('^3.14.2', packageDotJson.dependencies.winston);
327
331
  done();
328
332
  } catch (error) {
329
333
  log.error(`Test Failure: ${error}`);
@@ -1,9 +0,0 @@
1
- {
2
- "ComplianceEntries": [
3
- {
4
- "name": "Compliance Summary",
5
- "numInvalidProjects": 0,
6
- "numValidProjects": 0
7
- }
8
- ]
9
- }
@@ -1,5 +0,0 @@
1
- ---------------------------------------------------------------------------------------------
2
- **** Project Compliance Summary ****
3
- 0 project(s) are not valid
4
- 0 project(s) are valid
5
- ---------------------------------------------------------------------------------------------