@itentialopensource/adapter-utils 4.48.7 → 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 CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ ## 4.48.8 [03-09-2023]
3
+
4
+ * Mask sensitive fields in reqHdr
5
+
6
+ Closes ADAPT-2575
7
+
8
+ See merge request itentialopensource/adapter-utils!247
9
+
10
+ ---
11
+
2
12
  ## 4.48.7 [01-31-2023]
3
13
 
4
14
  * Multi Step Authentication
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "4.48.7",
3
+ "version": "4.48.8",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",