@itentialopensource/adapter-utils 4.48.6 → 4.48.8
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 +20 -0
- package/MFA.md +43 -0
- package/lib/connectorRest.js +1092 -757
- package/lib/propertyUtil.js +1 -1
- package/lib/translatorUtil.js +11 -0
- package/package.json +4 -3
- package/schemas/propertiesSchema.json +2 -1
package/lib/propertyUtil.js
CHANGED
|
@@ -879,7 +879,7 @@ class AdapterPropertyUtil {
|
|
|
879
879
|
try {
|
|
880
880
|
return callback(this.getEntitySchemaFromFS(entityName, actionName, choosepath), null);
|
|
881
881
|
} catch (exc) {
|
|
882
|
-
log.error(
|
|
882
|
+
log.error(`Exception caught on File System ${exc.message}`);
|
|
883
883
|
return callback(null, exc);
|
|
884
884
|
}
|
|
885
885
|
}
|
package/lib/translatorUtil.js
CHANGED
|
@@ -1032,6 +1032,17 @@ class AdapterTranslatorUtil {
|
|
|
1032
1032
|
if (sysRes) {
|
|
1033
1033
|
errorObject.IAPerror.raw_response = sysRes;
|
|
1034
1034
|
}
|
|
1035
|
+
|
|
1036
|
+
// Mask sensitive fields in reqHdr
|
|
1037
|
+
const sensitiveWords = /auth|token|x|key/i;
|
|
1038
|
+
if (errorObject.IAPerror.raw_response && errorObject.IAPerror.raw_response.reqHdr) {
|
|
1039
|
+
Object.keys(errorObject.IAPerror.raw_response.reqHdr).forEach((key) => {
|
|
1040
|
+
if (sensitiveWords.test(key)) {
|
|
1041
|
+
errorObject.IAPerror.raw_response.reqHdr[key] = '****';
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1035
1046
|
if (stack) {
|
|
1036
1047
|
errorObject.IAPerror.stack = stack;
|
|
1037
1048
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-utils",
|
|
3
|
-
"version": "4.48.
|
|
3
|
+
"version": "4.48.8",
|
|
4
4
|
"description": "Itential Adapter Utility Libraries",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node utils/setup.js",
|
|
7
7
|
"lint": "eslint . --ext .json --ext .js",
|
|
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=debug",
|
|
10
|
-
"test:integration": "mocha test/integration/lib/requestHandlerTest.js --LOG=error && mocha test/integration/lib/restHandlerTest.js --LOG=error",
|
|
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
11
|
"test:cover": "nyc --reporter html --reporter text mocha --recursive --reporter dot test/*",
|
|
12
12
|
"test": "npm run test:unit && npm run test:integration",
|
|
13
13
|
"deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
"strip-ansi": "^7.0.1",
|
|
55
55
|
"strip-ansi-cli": "^3.0.1",
|
|
56
56
|
"testdouble": "^3.16.1",
|
|
57
|
-
"winston": "^3.3.3"
|
|
57
|
+
"winston": "^3.3.3",
|
|
58
|
+
"nock": "^13.2.9"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {},
|
|
60
61
|
"private": false
|