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

FSPIOP API version negotiation not handled - Bulk-api-adapter #2538

Closed
mdebarros opened this issue Oct 5, 2021 · 0 comments
Closed

FSPIOP API version negotiation not handled - Bulk-api-adapter #2538

mdebarros opened this issue Oct 5, 2021 · 0 comments
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Milestone

Comments

@mdebarros
Copy link
Member

Summary:

FSPIOP-API Service for Bulk-api-adapter is not handling API Negotiation according to the Mojaloop API Specification - Section 3.3.4.3.

Severity:
Medium

Priority:
High

Expected Behavior

There are two scenarios that need to be addressed:

  1. FSPIOP API Switch Service at Switch should synchronously validate the incoming accept request headers, and fail with HTTP status 406 response to the Source-Participant (i.e. Payer) if the requested version is not supported
  2. The request is accepted by the Switch and should route the request to the Destination-Participant (i.e. Payee)
    a. If Destination-Participant does not accept the API version, they will synchronously respond with HTTP status 406 response.
    b. The Switch will then take compensating actions, and send an error-callback to the Source-Participant

Steps to Reproduce

The following steps respectively match the two scenarios described above:

  1. Send an FSPIOP Payer Request to the FSPIOP API Switch Service with an API version that is not supported by the Switch
  2. Send an FSPIOP Payer Request to the FSPIOP Service which is supported by the Switch, but not by the Destination-Participant

Specifications

  • Component (if known): Bulk-api-adapter
  • Version: v11.1.4
  • Platform: n/a
  • Subsystem: n/a
  • Type of testing: manual
  • Bug found/raised by: @mdebarros

Notes:

  • Severity when opened: Medium
  • Priority when opened: High
@mdebarros mdebarros added bug Something isn't working or it has wrong behavior on a Mojaloop Core service 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 labels Oct 5, 2021
@mdebarros mdebarros self-assigned this Nov 16, 2021
mdebarros added a commit to mdebarros/bulk-api-adapter that referenced this issue Nov 17, 2021
- fix(mojaloop/#2538): fspiop api version negotiation not handled - mojaloop/project#2538
    - added getOptionsForFSPIOPHeaderValidation to the plugin configuration
    - added new config key for PROTOCOL_VERSIONS to default and integration configs
    - added DEFAULT_PROTOCOL_VERSION for backward compatibility
    - updated config and unit tests to FSPIOP v1.1 protocol version
    - BKAPI_PROTOCOL_VERSIONS__ACCEPT__VALIDATELIST can be set as follows "[ \"1\", \"1.1\"]" and it will be parsed correctly into a object
    - Added unit tests for config changes

BREAKING CHANGE: Forcing a major version change for awareness of the config changes. The `LIB_RESOURCE_VERSIONS` env var is now deprecated, and this is now also controlled by the PROTOCOL_VERSIONS config in the default.json. This has been done for consistency between all API services going forward and unifies the config for both inbound and outbound Protocol API validation/transformation features.
mdebarros added a commit to mojaloop/bulk-api-adapter that referenced this issue Nov 17, 2021
- fix(mojaloop/#2538): fspiop api version negotiation not handled - mojaloop/project#2538
    - added getOptionsForFSPIOPHeaderValidation to the plugin configuration
    - added new config key for PROTOCOL_VERSIONS to default and integration configs
    - added DEFAULT_PROTOCOL_VERSION for backward compatibility
    - updated config and unit tests to FSPIOP v1.1 protocol version
    - BKAPI_PROTOCOL_VERSIONS__ACCEPT__VALIDATELIST can be set as follows "[ \"1\", \"1.1\"]" and it will be parsed correctly into a object
    - Added unit tests for config changes

- chore: added automated ci-cd release configs for circleci
    - updated circleci config
    - added standard-version dependency and release script to package.json

- chore: changed circleci config to use the commit sha1 instead of package checksum to fix caching issues

BREAKING CHANGE: Forcing a major version change for awareness of the config changes. The `LIB_RESOURCE_VERSIONS` env var is now deprecated, and this is now also controlled by the PROTOCOL_VERSIONS config in the default.json. This has been done for consistency between all API services going forward and unifies the config for both inbound and outbound Protocol API validation/transformation features.
@elnyry-sam-k elnyry-sam-k added this to the Sprint 16.2 milestone Nov 17, 2021
@elnyry-sam-k elnyry-sam-k removed the to-be-refined This story is ready to be groomed label Nov 18, 2021
@elnyry-sam-k elnyry-sam-k modified the milestones: Sprint 16.2, Sprint 16.3 Dec 1, 2021
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 oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Projects
None yet
Development

No branches or pull requests

2 participants