@itentialopensource/adapter-utils 5.10.9 → 5.10.11
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.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
const aws4 = require('aws4');
|
|
10
10
|
const AWS = require('aws-sdk');
|
|
11
|
-
const querystring = require('querystring');
|
|
11
|
+
const querystring = require('node:querystring');
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
14
|
* INTERNAL FUNCTION: update device broker properties from service instance config and adapter sample properties
|
|
@@ -99,9 +99,9 @@ class AuthenticationHandler {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
AWS
|
|
104
|
-
const sts = new AWS.STS();
|
|
102
|
+
|
|
103
|
+
// set the AWS access information (from properties)
|
|
104
|
+
const sts = new AWS.STS(configObj);
|
|
105
105
|
log.debug(`STS OPTIONS: ${this.propUtil.scrubSensitiveInfo(JSON.stringify(configObj))}`);
|
|
106
106
|
|
|
107
107
|
// use STS to get the AWS access information for the user defined in STWS Params
|
package/lib/connectorRest.js
CHANGED
|
@@ -27,7 +27,7 @@ const http = require('http');
|
|
|
27
27
|
const cookieHandler = require('cookie');
|
|
28
28
|
const jsonQuery = require('json-query');
|
|
29
29
|
const xml2js = require('xml2js');
|
|
30
|
-
const querystring = require('querystring');
|
|
30
|
+
const querystring = require('node:querystring');
|
|
31
31
|
const { HttpsProxyAgent } = require('https-proxy-agent');
|
|
32
32
|
const { SocksProxyAgent } = require('socks-proxy-agent');
|
|
33
33
|
const AsyncLockCl = require('async-lock');
|
package/lib/propertyUtil.js
CHANGED
|
@@ -1153,7 +1153,7 @@ class AdapterPropertyUtil {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
|
|
1155
1155
|
// This is the array of sensitive keys
|
|
1156
|
-
let sensList = ['authorization', 'x-auth-token', 'x-csrf-token', 'x-amz-security-token', 'x-aws-ec2-metadata-token', 'cookie', 'set-cookie', 'token', 'tokenp2', 'user', 'username', 'passwd', 'password', 'api-key', 'client-id', 'client-secret', 'client_id', 'client_secret', 'session', 'session-id', 'jsessionid'];
|
|
1156
|
+
let sensList = ['authorization', 'x-auth-token', 'x-csrf-token', 'x-amz-security-token', 'x-aws-ec2-metadata-token', 'cookie', 'set-cookie', 'token', 'tokenp2', 'user', 'username', 'passwd', 'password', 'api-key', 'client-id', 'client-secret', 'client_id', 'client_secret', 'session', 'session-id', 'jsessionid', 'sessionToken', 'accessKeyId', 'secretAccessKey'];
|
|
1157
1157
|
|
|
1158
1158
|
// add any additional items to scrub
|
|
1159
1159
|
if (addItems && Array.isArray(addItems) && addItems.length > 0) {
|
package/lib/restHandler.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/* global log */
|
|
5
5
|
|
|
6
6
|
/* NodeJS internal utilities */
|
|
7
|
-
const querystring = require('querystring');
|
|
7
|
+
const querystring = require('node:querystring');
|
|
8
8
|
const jsonQuery = require('json-query');
|
|
9
9
|
const jsonxml = require('jsontoxml');
|
|
10
10
|
const xml2js = require('xml2js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-utils",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.11",
|
|
4
4
|
"description": "Itential Adapter Utility Libraries",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node utils/setup.js",
|
|
@@ -8,14 +8,13 @@
|
|
|
8
8
|
"lint:errors": "eslint --quiet . --ext .json --ext .js",
|
|
9
9
|
"test:unit": "mocha test/unit/lib/requestHandlerTest.js --LOG=error && mocha test/unit/lib/restHandlerTest.js --LOG=error && mocha test/unit/lib/propertyUtilTest.js --LOG=error && mocha test/unit/lib/translatorUtilTest.js --LOG=error && mocha test/unit/lib/dbUtilTest.js --LOG=error",
|
|
10
10
|
"test:integration": "mocha test/integration/lib/requestHandlerTest.js --LOG=error && mocha test/integration/lib/restHandlerTest.js --LOG=error && mocha test/integration/lib/restHandlerMfaTest.js --LOG=error",
|
|
11
|
-
"test:cover": "nyc --reporter html --reporter text mocha --recursive --reporter dot test/*",
|
|
12
11
|
"test": "npm run test:unit && npm run test:integration",
|
|
13
12
|
"deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
|
|
14
13
|
"build": "npm run deploy"
|
|
15
14
|
},
|
|
16
15
|
"license": "Apache-2.0",
|
|
17
16
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
17
|
+
"node": ">= 14.0.0",
|
|
19
18
|
"npm": ">= 6.0.0"
|
|
20
19
|
},
|
|
21
20
|
"repository": {
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
"author": "Itential",
|
|
26
25
|
"homepage": "https://gitlab.com/itentialopensource/adapter-utils#readme",
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"ajv": "^8.
|
|
27
|
+
"ajv": "^8.17.1",
|
|
29
28
|
"async-lock": "^1.4.0",
|
|
30
29
|
"aws-sdk": "^2.1665.0",
|
|
31
30
|
"aws4": "^1.9.1",
|
|
@@ -33,13 +32,12 @@
|
|
|
33
32
|
"crypto-js": "^4.1.1",
|
|
34
33
|
"ejs": "^3.1.10",
|
|
35
34
|
"form-data": "^4.0.0",
|
|
36
|
-
"fs-extra": "^11.
|
|
35
|
+
"fs-extra": "^11.2.0",
|
|
37
36
|
"https-proxy-agent": "^7.0.0",
|
|
38
37
|
"json-query": "^2.2.2",
|
|
39
38
|
"jsontoxml": "^1.0.1",
|
|
40
39
|
"jsonwebtoken": "^9.0.1",
|
|
41
40
|
"mongodb": "^3.7.4",
|
|
42
|
-
"querystring": "^0.2.0",
|
|
43
41
|
"readline-sync": "^1.4.10",
|
|
44
42
|
"socks-proxy-agent": "^8.0.1",
|
|
45
43
|
"uuid": "^9.0.0",
|
|
@@ -51,13 +49,12 @@
|
|
|
51
49
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
52
50
|
"eslint-plugin-import": "^2.27.5",
|
|
53
51
|
"eslint-plugin-json": "^3.1.0",
|
|
54
|
-
"mocha": "^10.
|
|
52
|
+
"mocha": "^10.7.3",
|
|
55
53
|
"nock": "^13.3.1",
|
|
56
|
-
"nyc": "^15.1.0",
|
|
57
54
|
"strip-ansi": "^7.1.0",
|
|
58
55
|
"strip-ansi-cli": "^3.0.2",
|
|
59
56
|
"testdouble": "^3.18.0",
|
|
60
|
-
"winston": "^3.
|
|
57
|
+
"winston": "^3.14.2"
|
|
61
58
|
},
|
|
62
59
|
"private": false
|
|
63
60
|
}
|