@mojaloop/sdk-scheme-adapter 24.9.1-snapshot.3 → 24.9.2-snapshot.2
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/.ncurc.yaml +1 -3
- package/.yarn/cache/{@mojaloop-central-services-shared-npm-18.26.0-41097c3bd3-37b742fe1c.zip → @mojaloop-central-services-shared-npm-18.26.2-e822c6028a-504c725d38.zip} +0 -0
- package/.yarn/cache/{@mojaloop-event-sdk-npm-14.5.0-cfd74e55fe-0bf463ff57.zip → @mojaloop-event-sdk-npm-14.5.1-3c060d2a60-faf8eead3d.zip} +0 -0
- package/.yarn/cache/{@mojaloop-sdk-standard-components-npm-19.15.1-snapshot.2-128ecdc0a0-aa24af794a.zip → @mojaloop-sdk-standard-components-npm-19.15.1-7801cabb1a-6e61ae02d7.zip} +0 -0
- package/.yarn/cache/{@redis-bloom-npm-5.0.1-62514ed586-b7db54deda.zip → @redis-bloom-npm-5.1.0-323d34032e-d59e173944.zip} +0 -0
- package/.yarn/cache/{@redis-client-npm-5.0.1-368606f421-52697dcae8.zip → @redis-client-npm-5.1.0-b981e68f86-bd7cd019ac.zip} +0 -0
- package/.yarn/cache/@redis-json-npm-5.1.0-029036681e-89ff085315.zip +0 -0
- package/.yarn/cache/{@redis-search-npm-5.0.1-29bab5c8f0-48dd5e7785.zip → @redis-search-npm-5.1.0-366c78e895-167d86c9f6.zip} +0 -0
- package/.yarn/cache/@redis-time-series-npm-5.1.0-0de38641ac-b408065311.zip +0 -0
- package/.yarn/cache/{@types-node-npm-22.15.19-13a5c1edbe-5aa45bf93c.zip → @types-node-npm-22.15.21-a4f238de1a-989f1ce3a9.zip} +0 -0
- package/.yarn/cache/koa-npm-3.0.0-dda3f7b8df-b603c45f0a.zip +0 -0
- package/.yarn/cache/media-typer-npm-1.1.0-eccc8b846d-a58dd60804.zip +0 -0
- package/.yarn/cache/mime-db-npm-1.54.0-82cccb9d70-e99aaf2f23.zip +0 -0
- package/.yarn/cache/mime-types-npm-3.0.1-20b43499d0-8d497ad5cb.zip +0 -0
- package/.yarn/cache/protobufjs-npm-7.5.2-528e926c0e-fe5663a1f3.zip +0 -0
- package/.yarn/cache/redis-npm-5.1.0-37820eea51-a1ee60be3b.zip +0 -0
- package/.yarn/cache/type-is-npm-2.0.1-8ef194d26e-0266e7c782.zip +0 -0
- package/.yarn/cache/{yaml-npm-2.7.1-9e92f81b45-385f8115dd.zip → yaml-npm-2.8.0-01747dd315-66f103ca5a.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +7 -0
- package/modules/api-svc/package.json +6 -6
- package/modules/api-svc/src/ControlAgent/index.js +12 -0
- package/modules/api-svc/src/lib/model/InboundPingModel.js +18 -4
- package/modules/api-svc/src/lib/model/lib/shared.js +41 -0
- package/modules/outbound-command-event-handler/package.json +4 -4
- package/modules/outbound-domain-event-handler/package.json +3 -3
- package/modules/private-shared-lib/package.json +4 -4
- package/package.json +2 -2
- package/.yarn/cache/@redis-bloom-npm-1.2.0-c3ffcb341a-8c21422728.zip +0 -0
- package/.yarn/cache/@redis-client-npm-1.6.0-951a6e0d76-c01c89a793.zip +0 -0
- package/.yarn/cache/@redis-graph-npm-1.1.1-c9b94b077a-caf9b9a3ff.zip +0 -0
- package/.yarn/cache/@redis-json-npm-1.0.7-f6715a905f-a84d51c06a.zip +0 -0
- package/.yarn/cache/@redis-json-npm-5.0.1-16aec772da-230019cffe.zip +0 -0
- package/.yarn/cache/@redis-search-npm-1.2.0-21b616db68-256ddf8b30.zip +0 -0
- package/.yarn/cache/@redis-time-series-npm-1.1.0-f132273b08-785f024e1c.zip +0 -0
- package/.yarn/cache/@redis-time-series-npm-5.0.1-cdfbdefc37-dd1fb26ba8.zip +0 -0
- package/.yarn/cache/generic-pool-npm-3.9.0-21fff1a77f-3d89e9b201.zip +0 -0
- package/.yarn/cache/koa-convert-npm-2.0.0-d709eca55c-7385b33919.zip +0 -0
- package/.yarn/cache/koa-npm-2.16.1-7f26717794-4946d19efb.zip +0 -0
- package/.yarn/cache/only-npm-0.0.2-122402a3f9-d399710db8.zip +0 -0
- package/.yarn/cache/protobufjs-npm-7.5.1-993d93e442-eabf7db652.zip +0 -0
- package/.yarn/cache/redis-npm-4.7.0-3130248fc5-625172dd91.zip +0 -0
- package/.yarn/cache/redis-npm-5.0.1-bc1761bfa3-179ee523ef.zip +0 -0
package/.ncurc.yaml
CHANGED
|
@@ -12,7 +12,5 @@ reject: [
|
|
|
12
12
|
## esLint 9.15.0 caused the error: TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')
|
|
13
13
|
"eslint",
|
|
14
14
|
## express >5 introduces breaking changes that are not compatible with the current codebase.
|
|
15
|
-
"express"
|
|
16
|
-
"koa", ## update to major version 3 is better to do in a separate PR
|
|
17
|
-
"redis" ## update to major version 5 is better to do in a separate PR
|
|
15
|
+
"express"
|
|
18
16
|
]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
|
|
2
|
+
### [24.9.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.9.0...v24.9.1) (2025-05-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Chore
|
|
6
|
+
|
|
7
|
+
* remove gateway headers when returning ping request ([#578](https://github.com/mojaloop/sdk-scheme-adapter/issues/578)) ([a4b0aae](https://github.com/mojaloop/sdk-scheme-adapter/commit/a4b0aaeccf271d62e192275cdd44686e5faee98b))
|
|
8
|
+
|
|
2
9
|
## [24.9.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.8.0...v24.9.0) (2025-04-22)
|
|
3
10
|
|
|
4
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-api-svc",
|
|
3
|
-
"version": "21.0.0-snapshot.
|
|
3
|
+
"version": "21.0.0-snapshot.37",
|
|
4
4
|
"description": "An adapter for connecting to Mojaloop API enabled switches.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"@mojaloop/central-services-error-handling": "13.1.0",
|
|
69
69
|
"@mojaloop/central-services-logger": "11.9.0",
|
|
70
70
|
"@mojaloop/central-services-metrics": "12.6.0",
|
|
71
|
-
"@mojaloop/central-services-shared": "18.26.
|
|
72
|
-
"@mojaloop/event-sdk": "14.5.
|
|
71
|
+
"@mojaloop/central-services-shared": "18.26.2",
|
|
72
|
+
"@mojaloop/event-sdk": "14.5.1",
|
|
73
73
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
74
74
|
"@mojaloop/ml-schema-transformer-lib": "2.7.1",
|
|
75
75
|
"@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
|
|
76
|
-
"@mojaloop/sdk-standard-components": "19.15.1
|
|
76
|
+
"@mojaloop/sdk-standard-components": "19.15.1",
|
|
77
77
|
"ajv": "8.17.1",
|
|
78
78
|
"axios": "1.9.0",
|
|
79
79
|
"body-parser": "2.2.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"javascript-state-machine": "3.1.0",
|
|
87
87
|
"js-yaml": "4.1.0",
|
|
88
88
|
"json-schema-ref-parser": "9.0.9",
|
|
89
|
-
"koa": "
|
|
89
|
+
"koa": "3.0.0",
|
|
90
90
|
"koa-body": "6.0.1",
|
|
91
91
|
"lodash": "4.17.21",
|
|
92
92
|
"module-alias": "2.2.3",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"prom-client": "15.1.3",
|
|
96
96
|
"promise-timeout": "1.3.0",
|
|
97
97
|
"random-word-slugs": "0.1.7",
|
|
98
|
-
"redis": "
|
|
98
|
+
"redis": "5.1.0",
|
|
99
99
|
"uuidv4": "6.2.13",
|
|
100
100
|
"ws": "8.18.2"
|
|
101
101
|
},
|
|
@@ -51,6 +51,7 @@ const FORCE_WS_CLOSE_TIMEOUT_MS = 5000;
|
|
|
51
51
|
*************************************************************************/
|
|
52
52
|
const MESSAGE = {
|
|
53
53
|
CONFIGURATION: 'CONFIGURATION',
|
|
54
|
+
PEER_JWS: 'PEER_JWS',
|
|
54
55
|
ERROR: 'ERROR',
|
|
55
56
|
};
|
|
56
57
|
|
|
@@ -124,6 +125,7 @@ const build = {
|
|
|
124
125
|
JSON_PARSE_ERROR: (id) => buildMsg(VERB.NOTIFY, MESSAGE.ERROR, ERROR.JSON_PARSE_ERROR, id),
|
|
125
126
|
}
|
|
126
127
|
},
|
|
128
|
+
PEER_JWS: {},
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
/**************************************************************************
|
|
@@ -235,6 +237,16 @@ class Client extends ws {
|
|
|
235
237
|
break;
|
|
236
238
|
}
|
|
237
239
|
break;
|
|
240
|
+
case MESSAGE.PEER_JWS:
|
|
241
|
+
switch (msg.verb) {
|
|
242
|
+
case VERB.NOTIFY:
|
|
243
|
+
// Ignore PEER_JWS NOTIFY messages
|
|
244
|
+
break;
|
|
245
|
+
default:
|
|
246
|
+
this.send(build.ERROR.NOTIFY.UNSUPPORTED_VERB(msg.id));
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
break;
|
|
238
250
|
default:
|
|
239
251
|
this.send(build.ERROR.NOTIFY.UNSUPPORTED_MESSAGE(msg.id));
|
|
240
252
|
break;
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
const { requests: { PingRequests }, Errors } = require('@mojaloop/sdk-standard-components');
|
|
29
29
|
const { Headers } = require('@mojaloop/central-services-shared').Enum.Http;
|
|
30
|
+
const { xHeaders, hopByHopHeaders, sensitiveHeaders } = require('./lib/shared');
|
|
30
31
|
|
|
31
32
|
class InboundPingModel {
|
|
32
33
|
constructor(config) {
|
|
@@ -55,9 +56,6 @@ class InboundPingModel {
|
|
|
55
56
|
const log = this.logger.child({ requestId, sourceFspId });
|
|
56
57
|
log.debug('postPing...', { jwsPingValidationResult, headers });
|
|
57
58
|
|
|
58
|
-
await this.pingRequests.putParties();
|
|
59
|
-
log.verbose('pingRequests.putParties() is done');
|
|
60
|
-
|
|
61
59
|
if (jwsPingValidationResult === true) {
|
|
62
60
|
log.verbose('ping JWS validation passed, sending PUT ping callback...');
|
|
63
61
|
return this.pingRequests.putPing({
|
|
@@ -92,12 +90,28 @@ class InboundPingModel {
|
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
#createCallbackHeaders(headers) {
|
|
93
|
+
const cleanedHeaders = this.#cleanupIncomingHeaders(headers);
|
|
95
94
|
return {
|
|
96
|
-
...
|
|
95
|
+
...cleanedHeaders,
|
|
97
96
|
[Headers.FSPIOP.DESTINATION]: headers[Headers.FSPIOP.SOURCE],
|
|
98
97
|
[Headers.FSPIOP.SOURCE]: this.dfspId
|
|
99
98
|
};
|
|
100
99
|
}
|
|
100
|
+
|
|
101
|
+
#cleanupIncomingHeaders(headers) {
|
|
102
|
+
const cleanedHeaders = { ...headers };
|
|
103
|
+
// prettier-ignore
|
|
104
|
+
[
|
|
105
|
+
...sensitiveHeaders,
|
|
106
|
+
...hopByHopHeaders,
|
|
107
|
+
...xHeaders,
|
|
108
|
+
].forEach((header) => {
|
|
109
|
+
delete cleanedHeaders[header];
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
return cleanedHeaders;
|
|
113
|
+
}
|
|
114
|
+
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
module.exports = InboundPingModel;
|
|
@@ -753,6 +753,44 @@ const internalFxTransferResponseToMojaloop = (beResponse, fulfilment) => {
|
|
|
753
753
|
};
|
|
754
754
|
};
|
|
755
755
|
|
|
756
|
+
const sensitiveHeaders = [
|
|
757
|
+
'authorization',
|
|
758
|
+
'cookie',
|
|
759
|
+
'set-cookie',
|
|
760
|
+
'host', // without removing host header request proxy fails with error: "Client network socket disconnected before secure TLS connection was established"
|
|
761
|
+
'content-length', // without removing content-length header request just stuck
|
|
762
|
+
'accept-encoding',
|
|
763
|
+
'user-agent',
|
|
764
|
+
];
|
|
765
|
+
|
|
766
|
+
const hopByHopHeaders = [
|
|
767
|
+
'connection',
|
|
768
|
+
'proxy-connection',
|
|
769
|
+
'proxy-authenticate',
|
|
770
|
+
'proxy-authorization',
|
|
771
|
+
'te',
|
|
772
|
+
'trailer',
|
|
773
|
+
'transfer-encoding',
|
|
774
|
+
'upgrade',
|
|
775
|
+
'keep-alive',
|
|
776
|
+
];
|
|
777
|
+
|
|
778
|
+
const xHeaders = [
|
|
779
|
+
'x-forwarded-proto',
|
|
780
|
+
'x-request-id',
|
|
781
|
+
'x-envoy-attempt-count',
|
|
782
|
+
'x-forwarded-for',
|
|
783
|
+
'x-forwarded-client-cert',
|
|
784
|
+
'x-envoy-external-address',
|
|
785
|
+
'x-envoy-decorator-operation',
|
|
786
|
+
'x-envoy-peer-metadata',
|
|
787
|
+
'x-envoy-peer-metadata-id',
|
|
788
|
+
'x-b3-traceid',
|
|
789
|
+
'x-b3-spanid',
|
|
790
|
+
'x-b3-parentspanid',
|
|
791
|
+
'x-b3-sampled',
|
|
792
|
+
];
|
|
793
|
+
|
|
756
794
|
module.exports = {
|
|
757
795
|
internalPartyToMojaloopParty,
|
|
758
796
|
internalQuoteResponseToMojaloop,
|
|
@@ -774,4 +812,7 @@ module.exports = {
|
|
|
774
812
|
mojaloopFxTransferPrepareToInternal,
|
|
775
813
|
internalFxQuoteResponseToMojaloop,
|
|
776
814
|
internalFxTransferResponseToMojaloop,
|
|
815
|
+
sensitiveHeaders,
|
|
816
|
+
hopByHopHeaders,
|
|
817
|
+
xHeaders
|
|
777
818
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.34",
|
|
4
4
|
"description": "Mojaloop sdk scheme adapter command event handler",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@mojaloop/api-snippets": "17.10.3",
|
|
45
|
-
"@mojaloop/central-services-shared": "18.26.
|
|
45
|
+
"@mojaloop/central-services-shared": "18.26.2",
|
|
46
46
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
47
47
|
"@mojaloop/logging-bc-public-types-lib": "0.5.5",
|
|
48
48
|
"@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"convict": "6.2.4",
|
|
52
52
|
"express": "4.21.2",
|
|
53
53
|
"openapi-backend": "5.12.0",
|
|
54
|
-
"redis": "5.0
|
|
54
|
+
"redis": "5.1.0",
|
|
55
55
|
"swagger-ui-express": "5.0.1",
|
|
56
56
|
"yamljs": "0.3.0"
|
|
57
57
|
},
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@types/convict": "6.1.6",
|
|
61
61
|
"@types/express": "5.0.2",
|
|
62
62
|
"@types/jest": "29.5.14",
|
|
63
|
-
"@types/node": "22.15.
|
|
63
|
+
"@types/node": "22.15.21",
|
|
64
64
|
"@types/node-cache": "4.2.5",
|
|
65
65
|
"@types/supertest": "6.0.3",
|
|
66
66
|
"@types/swagger-ui-express": "4.1.8",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.34",
|
|
4
4
|
"description": "mojaloop sdk scheme adapter outbound domain event handler",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"convict": "6.2.4",
|
|
50
50
|
"express": "4.21.2",
|
|
51
51
|
"openapi-backend": "5.12.0",
|
|
52
|
-
"redis": "5.0
|
|
52
|
+
"redis": "5.1.0",
|
|
53
53
|
"swagger-ui-express": "5.0.1",
|
|
54
54
|
"yamljs": "0.3.0"
|
|
55
55
|
},
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/convict": "6.1.6",
|
|
58
58
|
"@types/express": "5.0.2",
|
|
59
59
|
"@types/jest": "29.5.14",
|
|
60
|
-
"@types/node": "22.15.
|
|
60
|
+
"@types/node": "22.15.21",
|
|
61
61
|
"@types/node-cache": "4.2.5",
|
|
62
62
|
"@types/supertest": "6.0.3",
|
|
63
63
|
"@types/swagger-ui-express": "4.1.8",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
|
|
3
|
-
"version": "0.4.0-snapshot.
|
|
3
|
+
"version": "0.4.0-snapshot.34",
|
|
4
4
|
"description": "SDK Scheme Adapter private shared library.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/accounts-and-balances-bc/tree/main/modules/private-types",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@mojaloop/api-snippets": "17.10.3",
|
|
33
|
-
"@mojaloop/central-services-shared": "18.26.
|
|
33
|
+
"@mojaloop/central-services-shared": "18.26.2",
|
|
34
34
|
"@mojaloop/logging-bc-public-types-lib": "0.5.5",
|
|
35
35
|
"@mojaloop/platform-shared-lib-messaging-types-lib": "0.7.2",
|
|
36
36
|
"@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "0.5.18",
|
|
37
37
|
"ajv": "8.17.1",
|
|
38
|
-
"redis": "5.0
|
|
38
|
+
"redis": "5.1.0",
|
|
39
39
|
"uuid": "11.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/compat": "1.2.9",
|
|
43
|
-
"@types/node": "22.15.
|
|
43
|
+
"@types/node": "22.15.21",
|
|
44
44
|
"@types/uuid": "10.0.0",
|
|
45
45
|
"@typescript-eslint/eslint-plugin": "8.32.1",
|
|
46
46
|
"@typescript-eslint/parser": "8.32.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter",
|
|
3
|
-
"version": "24.9.
|
|
3
|
+
"version": "24.9.2-snapshot.2",
|
|
4
4
|
"description": "mojaloop sdk-scheme-adapter",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/jest": "29.5.14",
|
|
85
|
-
"@types/node": "22.15.
|
|
85
|
+
"@types/node": "22.15.21",
|
|
86
86
|
"@types/node-cache": "4.2.5",
|
|
87
87
|
"@typescript-eslint/eslint-plugin": "8.32.1",
|
|
88
88
|
"@typescript-eslint/parser": "8.32.1",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|