account-lookup-service 15.6.0-iso.21 → 15.6.0-iso.23
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/audit-ci.jsonc
CHANGED
@@ -29,6 +29,7 @@
|
|
29
29
|
"GHSA-rv95-896h-c2vc", // https://github.com/advisories/GHSA-rv95-896h-c2vc
|
30
30
|
"GHSA-952p-6rrq-rcjv", // https://github.com/advisories/GHSA-952p-6rrq-rcjv
|
31
31
|
"GHSA-3xgq-45jj-v275", // https://github.com/advisories/GHSA-3xgq-45jj-v275
|
32
|
-
"GHSA-rhx6-c78j-4q9w" // https://github.com/advisories/GHSA-rhx6-c78j-4q9w
|
32
|
+
"GHSA-rhx6-c78j-4q9w", // https://github.com/advisories/GHSA-rhx6-c78j-4q9w
|
33
|
+
"GHSA-mwcw-c2x4-8c55" // https://github.com/advisories/GHSA-mwcw-c2x4-8c55
|
33
34
|
]
|
34
35
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "account-lookup-service",
|
3
3
|
"description": "Account Lookup Service is used to validate Party and Participant lookups.",
|
4
|
-
"version": "15.6.0-iso.
|
4
|
+
"version": "15.6.0-iso.23",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "ModusBox",
|
7
7
|
"contributors": [
|
@@ -94,12 +94,12 @@
|
|
94
94
|
"@mojaloop/central-services-health": "15.0.0",
|
95
95
|
"@mojaloop/central-services-logger": "11.5.1",
|
96
96
|
"@mojaloop/central-services-metrics": "12.4.2",
|
97
|
-
"@mojaloop/central-services-shared": "18.14.
|
98
|
-
"@mojaloop/central-services-stream": "11.
|
99
|
-
"@mojaloop/database-lib": "11.0
|
97
|
+
"@mojaloop/central-services-shared": "18.14.2",
|
98
|
+
"@mojaloop/central-services-stream": "11.4.1",
|
99
|
+
"@mojaloop/database-lib": "11.1.0",
|
100
100
|
"@mojaloop/event-sdk": "14.1.1",
|
101
101
|
"@mojaloop/inter-scheme-proxy-cache-lib": "2.3.1",
|
102
|
-
"@mojaloop/ml-schema-transformer-lib": "2.
|
102
|
+
"@mojaloop/ml-schema-transformer-lib": "2.5.0",
|
103
103
|
"@mojaloop/sdk-standard-components": "19.6.2",
|
104
104
|
"@now-ims/hapi-now-auth": "2.1.0",
|
105
105
|
"ajv": "8.17.1",
|
@@ -157,7 +157,7 @@
|
|
157
157
|
"jest": "29.7.0",
|
158
158
|
"jest-junit": "16.0.0",
|
159
159
|
"jsdoc": "4.0.4",
|
160
|
-
"nodemon": "3.1.
|
160
|
+
"nodemon": "3.1.9",
|
161
161
|
"npm-check-updates": "17.1.11",
|
162
162
|
"nyc": "17.1.0",
|
163
163
|
"pre-commit": "1.2.2",
|
@@ -94,7 +94,7 @@ exports.createOracle = async (payload) => {
|
|
94
94
|
const extensions = err.extensions || []
|
95
95
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
96
96
|
errorCounter.inc({
|
97
|
-
code: fspiopError?.apiErrorCode,
|
97
|
+
code: fspiopError?.apiErrorCode?.code,
|
98
98
|
system,
|
99
99
|
operation: 'createOracle',
|
100
100
|
step
|
@@ -163,7 +163,7 @@ exports.getOracle = async (query) => {
|
|
163
163
|
const extensions = err.extensions || []
|
164
164
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
165
165
|
errorCounter.inc({
|
166
|
-
code: fspiopError?.apiErrorCode,
|
166
|
+
code: fspiopError?.apiErrorCode?.code,
|
167
167
|
system,
|
168
168
|
operation: 'getOracle',
|
169
169
|
step
|
@@ -250,7 +250,7 @@ exports.updateOracle = async (params, payload) => {
|
|
250
250
|
const extensions = err.extensions || []
|
251
251
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
252
252
|
errorCounter.inc({
|
253
|
-
code: fspiopError?.apiErrorCode,
|
253
|
+
code: fspiopError?.apiErrorCode?.code,
|
254
254
|
system,
|
255
255
|
operation: 'updateOracle',
|
256
256
|
step
|
@@ -284,7 +284,7 @@ exports.deleteOracle = async (params) => {
|
|
284
284
|
const extensions = err.extensions || []
|
285
285
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
286
286
|
errorCounter.inc({
|
287
|
-
code: fspiopError?.apiErrorCode,
|
287
|
+
code: fspiopError?.apiErrorCode?.code,
|
288
288
|
system,
|
289
289
|
operation: 'deleteOracle'
|
290
290
|
})
|
@@ -131,7 +131,7 @@ const getParticipantsByTypeAndID = async (headers, params, method, query, span,
|
|
131
131
|
const extensions = err.extensions || []
|
132
132
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
133
133
|
errorCounter.inc({
|
134
|
-
code: fspiopError?.apiErrorCode,
|
134
|
+
code: fspiopError?.apiErrorCode?.code,
|
135
135
|
system,
|
136
136
|
operation: 'getParticipantsByTypeAndID',
|
137
137
|
step
|
@@ -252,7 +252,7 @@ const putParticipantsByTypeAndID = async (headers, params, method, payload, cach
|
|
252
252
|
const extensions = err.extensions || []
|
253
253
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
254
254
|
errorCounter.inc({
|
255
|
-
code: fspiopError?.apiErrorCode,
|
255
|
+
code: fspiopError?.apiErrorCode?.code,
|
256
256
|
system,
|
257
257
|
operation: 'putParticipantsByTypeAndID',
|
258
258
|
step
|
@@ -328,7 +328,7 @@ const putParticipantsErrorByTypeAndID = async (headers, params, payload, dataUri
|
|
328
328
|
const extensions = err.extensions || []
|
329
329
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
330
330
|
errorCounter.inc({
|
331
|
-
code: fspiopError?.apiErrorCode,
|
331
|
+
code: fspiopError?.apiErrorCode?.code,
|
332
332
|
system,
|
333
333
|
operation: 'putParticipantsErrorByTypeAndID',
|
334
334
|
step
|
@@ -434,7 +434,7 @@ const postParticipants = async (headers, method, params, payload, span, cache) =
|
|
434
434
|
const extensions = err.extensions || []
|
435
435
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
436
436
|
errorCounter.inc({
|
437
|
-
code: fspiopError?.apiErrorCode,
|
437
|
+
code: fspiopError?.apiErrorCode?.code,
|
438
438
|
system,
|
439
439
|
operation: 'postParticipants',
|
440
440
|
step
|
@@ -566,7 +566,7 @@ const postParticipantsBatch = async (headers, method, requestPayload, span) => {
|
|
566
566
|
const extensions = err.extensions || []
|
567
567
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
568
568
|
errorCounter.inc({
|
569
|
-
code: fspiopError?.apiErrorCode,
|
569
|
+
code: fspiopError?.apiErrorCode?.code,
|
570
570
|
system,
|
571
571
|
operation: 'postParticipantsBatch',
|
572
572
|
step
|
@@ -662,7 +662,7 @@ const deleteParticipants = async (headers, params, method, query, cache) => {
|
|
662
662
|
const extensions = err.extensions || []
|
663
663
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
664
664
|
errorCounter.inc({
|
665
|
-
code: fspiopError?.apiErrorCode,
|
665
|
+
code: fspiopError?.apiErrorCode?.code,
|
666
666
|
system,
|
667
667
|
operation: 'deleteParticipants',
|
668
668
|
step
|
@@ -91,12 +91,16 @@ const getPartiesByTypeAndID = async (headers, params, method, query, span, cache
|
|
91
91
|
const proxyEnabled = !!(Config.PROXY_CACHE_CONFIG.enabled && proxyCache)
|
92
92
|
const type = params.Type
|
93
93
|
const partySubId = params.SubId
|
94
|
+
const callbackEndpointType = utils.getPartyCbType(partySubId)
|
94
95
|
const source = headers[Headers.FSPIOP.SOURCE]
|
95
96
|
const proxy = proxyEnabled && headers[Headers.FSPIOP.PROXY]
|
96
|
-
|
97
|
+
let destination = headers[Headers.FSPIOP.DESTINATION]
|
98
|
+
// see https://github.com/mojaloop/design-authority/issues/79
|
99
|
+
// the requester has specified a destination routing header. We should respect that and forward the request directly to the destination
|
100
|
+
// without consulting any oracles.
|
97
101
|
|
98
102
|
const childSpan = span ? span.getChild('getPartiesByTypeAndID') : undefined
|
99
|
-
log.info('parties::getPartiesByTypeAndID::begin', { source, proxy, params })
|
103
|
+
log.info('parties::getPartiesByTypeAndID::begin', { source, destination, proxy, params })
|
100
104
|
|
101
105
|
let requester
|
102
106
|
let fspiopError
|
@@ -110,10 +114,6 @@ const getPartiesByTypeAndID = async (headers, params, method, query, span, cache
|
|
110
114
|
...(partySubId && { partySubIdOrType: partySubId })
|
111
115
|
}
|
112
116
|
|
113
|
-
let destination = headers[Headers.FSPIOP.DESTINATION]
|
114
|
-
// see https://github.com/mojaloop/design-authority/issues/79
|
115
|
-
// the requester has specified a destination routing header. We should respect that and forward the request directly to the destination
|
116
|
-
// without consulting any oracles.
|
117
117
|
if (destination) {
|
118
118
|
step = 'validateParticipant-1'
|
119
119
|
const destParticipantModel = await participant.validateParticipant(destination)
|
@@ -122,6 +122,7 @@ const getPartiesByTypeAndID = async (headers, params, method, query, span, cache
|
|
122
122
|
const proxyId = proxyEnabled && await proxyCache.lookupProxyByDfspId(destination)
|
123
123
|
|
124
124
|
if (!proxyId) {
|
125
|
+
log.warn('no destination participant, and no dfsp-to-proxy mapping', { destination })
|
125
126
|
const errMessage = ERROR_MESSAGES.partyDestinationFspNotFound
|
126
127
|
throw ErrorHandler.Factory.createFSPIOPError(ErrorHandler.Enums.FSPIOPErrorCodes.ID_NOT_FOUND, errMessage)
|
127
128
|
}
|
@@ -247,7 +248,7 @@ const getPartiesByTypeAndID = async (headers, params, method, query, span, cache
|
|
247
248
|
const extensions = err.extensions || []
|
248
249
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
249
250
|
errorCounter.inc({
|
250
|
-
code: fspiopError?.apiErrorCode,
|
251
|
+
code: fspiopError?.apiErrorCode?.code,
|
251
252
|
system,
|
252
253
|
operation: 'getPartiesByTypeAndID',
|
253
254
|
step
|
@@ -137,7 +137,7 @@ const putPartiesByTypeAndID = async (headers, params, method, payload, dataUri,
|
|
137
137
|
const extensions = err.extensions || []
|
138
138
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
139
139
|
errorCounter.inc({
|
140
|
-
code: fspiopError?.apiErrorCode,
|
140
|
+
code: fspiopError?.apiErrorCode?.code,
|
141
141
|
system,
|
142
142
|
operation: 'putPartiesByTypeAndID',
|
143
143
|
step
|
@@ -223,7 +223,7 @@ const putPartiesErrorByTypeAndID = async (headers, params, payload, dataUri, spa
|
|
223
223
|
const extensions = err.extensions || []
|
224
224
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
225
225
|
errorCounter.inc({
|
226
|
-
code: fspiopError?.apiErrorCode,
|
226
|
+
code: fspiopError?.apiErrorCode?.code,
|
227
227
|
system,
|
228
228
|
operation: 'putPartiesErrorByTypeAndID',
|
229
229
|
step
|
@@ -77,7 +77,7 @@ const sendTimeoutCallback = async (cacheKey) => {
|
|
77
77
|
const extensions = err.extensions || []
|
78
78
|
const system = extensions.find((element) => element.key === 'system')?.value || ''
|
79
79
|
errorCounter.inc({
|
80
|
-
code: fspiopError?.apiErrorCode,
|
80
|
+
code: fspiopError?.apiErrorCode?.code,
|
81
81
|
system,
|
82
82
|
operation: 'sendTimeoutCallback',
|
83
83
|
step
|