Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for [core bulk] POST /bulkTransfers from Switch --> PayeeFSP to use Switch as fspiop-source #2867 #3024

Closed
mdebarros opened this issue Nov 17, 2022 · 2 comments
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service core-dev-squad oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it to-be-refined This story is ready to be groomed

Comments

@mdebarros
Copy link
Member

mdebarros commented Nov 17, 2022

Summary:
Bug is for Feat #2867.

The following validation error occurs on the Central-Ledger Bulk Transfer Fulfil Handler as a result of the following bulk-api-adapter/releases/tag/v14.2.0:

2022-11-17T16:59:56.855Z - info: BulkFulfilHandler::bulkFulfil
2022-11-17T16:59:56.856Z - info: BulkFulfilHandler::bulkFulfil::dupCheck
.returning() is not supported by mysql and will not have any effect.
2022-11-17T16:59:56.870Z - error: BulkFulfilHandler::bulkFulfil::validationFailed
2022-11-17T16:59:56.870Z - error: validationFailure Reasons - []
2022-11-17T16:59:56.870Z - info: BulkFulfilHandler::bulkFulfil::validationFailed::saveInvalidRequest
.returning() is not supported by mysql and will not have any effect.
.returning() is not supported by mysql and will not have any effect.
2022-11-17T16:59:56.897Z - info: BulkFulfilHandler::bulkFulfil::validationFailed::saveInvalidRequest::callbackErrorGeneric--BC8
2022-11-17T16:59:56.901Z - error: BulkFulfilHandler::bulkFulfil::validationFailed::saveInvalidRequest::callbackErrorGeneric--BC8::FSPIOP-Destination header should match Payer FSP--BP0
2022-11-17T16:59:56.901Z - error: FSPIOP-Destination header should match Payer FSP
2022-11-17T16:59:56.902Z - error: Consumer::consume()::syncQueue.queue - error: {"message":"FSPIOP-Destination header should match Payer FSP","apiErrorCode":{"code":"3100","message":"Generic validation error","httpStatusCode":400,"name":"VALIDATION_ERROR","type":{"regex":"^31[0-9]{2}$","description":"Client Validation Error","httpStatusCode":400,"name":"CLIENT_VALIDATION_ERROR"}}}
2022-11-17T16:59:56.902Z - error: Consumer::onError()[topics='topic-bulk-fulfil'] - FSPIOPError: FSPIOP-Destination header should match Payer FSP
    at Object.createFSPIOPError (/opt/app/node_modules/@mojaloop/central-services-error-handling/src/factory.js:198:12)
    at validateFspiopSourceAndDestination (/opt/app/src/handlers/bulk/shared/validator.js:101:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.validateBulkTransferFulfilment (/opt/app/src/handlers/bulk/shared/validator.js:206:24)
    at async bulkFulfil (/opt/app/src/handlers/bulk/fulfil/handler.js:118:34))
2022-11-17T16:59:56.903Z - error: Consumer::consume() - error {"message":"FSPIOP-Destination header should match Payer FSP","apiErrorCode":{"code":"3100","message":"Generic validation error","httpStatusCode":400,"name":"VALIDATION_ERROR","type":{"regex":"^31[0-9]{2}$","description":"Client Validation Error","httpStatusCode":400,"name":"CLIENT_VALIDATION_ERROR"}}}

Severity:
Medium

Priority:
Medium

Expected Behavior

  • Switch should allow for incoming PUT Callback with Destination="Switch" to validate if the outgoing POST Requests Source="Switch".

Steps to Reproduce

  1. Deploy the following Helm Branch with the following enabled --> feat(mojaloop/2867): post /bulkTransfers from Switch to PayeeFSP to use Switch as fspiop-source helm#528
    • --set "mojaloop-bulk.enabled: true"
    • -- set "ml-ttk-test-val-bulk.tests.enabled=true"
  2. Run helm test

Specifications

  • Component (if known): bulk-api-adapter
  • Version: v14.2.0
  • Platform: n/a
  • Subsystem:
  • Type of testing: helm
  • Bug found/raised by: @mdebarros

Notes:

  • Severity when opened: Medium
  • Priority when opened: Medium
@mdebarros mdebarros added bug Something isn't working or it has wrong behavior on a Mojaloop Core service to-be-refined This story is ready to be groomed labels Nov 17, 2022
@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Nov 17, 2022
@mdebarros mdebarros self-assigned this Nov 18, 2022
mdebarros added a commit to mojaloop/testing-toolkit-test-cases that referenced this issue Nov 18, 2022
…PayeeFSP to use Switch as fspiop-source

fix(mojaloop/#3024 ): [core bulk] POST /bulkTransfers from Switch to PayeeFSP to use Switch as fspiop-source - mojaloop/project#3024
- updated other/bulk_transfers to correctly reflect "DESTINATION" headers to switch
mdebarros added a commit to mojaloop/central-ledger that referenced this issue Nov 18, 2022
…ayeeFSP to use Switch as fspiop-source

fix(mojaloop/#3024): [core bulk] POST /bulkTransfers from Switch to PayeeFSP to use Switch as fspiop-source - mojaloop/project#3024
- updated fulfil-handler to only check headers on non-bulk actions
- updated bulk-fulfil-handler validation to also accept "switch" as a valid DESTINATION header
mdebarros added a commit to mojaloop/testing-toolkit-test-cases that referenced this issue Nov 21, 2022
…ayeeFSP to use Switch as fspiop-source (#98)

fix(mojaloop/#3024): [core bulk] POST /bulkTransfers from Switch to PayeeFSP to use Switch as fspiop-source - mojaloop/project#3024
- updated other/bulk_transfers to correctly reflect "DESTINATION" headers to switch
mdebarros added a commit to mojaloop/central-ledger that referenced this issue Nov 21, 2022
…se Switch as fspiop-source (#926)

fix(mojaloop/#3024): [core bulk] POST /bulkTransfers from Switch to PayeeFSP to use Switch as fspiop-source - mojaloop/project#3024
- updated fulfil-handler to only check routing headers on non-bulk actions
- updated bulk-fulfil-handler validation to also accept "switch" as a valid DESTINATION header
- updated dependencies

Related PRs:
- mojaloop/testing-toolkit-test-cases#98

Co-authored-by: Sam <[email protected]>
@mdebarros
Copy link
Member Author

Test results available here: mojaloop/helm#528 (comment)

@mdebarros mdebarros reopened this Nov 21, 2022
mdebarros added a commit to mojaloop/helm that referenced this issue Nov 21, 2022
…se Switch as fspiop-source (#528)

- upgraded bulk-api-adapter from v14.1.1 to v14.2.0 for mojaloop/project#2867
- upgraded central-ledger from v16.3.0 to v16.3.1  for mojaloop/project#3024
- added JWS config to ENDPOINT_SECURITY default.json for bulk-api-adapters helm charts
- added endpointSecurity config to bulk-api-adapter notification handler config
- added secret-jws template to bulk-api-adapter notification handler
- added volume mounts to bulk-api-adapter notification handler deployment template
mdebarros added a commit to mojaloop/testing-toolkit-test-cases that referenced this issue Nov 22, 2022
feat(mojaloop/#2975): mojaloop helm release v14.1.0 - mojaloop/project#2975
- updates to support [Helm v14.1.0 WIP release](mojaloop/helm#509)

fix(mojaloop/#3024): [core bulk] POST /bulkTransfers from Switch to PayeeFSP to use Switch as fspiop-source - mojaloop/project#3024
- updated other/bulk_transfers to correctly reflect "DESTINATION" headers to switch

Co-authored-by: vijayg10 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service core-dev-squad oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it to-be-refined This story is ready to be groomed
Projects
None yet
Development

No branches or pull requests

3 participants