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

Hotfixes for POST-GET /transfer operations #96

Conversation

mdebarros
Copy link
Member

@mdebarros mdebarros commented Mar 19, 2019

PR for mojaloop/project#687 which includes fixes for:

  • Updated the header transfomer.js:
    • GET/POST headers are now returned correctly
      • 'FSPIOP-URL' is now removed on all callback operations
      • 'FSPIOP-Signature' is now removed if the 'FSPIOP-Source'=switch
      • FSPIOP-Source='switch' is now returned for GET /transfers
  • sendCallback now requires a sourceFps and destinationFsp to correctly set the FSPIOP-Source and FSPIOP-Destination headers, and transform the headers with the changes described above.

Maintenance changes:

  • Bumped up version to 5.4.0
  • Added a new rejectUnauthorized config to the default.json for Callbacks. Please ensure that you updated your default.json to add this new config parameter.
  • Moved removeJwsHeaders functionality to the transform.js
  • Added lib/enum.js for general enums
  • Updated notification handler to use enums for action and result comparisons

- Added sourceFsp and destinationFsp params to the transformHeaders. It will not use those fields to set the FSPIOP Source and Destination headers
- transformHeaders will now remove the FSPIOP Signature when the sourceFsp matches the switch regex
- Created enums for all headers and switch regex and value
- Updated Notification Handler to set the sourceFsp and destinationFsp for all Callback requests which are mapped from the Message.value.to & Message.value.from values respectively. These should be correctly set by the Central-Ledger or otherwise passed-through by the request.

General changes:
- New config for ENDPOINT_SECURITY.TLS.rejectUnauthorized to enable or disable Certificate validation. Note that this will default to 'true' if not configured in either the default.json config file or through an environment parameter.

Todo:
- Fix unit tests
- Verify Integration Tests
- Enums in ml-api-adapter and central-ledger need to be consolidated into a central library or otherwise have an API on central-ledger to query the shared values.
- Bumped up version to 5.4.0
- moved 'methods' in transfer handler to enums
- moved defaulting of the rejectUnauthorized config into the /src/lib/config.js
@mdebarros mdebarros self-assigned this Mar 19, 2019
- added enums for transferEventType & transferActionType
- updated notification handler to use the transferActionType enum
- rolled back change for the rejectUnauthroized config defaulting. Change was too complicated, and it was decided that this should fail if its not added to the default.json.
rmothilal
rmothilal previously approved these changes Mar 19, 2019
Copy link
Contributor

@rmothilal rmothilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy

src/domain/transfer/transformer.js Outdated Show resolved Hide resolved
src/handlers/notification/index.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants