├── .circleci └── config.yml ├── .dockerignore ├── .gitignore ├── .grype.yaml ├── .ncurc.yaml ├── .npmignore ├── .nvmrc ├── .versionrc.js ├── CHANGELOG.md ├── CODEOWNERS ├── Dockerfile ├── Dockerfile-newman ├── LICENSE.md ├── README.md ├── assets ├── diagrams │ ├── architectural │ │ └── architectural-diagram.svg │ └── flow │ │ └── flow-diagram.svg └── images │ ├── Sample-Response-Failure.png │ ├── Screenshot 2020-04-16 at 22.58.04.png │ ├── TLS-Enabled-on-Environment.png │ ├── adapter-mutual-tls-enabled.png │ ├── add-additional-input-values.png │ ├── add-condition-button.png │ ├── add-new-assertion.png │ ├── add-new-input-value.png │ ├── add-new-input-variable.png │ ├── additional-transfers.png │ ├── api-provisioning-add-new-api-confirmation.png │ ├── api-provisioning-file-input-window.png │ ├── api-provisioning-list-apis-view.png │ ├── api-provisioning-menu-item.png │ ├── apply_and_restart.jpg │ ├── assess-request-or-response.png │ ├── assess-response-equation-save.png │ ├── assess-response-equation.png │ ├── assess-response-status.png │ ├── building-new-rules-file.png │ ├── callback-rules-screen.png │ ├── configurable-parameter-assertion.png │ ├── configurable-parameter-currency.png │ ├── configurable-parameter.png │ ├── connection-manager-ui-opening.png │ ├── create-inbound-user-simulator.png │ ├── creating-new-rule-file.png │ ├── dfsp-client-cacert.png │ ├── dfsp-client-submit.png │ ├── dfsp-client.png │ ├── dfsp-p2p-happy-path.png │ ├── dfsp-server-cacert.png │ ├── dfsp-server-cert.png │ ├── download-report.png │ ├── drive_have_not_been_shared.jpg │ ├── event-response-options.png │ ├── expand-monitoring-messages.png │ ├── fixed-response-sample.png │ ├── header-selection.png │ ├── heap_error_windows.jpg │ ├── hosted-mode-docker-compose-intro.png │ ├── hub-client-cert.png │ ├── import-template.png │ ├── inbound-requests-environment.png │ ├── inbound-requests-scripts.png │ ├── jws-certificate-submit.png │ ├── jws-certificate.png │ ├── jws-certs-keys.png │ ├── jws-hub-certs-keys.png │ ├── local-enable-jws-publickey.png │ ├── local-mutual-tls-enabled.png │ ├── local_drives_to_be_available.jpg │ ├── mcm-environment-opening.png │ ├── menu-items.png │ ├── mock-response-sample.png │ ├── monitoring-initial-state.png │ ├── monitoring-messages.png │ ├── new-empty-assertion.png │ ├── opened-imported-template.png │ ├── opening-default-settings.png │ ├── opening-sync-response-rules.png │ ├── opening-view.png │ ├── outbound-display-opening-hub.png │ ├── outbound-display-opening.png │ ├── override-with-environment-variable.png │ ├── populate-with-sample-body.png │ ├── resource-selection.png │ ├── rule-builder-select-api.png │ ├── sample-condition-add-configurable-params.png │ ├── sample-condition.png │ ├── sample-editor.png │ ├── sample-request.png │ ├── sample-test-assertion.png │ ├── send-transfer.png │ ├── sending-single-test-case-1.png │ ├── sending-single-test-case-2.png │ ├── sending-test-cases.png │ ├── server-certificates-submitted.png │ ├── simulator-response.png │ ├── simulator-scheme-adapter-endpoint.png │ ├── summarized-view-of-rule.png │ ├── template-window.png │ ├── test-case-editor-console-log.png │ ├── test-case-editor-environment-state.png │ ├── test-case-editor-scripts.png │ ├── test-case-editor.png │ ├── testcase-definition-download.png │ ├── testcase-definition-edit-meta-info.png │ ├── testing-toolkit-mojaloop-testing-toolkit-endpoint.png │ ├── tls-hub-certs-keys.png │ ├── tls-jws-enabled-on-environment.png │ ├── updated-sample-body-data.png │ ├── using-configurable-parameter.png │ ├── validation-rules-screen.png │ └── view-response.png ├── audit-ci.jsonc ├── connection-manager └── docker-compose.yml ├── database └── docker-compose.yml ├── docker-compose.yml ├── docker ├── hosted-mode-tls │ ├── docker-compose.yaml │ ├── keycloak │ │ └── keycloak-realm.json │ └── mongo-init.sh └── hosted-mode │ ├── docker-compose.yaml │ ├── keycloak │ └── keycloak-realm.json │ └── mongo-init.sh ├── documents ├── Mojaloop-Testing-Toolkit.md ├── RULES_ENGINE.md ├── User-Guide-API-Provisioning.md ├── User-Guide-CLI.md ├── User-Guide-Connection-Manager.md ├── User-Guide-Frequently-Asked-Questions.md ├── User-Guide-Hosted-Mode-Docker-Compose.md ├── User-Guide-Installation.md ├── User-Guide-Mojaloop-Testing-Toolkit.md ├── User-Guide-OAuth-Server-Deployment.md ├── User-Guide-Onboarding-DFSP.md ├── User-Guide-Onboarding-HUB.md └── User-Guide.md ├── examples ├── collections │ ├── dfsp │ │ ├── p2p_failed_tests.json │ │ ├── p2p_fx_happy_path.json │ │ ├── p2p_happy_path.json │ │ ├── p2p_happy_path_extended.json │ │ ├── p2p_happy_path_jws.json │ │ ├── p2p_payee_assertions_websocket.json │ │ ├── sample.json │ │ └── transaction_request_service.json │ ├── fxp │ │ ├── FXP.json │ │ ├── SDK_backend.json │ │ └── SDK_outbound.json │ ├── hub │ │ ├── hub_01_p2p_happy_path │ │ │ ├── hub_p2p_receive_quote.json │ │ │ └── hub_p2p_send_quote.json │ │ ├── hub_02_block_transfer │ │ │ └── hub_block_transfer.json │ │ ├── hub_03_funds_in_out │ │ │ ├── hub_funds_in.json │ │ │ └── hub_funds_out.json │ │ ├── hub_04_settlements │ │ │ └── hub_settlements.json │ │ ├── hub_05_transfer_negative_scenarios │ │ │ ├── hub_transfer_negative_payee_abort.json │ │ │ ├── hub_transfer_negative_payee_invalid_fulfillment.json │ │ │ └── hub_transfer_negative_transfer_timeout.json │ │ ├── hub_06_transaction_requests_service │ │ │ ├── hub_trs_authorizations.json │ │ │ ├── hub_trs_error_framework.json │ │ │ ├── hub_trs_received_state.json │ │ │ └── hub_trs_reject_state.json │ │ ├── hub_07_quoting_service.json │ │ ├── hub_08_participant_inactive_stop_transfers.json │ │ ├── hub_09_duplicate_handling_transfers.json │ │ ├── hub_10_on_us_transfers.json │ │ ├── hub_11_accented_and_spl_chars.json │ │ ├── hub_12_fspiop_version_1.1.json │ │ └── hub_13_bulk_transfers.json │ ├── iso20022 │ │ └── self_referencing_iso20022.json │ └── provisioning │ │ └── testingtoolkitdfsp.json └── environments │ ├── dfsp_local_environment.json │ └── hub_local_environment.json ├── jest.config.js ├── native-app-generation ├── assets │ └── macos │ │ └── start.sh └── build-native-app.sh ├── package-lock.json ├── package.json ├── secrets ├── keygen.sh ├── privatekey.pem ├── publickey.cer └── tls │ ├── 01.pem │ ├── createSecrets.sh │ ├── hub_client.csr │ ├── hub_client_cacert.pem │ ├── hub_client_cakey.pem │ ├── hub_client_key.key │ ├── hub_server.csr │ ├── hub_server_cacert.pem │ ├── hub_server_cakey.pem │ ├── hub_server_cert.pem │ ├── hub_server_key.key │ ├── index.txt │ ├── index.txt.attr │ ├── openssl-client.cnf │ ├── openssl-clientca.cnf │ ├── openssl-server.cnf │ ├── openssl-serverca.cnf │ └── serial.txt ├── simulator ├── docker-compose.yml ├── provision.sh ├── scheme-adapter.env ├── secrets │ ├── jws │ │ ├── keygen.sh │ │ ├── privatekey.pem │ │ ├── publickey.cer │ │ └── verification_keys │ │ │ ├── testingtoolkitdfsp.pem │ │ │ └── userdfsp2.pem │ └── tls │ │ ├── createSecrets.sh │ │ ├── index.txt │ │ ├── openssl-client.cnf │ │ ├── openssl-clientca.cnf │ │ ├── openssl-server.cnf │ │ ├── openssl-serverca.cnf │ │ └── serial.txt └── sim-backend.env ├── simulator2 ├── docker-compose.yml ├── scheme-adapter.env ├── secrets │ ├── jws │ │ ├── keygen.sh │ │ ├── privatekey.pem │ │ ├── publickey.cer │ │ └── verification_keys │ │ │ ├── testingtoolkitdfsp.pem │ │ │ └── userdfsp.pem │ └── tls │ │ ├── createSecrets.sh │ │ ├── dfsp_client.csr │ │ ├── dfsp_client_cacert.pem │ │ ├── dfsp_client_cacert.srl │ │ ├── dfsp_client_cakey.key │ │ ├── dfsp_client_cert.cer │ │ ├── dfsp_client_key.key │ │ ├── dfsp_server.csr │ │ ├── dfsp_server_cacert.pem │ │ ├── dfsp_server_cacert.srl │ │ ├── dfsp_server_cakey.key │ │ ├── dfsp_server_cert.pem │ │ ├── dfsp_server_key.key │ │ ├── hub_client.csr │ │ ├── hub_client_cacert.pem │ │ ├── hub_client_cert.pem │ │ ├── hub_server_cacert.pem │ │ └── openssl.conf └── sim-backend.env ├── spec_files ├── api_definitions │ ├── als_admin_1.1 │ │ └── api_spec.yaml │ ├── central_admin_1.0 │ │ ├── api_spec.yaml │ │ └── response_map.json │ ├── central_admin_old_9.3 │ │ ├── api_spec.yaml │ │ └── response_map.json │ ├── fspiop_1.0 │ │ ├── api_spec.yaml │ │ ├── callback_map.json │ │ ├── mockRef.json │ │ └── trigger_templates │ │ │ ├── transaction_request_followup.json │ │ │ └── transaction_request_followup_quotes_only.json │ ├── fspiop_1.1 │ │ ├── api_spec.yaml │ │ ├── callback_map.json │ │ ├── mockRef.json │ │ └── trigger_templates │ │ │ └── transaction_request_followup.json │ ├── fspiop_2.0 │ │ ├── api_spec.yaml │ │ ├── callback_map.json │ │ ├── mockRef.json │ │ └── trigger_templates │ │ │ └── transaction_request_followup.json │ ├── fspiop_2.0_iso20022 │ │ ├── api_spec.yaml │ │ ├── callback_map.json │ │ └── mockRef.json │ ├── fx-api_2.0 │ │ ├── api_spec.yaml │ │ ├── callback_map.json │ │ └── mockRef.json │ ├── mojaloop_sdk_outbound_scheme_adapter_1.0 │ │ ├── api_spec.yaml │ │ ├── mockRef.json │ │ └── response_map.json │ ├── mojaloop_simulator_0.1 │ │ └── api_spec.yaml │ ├── mojaloop_simulator_sim_1.4 │ │ ├── api_spec.yaml │ │ ├── mockRef.json │ │ └── response_map.json │ ├── payment_manager_1.4 │ │ └── api_spec.yaml │ ├── sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1 │ │ └── api_spec.yaml │ ├── sdk-scheme-adapter-outbound-v2_1_0-openapi3-snippets_2.1 │ │ └── api_spec.yaml │ ├── settlements_1.0 │ │ ├── api_spec.yaml │ │ ├── mockRef.json │ │ └── response_map.json │ ├── settlements_2.0 │ │ ├── api_spec.yaml │ │ ├── mockRef.json │ │ └── response_map.json │ └── thirdparty_sdk_outbound_0.1 │ │ └── api_spec.yaml ├── reports │ └── templates │ │ ├── newman │ │ ├── html_template.html │ │ └── pdf_template.html │ │ └── testcase_definition │ │ └── table_view.html ├── rules_callback │ ├── config.json │ ├── default.json │ └── p2p-limit.json ├── rules_forward │ ├── config.json │ └── default.json ├── rules_response │ ├── config.json │ └── default.json ├── rules_validation │ ├── config.json │ ├── default.json │ └── p2p-limit.json ├── system_config.json └── user_config.json ├── src ├── index.js ├── lib │ ├── MyEventEmitter.js │ ├── api-management.js │ ├── api-routes │ │ ├── config.js │ │ ├── history.js │ │ ├── keycloak.js │ │ ├── longpolling.js │ │ ├── oauth2.js │ │ ├── objectstore.js │ │ ├── openapi.js │ │ ├── outbound.js │ │ ├── reports.js │ │ ├── rules.js │ │ ├── samples.js │ │ ├── server-logs.js │ │ └── settings.js │ ├── api-server.js │ ├── arrayStore.js │ ├── callbackHandler.js │ ├── config.js │ ├── configuration-providers │ │ └── mb-connection-manager.js │ ├── db │ │ ├── adapters │ │ │ └── dbAdapter.js │ │ ├── dfspMockUsers.js │ │ └── models │ │ │ └── mongoDBWrapper.js │ ├── eventListenerClient │ │ └── inboundEventListener.js │ ├── fileAdapter.js │ ├── httpAgentStore.js │ ├── importExport.js │ ├── jws │ │ └── JwsSigning.js │ ├── loadSamples.js │ ├── logger.js │ ├── longpollingEmitter.js │ ├── metrics.js │ ├── mocking │ │ ├── custom-functions │ │ │ └── generic.js │ │ ├── middleware-functions │ │ │ ├── ilpModel.js │ │ │ ├── quotesAssociation.js │ │ │ └── transactionRequestsService.js │ │ ├── openApiDefinitionsModel.js │ │ ├── openApiMockHandler.js │ │ ├── openApiRulesEngine.js │ │ ├── openApiVersionTools.js │ │ └── transformers │ │ │ ├── fspiopToISO20022.js │ │ │ └── index.js │ ├── notificationEmitter.js │ ├── oauth │ │ ├── KeycloakHelper.js │ │ ├── LoginService.js │ │ ├── OAuthHelper.js │ │ ├── OAuthValidator.js │ │ └── Wso2Client.js │ ├── objectStore.js │ ├── objectStore │ │ ├── inMemoryImpl.js │ │ └── objectStoreInterface.js │ ├── report-generator │ │ ├── generator.js │ │ └── helpers.js │ ├── requestLogger.js │ ├── resources │ │ └── wso2carbon-publickey.cert │ ├── rulesEngine.js │ ├── rulesEngineModel.js │ ├── scripting-engines │ │ ├── postman-sandbox.js │ │ └── vm-javascript-sandbox.js │ ├── server-logs │ │ ├── adapters │ │ │ ├── elastic-search.js │ │ │ └── grafana.js │ │ └── index.js │ ├── socket-server.js │ ├── storageAdapter.js │ ├── test-outbound │ │ ├── TestCaseRunner.js │ │ ├── getTracing.js │ │ └── outbound-initiator.js │ ├── uniqueIdGenerator.js │ ├── utils.js │ ├── utilsInternal.js │ └── webSocketClient │ │ └── WebSocketClientManager.js └── server.js └── test ├── .DS_Store ├── api_spec_async.yaml ├── api_spec_sync.yaml ├── api_spec_sync_empty.yaml ├── docker-compose.integration.yml ├── func ├── docker-compose.yml ├── postman │ ├── ttk_func_collection.json │ └── ttk_func_environment.json └── run_newman.sh ├── integration-config.json ├── integration-runner.sh ├── integration └── sample.test.js ├── lib ├── mockRequest.js └── mockResponse.js ├── mockRef.json ├── unit ├── index.test.js ├── lib │ ├── api-management.test.js │ ├── api-routes │ │ ├── config.test.js │ │ ├── history.test.js │ │ ├── longpolling.test.js │ │ ├── oauth2.test.js │ │ ├── objectstore.test.js │ │ ├── openapi.test.js │ │ ├── outbound.test.js │ │ ├── reports.test.js │ │ ├── rules.test.js │ │ ├── samples.test.js │ │ ├── server-logs.test.js │ │ └── settings.test.js │ ├── apiServer.test.js │ ├── arrayStore.test.js │ ├── callbackHandler.test.js │ ├── config.test.js │ ├── configuration-providers │ │ └── mb-connection-manager.test.js │ ├── db │ │ ├── dbAdapter.test.js │ │ └── dfspMockUsers.test.js │ ├── eventListenerClient │ │ └── inboundEventListener.test.js │ ├── httpAgentStore.test.js │ ├── importExport.test.js │ ├── jws │ │ └── JwsSigning.test.js │ ├── loadSamples.test.js │ ├── longpollingEmitter.test.js │ ├── metrics.test.js │ ├── mocking │ │ ├── custom-functions │ │ │ └── generic.test.js │ │ ├── middleware-functions │ │ │ ├── ilpModel.test.js │ │ │ ├── quotesAssociation.test.js │ │ │ └── transactionRequestsService.test.js │ │ ├── openApiDefinitionsModel.test.js │ │ ├── openApiMockHandler.test.js │ │ ├── openApiRulesEngine.test.js │ │ ├── openApiVersionTools.test.js │ │ └── transformers │ │ │ ├── fspiopToISO20022.test.js │ │ │ ├── index.test.js │ │ │ └── requestTransform.test.js │ ├── myEventEmitter.test.js │ ├── notificationEmitter.test.js │ ├── oauth │ │ ├── KeycloakHelper.test.js │ │ ├── LoginService.test.js │ │ ├── OAuthValidator.test.js │ │ ├── OauthHelper.test.js │ │ └── Wso2Client.test.js │ ├── objectStore.test.js │ ├── report-generator │ │ ├── generator.test.js │ │ └── helpers.test.js │ ├── requestLogger.test.js │ ├── rulesEngine.test.js │ ├── rulesEngineModel.test.js │ ├── scripting-engines │ │ ├── postman-sandbox.test.js │ │ └── vm-javascript-sandbox.test.js │ ├── server-logs │ │ ├── adapters │ │ │ └── elastic-search.test.js │ │ └── server-logs.test.js │ ├── socket-server.test.js │ ├── storageAdapter.test.js │ ├── test-outbound │ │ ├── TestCaseRunner.test.js │ │ └── outbound-initiator.test.js │ ├── uniqueIdGenerator.test.js │ ├── utils.test.js │ ├── utilsInternal.test.js │ └── webSocketClient │ │ └── WebSocketClientManager.test.js └── server.test.js └── util └── testConfig.js /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | setup: true 3 | orbs: 4 | build: mojaloop/build@1.0.66 5 | workflows: 6 | setup: 7 | jobs: 8 | - build/workflow: 9 | context: org-global 10 | filters: 11 | tags: 12 | only: /v\d+(\.\d+){2}(-[a-zA-Z-][0-9a-zA-Z-]*\.\d+)?/ 13 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | node_modules/ 3 | .dockerignore 4 | .eslintignore 5 | .git/ 6 | .gitignore 7 | Dockerfile 8 | LICENSE 9 | README.md 10 | .circleci/ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | *IGNORE* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | .DS_Store 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | 24 | # nyc test coverage 25 | .nyc_output 26 | 27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 28 | .grunt 29 | 30 | # Bower dependency directory (https://bower.io/) 31 | bower_components 32 | 33 | # node-waf configuration 34 | .lock-wscript 35 | 36 | # Compiled binary addons (https://nodejs.org/api/addons.html) 37 | build/Release 38 | 39 | # Dependency directories 40 | node_modules/ 41 | jspm_packages/ 42 | 43 | # TypeScript v1 declaration files 44 | typings/ 45 | 46 | # Optional npm cache directory 47 | .npm 48 | 49 | # Optional eslint cache 50 | .eslintcache 51 | 52 | # Optional REPL history 53 | .node_repl_history 54 | 55 | # Output of 'npm pack' 56 | *.tgz 57 | 58 | # Yarn Integrity file 59 | .yarn-integrity 60 | 61 | # dotenv environment variables file 62 | .env 63 | 64 | # next.js build output 65 | .next 66 | 67 | # --------------- # 68 | # IntelliJ # 69 | # --------------- # 70 | .idea/ 71 | **/*.iml 72 | 73 | # VSCode directory 74 | .vscode 75 | jsconfig.json 76 | 77 | # Executables from pkg if any 78 | *.exe 79 | 80 | # Static HTML files if any 81 | public_html 82 | 83 | # Binaries 84 | out_native_bin 85 | 86 | # Some rules files which will be generated dynamically 87 | spec_files/rules_callback/* 88 | !spec_files/rules_callback/config.json 89 | !spec_files/rules_callback/default.json 90 | !spec_files/rules_callback/p2p-limit.json 91 | !spec_files/rules_callback/fspiop-1.1.json 92 | !spec_files/rules_callback/iso20022.json 93 | 94 | spec_files/rules_validation/* 95 | !spec_files/rules_validation/config.json 96 | !spec_files/rules_validation/default.json 97 | !spec_files/rules_validation/p2p-limit.json 98 | 99 | spec_files/rules_response/* 100 | !spec_files/rules_response/config.json 101 | !spec_files/rules_response/default.json 102 | 103 | uploads/* 104 | 105 | .rush 106 | 107 | junit.xml -------------------------------------------------------------------------------- /.grype.yaml: -------------------------------------------------------------------------------- 1 | ignore: 2 | # Ignore cross-spawn vulnerabilities by CVE ID due to false positive 3 | # as grype looks at package-lock.json where it shows versions with 4 | # vulnerabilities, npm ls shows only 7.0.6 verion is used 5 | 6 | 7 | # Set output format defaults 8 | output: 9 | - "table" 10 | - "json" 11 | 12 | # Modify your CircleCI job to check critical count 13 | search: 14 | scope: "squashed" 15 | quiet: false 16 | check-for-app-update: false 17 | -------------------------------------------------------------------------------- /.ncurc.yaml: -------------------------------------------------------------------------------- 1 | ## Add a TODO comment indicating the reason for each rejected dependency upgrade added to this list, and what should be done to resolve it (i.e. handle it through a story, etc). 2 | reject: [ 3 | "chai", # version 5 uses only ESM 4 | "postman-collection", 5 | "postman-sandbox" 6 | ] 7 | 8 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Ignore for publishing 2 | test/* 3 | .circleci/* 4 | uploads/* 5 | simulator/* 6 | simulator2/* 7 | native-app-generation/* 8 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 22.15.1 2 | -------------------------------------------------------------------------------- /.versionrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | header: '# Changelog: [mojaloop/thirdparty-api-svc](https://github.com/mojaloop/thirdparty-api-svc)', 3 | types: [ 4 | {"type": "feat", "section": "Features"}, 5 | {"type": "fix", "section": "Bug Fixes"}, 6 | {"type": "docs", "section": "Documentation"}, 7 | {"type": "style", "section": "Styling"}, 8 | {"type": "refactor", "section": "Refactors"}, 9 | {"type": "perf", "section": "Performance"}, 10 | {"type": "test", "section": "Tests"}, 11 | {"type": "build", "section": "Build System"}, 12 | {"type": "ci", "section": "CI"}, 13 | {"type": "chore", "section": "Chore"}, 14 | {"type": "revert", "section": "Reverts"} 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Each line is a file pattern followed by one or more owners. 2 | ## These owners will be the default owners for everything in 3 | ## the repo. Unless a later match takes precedence, 4 | ## @global-owner1 and @global-owner2 will be requested for 5 | ## review when someone opens a pull request. 6 | #* @global-owner1 @global-owner2 7 | * @vijayg10 @elnyry-sam-k @bushjames @shashi165 @gibaros @kleyow 8 | ## Order is important; the last matching pattern takes the most 9 | ## precedence. When someone opens a pull request that only 10 | ## modifies JS files, only @js-owner and not the global 11 | ## owner(s) will be requested for a review. 12 | # *.js @js-owner 13 | ## You can also use email addresses if you prefer. They'll be 14 | ## used to look up users just like we do for commit author 15 | ## emails. 16 | #*.go docs@example.com 17 | # In this example, @doctocat owns any files in the build/logs 18 | # directory at the root of the repository and any of its 19 | # subdirectories. 20 | # /build/logs/ @doctocat 21 | ## The `docs/*` pattern will match files like 22 | ## `docs/getting-started.md` but not further nested files like 23 | ## `docs/build-app/troubleshooting.md`. 24 | # docs/* docs@example.com 25 | ## In this example, @octocat owns any file in an apps directory 26 | ## anywhere in your repository. 27 | #apps/ @octocat 28 | ## In this example, @doctocat owns any file in the `/docs` 29 | ## directory in the root of your repository. 30 | #/docs/ @doctocat 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Arguments 2 | ARG NODE_VERSION=lts-alpine 3 | 4 | # NOTE: Ensure you set NODE_VERSION Build Argument as follows... 5 | # 6 | # export NODE_VERSION="$(cat .nvmrc)-alpine" \ 7 | # docker build \ 8 | # --build-arg NODE_VERSION=$NODE_VERSION \ 9 | # -t mojaloop/sdk-scheme-adapter:local \ 10 | # . \ 11 | # 12 | 13 | # Build Image 14 | FROM node:${NODE_VERSION} AS builder 15 | 16 | WORKDIR /opt/app 17 | 18 | RUN apk add --no-cache -t build-dependencies make gcc g++ python3 libtool openssl-dev autoconf automake \ 19 | && cd $(npm root -g)/npm 20 | 21 | COPY package.json package-lock.json* /opt/app/ 22 | RUN npm ci 23 | 24 | COPY src /opt/app/src 25 | COPY spec_files /opt/app/spec_files 26 | COPY examples /opt/app/examples 27 | RUN mkdir /opt/app/uploads 28 | 29 | FROM node:${NODE_VERSION} 30 | WORKDIR /opt/app 31 | 32 | # Create a non-root user: ml-user 33 | RUN adduser -D ml-user 34 | USER ml-user 35 | 36 | COPY --chown=ml-user --from=builder /opt/app . 37 | RUN npm prune --production 38 | 39 | EXPOSE 4040 40 | EXPOSE 5050 41 | 42 | CMD ["npm", "run", "start"] 43 | -------------------------------------------------------------------------------- /Dockerfile-newman: -------------------------------------------------------------------------------- 1 | FROM node:10.15.3-alpine 2 | 3 | RUN apk add --no-cache -t dos2unix 4 | 5 | WORKDIR /opt/postman 6 | 7 | COPY ./postman /opt/postman/ 8 | 9 | RUN dos2unix /opt/postman/run_newman.sh 10 | 11 | RUN npm install -g newman 12 | 13 | CMD ["sh", "run_newman.sh"] -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # LICENSE 2 | 3 | Copyright © 2020-2025 Mojaloop Foundation 4 | 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. 6 | 7 | You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- /assets/images/Sample-Response-Failure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/Sample-Response-Failure.png -------------------------------------------------------------------------------- /assets/images/Screenshot 2020-04-16 at 22.58.04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/Screenshot 2020-04-16 at 22.58.04.png -------------------------------------------------------------------------------- /assets/images/TLS-Enabled-on-Environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/TLS-Enabled-on-Environment.png -------------------------------------------------------------------------------- /assets/images/adapter-mutual-tls-enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/adapter-mutual-tls-enabled.png -------------------------------------------------------------------------------- /assets/images/add-additional-input-values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/add-additional-input-values.png -------------------------------------------------------------------------------- /assets/images/add-condition-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/add-condition-button.png -------------------------------------------------------------------------------- /assets/images/add-new-assertion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/add-new-assertion.png -------------------------------------------------------------------------------- /assets/images/add-new-input-value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/add-new-input-value.png -------------------------------------------------------------------------------- /assets/images/add-new-input-variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/add-new-input-variable.png -------------------------------------------------------------------------------- /assets/images/additional-transfers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/additional-transfers.png -------------------------------------------------------------------------------- /assets/images/api-provisioning-add-new-api-confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/api-provisioning-add-new-api-confirmation.png -------------------------------------------------------------------------------- /assets/images/api-provisioning-file-input-window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/api-provisioning-file-input-window.png -------------------------------------------------------------------------------- /assets/images/api-provisioning-list-apis-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/api-provisioning-list-apis-view.png -------------------------------------------------------------------------------- /assets/images/api-provisioning-menu-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/api-provisioning-menu-item.png -------------------------------------------------------------------------------- /assets/images/apply_and_restart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/apply_and_restart.jpg -------------------------------------------------------------------------------- /assets/images/assess-request-or-response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/assess-request-or-response.png -------------------------------------------------------------------------------- /assets/images/assess-response-equation-save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/assess-response-equation-save.png -------------------------------------------------------------------------------- /assets/images/assess-response-equation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/assess-response-equation.png -------------------------------------------------------------------------------- /assets/images/assess-response-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/assess-response-status.png -------------------------------------------------------------------------------- /assets/images/building-new-rules-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/building-new-rules-file.png -------------------------------------------------------------------------------- /assets/images/callback-rules-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/callback-rules-screen.png -------------------------------------------------------------------------------- /assets/images/configurable-parameter-assertion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/configurable-parameter-assertion.png -------------------------------------------------------------------------------- /assets/images/configurable-parameter-currency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/configurable-parameter-currency.png -------------------------------------------------------------------------------- /assets/images/configurable-parameter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/configurable-parameter.png -------------------------------------------------------------------------------- /assets/images/connection-manager-ui-opening.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/connection-manager-ui-opening.png -------------------------------------------------------------------------------- /assets/images/create-inbound-user-simulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/create-inbound-user-simulator.png -------------------------------------------------------------------------------- /assets/images/creating-new-rule-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/creating-new-rule-file.png -------------------------------------------------------------------------------- /assets/images/dfsp-client-cacert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/dfsp-client-cacert.png -------------------------------------------------------------------------------- /assets/images/dfsp-client-submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/dfsp-client-submit.png -------------------------------------------------------------------------------- /assets/images/dfsp-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/dfsp-client.png -------------------------------------------------------------------------------- /assets/images/dfsp-p2p-happy-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/dfsp-p2p-happy-path.png -------------------------------------------------------------------------------- /assets/images/dfsp-server-cacert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/dfsp-server-cacert.png -------------------------------------------------------------------------------- /assets/images/dfsp-server-cert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/dfsp-server-cert.png -------------------------------------------------------------------------------- /assets/images/download-report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/download-report.png -------------------------------------------------------------------------------- /assets/images/drive_have_not_been_shared.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/drive_have_not_been_shared.jpg -------------------------------------------------------------------------------- /assets/images/event-response-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/event-response-options.png -------------------------------------------------------------------------------- /assets/images/expand-monitoring-messages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/expand-monitoring-messages.png -------------------------------------------------------------------------------- /assets/images/fixed-response-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/fixed-response-sample.png -------------------------------------------------------------------------------- /assets/images/header-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/header-selection.png -------------------------------------------------------------------------------- /assets/images/heap_error_windows.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/heap_error_windows.jpg -------------------------------------------------------------------------------- /assets/images/hosted-mode-docker-compose-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/hosted-mode-docker-compose-intro.png -------------------------------------------------------------------------------- /assets/images/hub-client-cert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/hub-client-cert.png -------------------------------------------------------------------------------- /assets/images/import-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/import-template.png -------------------------------------------------------------------------------- /assets/images/inbound-requests-environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/inbound-requests-environment.png -------------------------------------------------------------------------------- /assets/images/inbound-requests-scripts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/inbound-requests-scripts.png -------------------------------------------------------------------------------- /assets/images/jws-certificate-submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/jws-certificate-submit.png -------------------------------------------------------------------------------- /assets/images/jws-certificate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/jws-certificate.png -------------------------------------------------------------------------------- /assets/images/jws-certs-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/jws-certs-keys.png -------------------------------------------------------------------------------- /assets/images/jws-hub-certs-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/jws-hub-certs-keys.png -------------------------------------------------------------------------------- /assets/images/local-enable-jws-publickey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/local-enable-jws-publickey.png -------------------------------------------------------------------------------- /assets/images/local-mutual-tls-enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/local-mutual-tls-enabled.png -------------------------------------------------------------------------------- /assets/images/local_drives_to_be_available.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/local_drives_to_be_available.jpg -------------------------------------------------------------------------------- /assets/images/mcm-environment-opening.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/mcm-environment-opening.png -------------------------------------------------------------------------------- /assets/images/menu-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/menu-items.png -------------------------------------------------------------------------------- /assets/images/mock-response-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/mock-response-sample.png -------------------------------------------------------------------------------- /assets/images/monitoring-initial-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/monitoring-initial-state.png -------------------------------------------------------------------------------- /assets/images/monitoring-messages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/monitoring-messages.png -------------------------------------------------------------------------------- /assets/images/new-empty-assertion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/new-empty-assertion.png -------------------------------------------------------------------------------- /assets/images/opened-imported-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/opened-imported-template.png -------------------------------------------------------------------------------- /assets/images/opening-default-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/opening-default-settings.png -------------------------------------------------------------------------------- /assets/images/opening-sync-response-rules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/opening-sync-response-rules.png -------------------------------------------------------------------------------- /assets/images/opening-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/opening-view.png -------------------------------------------------------------------------------- /assets/images/outbound-display-opening-hub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/outbound-display-opening-hub.png -------------------------------------------------------------------------------- /assets/images/outbound-display-opening.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/outbound-display-opening.png -------------------------------------------------------------------------------- /assets/images/override-with-environment-variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/override-with-environment-variable.png -------------------------------------------------------------------------------- /assets/images/populate-with-sample-body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/populate-with-sample-body.png -------------------------------------------------------------------------------- /assets/images/resource-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/resource-selection.png -------------------------------------------------------------------------------- /assets/images/rule-builder-select-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/rule-builder-select-api.png -------------------------------------------------------------------------------- /assets/images/sample-condition-add-configurable-params.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sample-condition-add-configurable-params.png -------------------------------------------------------------------------------- /assets/images/sample-condition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sample-condition.png -------------------------------------------------------------------------------- /assets/images/sample-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sample-editor.png -------------------------------------------------------------------------------- /assets/images/sample-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sample-request.png -------------------------------------------------------------------------------- /assets/images/sample-test-assertion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sample-test-assertion.png -------------------------------------------------------------------------------- /assets/images/send-transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/send-transfer.png -------------------------------------------------------------------------------- /assets/images/sending-single-test-case-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sending-single-test-case-1.png -------------------------------------------------------------------------------- /assets/images/sending-single-test-case-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sending-single-test-case-2.png -------------------------------------------------------------------------------- /assets/images/sending-test-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/sending-test-cases.png -------------------------------------------------------------------------------- /assets/images/server-certificates-submitted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/server-certificates-submitted.png -------------------------------------------------------------------------------- /assets/images/simulator-response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/simulator-response.png -------------------------------------------------------------------------------- /assets/images/simulator-scheme-adapter-endpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/simulator-scheme-adapter-endpoint.png -------------------------------------------------------------------------------- /assets/images/summarized-view-of-rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/summarized-view-of-rule.png -------------------------------------------------------------------------------- /assets/images/template-window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/template-window.png -------------------------------------------------------------------------------- /assets/images/test-case-editor-console-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/test-case-editor-console-log.png -------------------------------------------------------------------------------- /assets/images/test-case-editor-environment-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/test-case-editor-environment-state.png -------------------------------------------------------------------------------- /assets/images/test-case-editor-scripts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/test-case-editor-scripts.png -------------------------------------------------------------------------------- /assets/images/test-case-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/test-case-editor.png -------------------------------------------------------------------------------- /assets/images/testcase-definition-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/testcase-definition-download.png -------------------------------------------------------------------------------- /assets/images/testcase-definition-edit-meta-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/testcase-definition-edit-meta-info.png -------------------------------------------------------------------------------- /assets/images/testing-toolkit-mojaloop-testing-toolkit-endpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/testing-toolkit-mojaloop-testing-toolkit-endpoint.png -------------------------------------------------------------------------------- /assets/images/tls-hub-certs-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/tls-hub-certs-keys.png -------------------------------------------------------------------------------- /assets/images/tls-jws-enabled-on-environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/tls-jws-enabled-on-environment.png -------------------------------------------------------------------------------- /assets/images/updated-sample-body-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/updated-sample-body-data.png -------------------------------------------------------------------------------- /assets/images/using-configurable-parameter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/using-configurable-parameter.png -------------------------------------------------------------------------------- /assets/images/validation-rules-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/validation-rules-screen.png -------------------------------------------------------------------------------- /assets/images/view-response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/assets/images/view-response.png -------------------------------------------------------------------------------- /audit-ci.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json", 3 | // audit-ci supports reading JSON, JSONC, and JSON5 config files. 4 | // Only use one of ["low": true, "moderate": true, "high": true, "critical": true] 5 | "moderate": true, 6 | "allowlist": [] 7 | } 8 | -------------------------------------------------------------------------------- /connection-manager/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | connection-manager-db: 5 | # Using mariadb because mysql doesn't show any helpful error when docker disk is full as per https://github.com/docker-library/mysql/issues/69 6 | image: mariadb 7 | hostname: connection-manager-db 8 | environment: 9 | - MYSQL_ROOT_PASSWORD=modus123 10 | - MYSQL_DATABASE=mcm 11 | - MYSQL_USER=mcm 12 | - MYSQL_PASSWORD=mcm 13 | restart: always 14 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 15 | connection-manager-api: 16 | image: modusbox/connection-manager-api:1.5.3 17 | hostname: connection-manager-api 18 | environment: 19 | - DATABASE_HOST=connection-manager-db 20 | - DATABASE_PORT=3306 21 | - DATABASE_USER=mcm 22 | - DATABASE_PASSWORD=mcm 23 | - DATABASE_SCHEMA=mcm 24 | - MYSQL_ROOT_PASSWORD=modus123 25 | - PORT=5061 26 | - P12_PASS_PHRASE='SOME_S3C4R3_P@SS' 27 | #- OAUTH2_ISSUER=http://172.17.0.1:5050/api/oauth2/token 28 | - OAUTH2_ISSUER=http://mojaloop-testing-toolkit:5050/api/oauth2/token 29 | #- OAUTH2_ISSUER=http://host.docker.internal:5050/api/oauth2/token 30 | #- OAUTH2_ISSUER=http://docker.for.mac.localhost:5050/api/oauth2/token 31 | - AUTH_ENABLED=false 32 | - APP_OAUTH_CLIENT_KEY=asdf 33 | - APP_OAUTH_CLIENT_SECRET=asdf 34 | - EMBEDDED_CERTIFICATE=password 35 | tty: true 36 | stdin_open: true 37 | ports: 38 | - "5061:5061" 39 | restart: always 40 | depends_on: 41 | - connection-manager-db 42 | connection-manager-ui: 43 | image: modusbox/connection-manager-ui:1.6.9 44 | hostname: connection-manager-ui 45 | environment: 46 | - API_BASE_URL=http://localhost:5061 47 | - AUTH_ENABLED=TRUE 48 | tty: true 49 | stdin_open: true 50 | ports: 51 | - "5060:8080" 52 | restart: always 53 | networks: 54 | default: 55 | name: mojaloop-testing-toolkit 56 | -------------------------------------------------------------------------------- /database/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | ttk-mongodb: 5 | image: mongo:latest 6 | # Disable logging as it is far too verbose for debugging locally 7 | logging: 8 | driver: none 9 | ports: 10 | - "27017:27017" 11 | 12 | networks: 13 | default: 14 | name: mojaloop-testing-toolkit 15 | 16 | 17 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | mojaloop-testing-toolkit: 5 | image: mojaloop/ml-testing-toolkit:local 6 | build: 7 | context: . 8 | target: builder 9 | user: root 10 | volumes: 11 | - "./spec_files:/opt/app/spec_files" 12 | - "./secrets:/opt/app/secrets" 13 | - "./examples:/opt/app/examples" 14 | environment: 15 | REPORTING_DB_CONNECTION_PASSWORD: ttk@123 16 | TTK_SYSTEM_CONFIG: |- 17 | { 18 | "DB": { 19 | "HOST": "ttk-mongodb", 20 | "PORT": 27017, 21 | "USER": "ttk", 22 | "PASSWORD": "", 23 | "DATABASE": "admin" 24 | } 25 | } 26 | ports: 27 | - "4040:4040" 28 | - "5050:5050" 29 | command: 30 | - sh 31 | - -c 32 | - "npm start" 33 | mojaloop-testing-toolkit-ui: 34 | image: mojaloop/ml-testing-toolkit-ui:v16.2.0 35 | ports: 36 | - "6060:6060" 37 | environment: 38 | - API_BASE_URL=http://localhost:5050 39 | - AUTH_ENABLED=FALSE 40 | command: 41 | - sh 42 | - /usr/share/nginx/start.sh 43 | 44 | ttk-mongodb: 45 | image: mongo:6.0.5 46 | restart: always 47 | environment: 48 | MONGO_INITDB_ROOT_USERNAME: ttk 49 | MONGO_INITDB_ROOT_PASSWORD: ttk@123 50 | ALLOW_EMPTY_PASSWORD: "true" 51 | ports: 52 | - 27017:27017 53 | volumes: 54 | - ttk-db-data:/data/db 55 | 56 | networks: 57 | default: 58 | name: mojaloop-testing-toolkit 59 | 60 | volumes: 61 | ttk-db-data: 62 | driver: local 63 | -------------------------------------------------------------------------------- /docker/hosted-mode-tls/mongo-init.sh: -------------------------------------------------------------------------------- 1 | mongo --eval "db.auth('$MONGO_INITDB_ROOT_USERNAME', '$MONGO_INITDB_ROOT_PASSWORD'); db = db.getSiblingDB('$DB_NAME'); db.createUser({ user: '$DB_USER', pwd: '$DB_PASSWORD', roles: [{ role: 'readWrite', db: '$DB_NAME' }] });" 2 | -------------------------------------------------------------------------------- /docker/hosted-mode/mongo-init.sh: -------------------------------------------------------------------------------- 1 | mongo --eval "db.auth('$MONGO_INITDB_ROOT_USERNAME', '$MONGO_INITDB_ROOT_PASSWORD'); db = db.getSiblingDB('$DB_NAME'); db.createUser({ user: '$DB_USER', pwd: '$DB_PASSWORD', roles: [{ role: 'readWrite', db: '$DB_NAME' }] });" 2 | -------------------------------------------------------------------------------- /documents/User-Guide-Frequently-Asked-Questions.md: -------------------------------------------------------------------------------- 1 | # Users Guide Frequently Asked Questions 2 | 3 | ## _Mojaloop Testing Toolkit_ 4 | 5 | This section will list a number a frequently asked questions and the solutions provided. 6 | 7 | **Table of Contents** 8 | 9 | 0. [User Guide](/documents/User-Guide.md) 10 | 11 | 1. [Mojaloop Connection Manager require sign on](#1-mojaloop-connection-manager-require-sign-on) 12 | 13 | 2. [Generic ID not found](#2-generic-id-not-found) 14 | 15 | ### 1 Mojaloop Connection Manager require sign on 16 | 17 | When opening **Mojaloop Connection Manager** in my browser, a _**Username**_ and _**Password**_ is required. 18 | - The default is to open to the available environment, _**TESTING-TOOLKIT**_ as default. After the initial opening, and a time lapses, the **Mojaloop Connection Manager UI** will request you to sign on. Use the default _**Username**_ => ```test``` and _**Password**_ => ```test```. 19 | 20 | ### 2 Generic ID not found 21 | 22 | When I run the _**Outbound Request**_, I receive failures on the Callback response; 23 | 24 | ``` 25 | { 26 | "body": { 27 | "errorInformation": { 28 | "errorCode": "3200", 29 | "errorDescription": "Generic ID not found" 30 | } 31 | } 32 | } 33 | ``` 34 | 35 | - The reason for this is the **Inbound User** is no present on the **Mojaloop Simulator**. For the samples used in this document, you will need to create a new user for **MSISDN** = **9876543210**. In the **Mojaloop Simulator UI**, select _**+ Add User**_ button on the _**Config Inbound**_ navigation tab. Below screenshot is a sample based on the sample data used within this document. Click on the _**√ Submit**_ button when done. 36 | 37 | You are welcome to change any values as required. Important values to keep in mind, are the _Id Type_, _Id Value_ and the _DateOfBirth_ date format _(CCYY-MM-DDD)_. 38 | 39 | ![Create Inbound User on Simulator](/assets/images/create-inbound-user-simulator.png) -------------------------------------------------------------------------------- /documents/User-Guide.md: -------------------------------------------------------------------------------- 1 | # Users Guide 2 | 3 | ## _Mojaloop Testing Toolkit_ 4 | 5 | ### Introduction 6 | 7 | The intention of this document is to provide a basic user guide to the **Mojaloop Testing Toolkit**. This easy to use toolkit was designed for both technical and non-technical users, even though the primarily users would likely be Quality Assurance (QA) resources. By following this guide, users will have a better understand of the capabilities and functionality of the toolkit. 8 | 9 | The **Mojaloop Testing Toolkit** was designed for participants that would like to participate in the Mojaloop scheme. Intentionally build as a standard integration testing tool between a _Digital Financial Service Provider (DFSP)_ and the _Mojaloop Switch_ (Hub), to facilitate testing. This tool set can potentially be used by both the DFSP and the _Mojaloop Switch_ to verify the integration between the 2 entities. 10 | 11 | For additional background information on the Self Testing Toolkit, please see [Mojaloop Testing Toolkit](/documents/Mojaloop-Testing-Toolkit.md). It would be to the particpant's benefit to familiarise themselves with the understanding of the [Architecture Diagram](/documents/Mojaloop-Testing-Toolkit.md#7-architecture) that explains the various components and related flows. 12 | 13 | ### Getting Started 14 | 15 | The document below covers the use-cases with the **Mojaloop Simulator** and **Mojaloop Simulator _UI (User Interface)_**. 16 | 17 | - [Installation](/documents/User-Guide-Installation.md) 18 | 19 | ### DFSP Onboarding 20 | 21 | - [The Testing Toolkit DFSP Onboarding](/documents/User-Guide-Onboarding-DFSP.md) 22 | 23 | ### HUB Onboarding 24 | 25 | - [The Testing Toolkit HUB Onboarding](/documents/User-Guide-Onboarding-HUB.md) 26 | 27 | ### The Testing Toolkit 28 | 29 | - [The Testing Toolkit User Guide](/documents/User-Guide-Mojaloop-Testing-Toolkit.md). 30 | 31 | ### The Testing Toolkit CLI 32 | 33 | - [The Testing Toolkit CLI User Guide](/documents/User-Guide-CLI.md) 34 | 35 | ### Connection Manager 36 | 37 | - [Connection Manager User Guide](/documents/User-Guide-Connection-Manager.md) 38 | 39 | ### Frequently Asked Questions 40 | 41 | - [Freaquently Asked Question](/documents/User-Guide-Frequently-Asked-Questions.md) 42 | 43 | ### Rules Engine (Advanced Users) 44 | 45 | - [Rules Engine Documentation](/documents/RULES_ENGINE.md) 46 | 47 | ### Provisioning new API 48 | 49 | - [API Provisioning User Guide](/documents/User-Guide-API-Provisioning.md) 50 | 51 | ### Hosted mode with docker-compose 52 | 53 | - [Hosted mode with docker-compose](/documents/User-Guide-Hosted-Mode-Docker-Compose.md) 54 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verbose: true, 3 | collectCoverageFrom: [ 4 | '**/src/**/**/*.js' 5 | ], 6 | coverageThreshold: { 7 | global: { 8 | statements: 95, 9 | functions: 95, 10 | branches: 90, 11 | lines: 95 12 | } 13 | }, 14 | modulePathIgnorePatterns: ['spec_files'], 15 | testEnvironment: 'node', 16 | testTimeout: 30000 17 | } 18 | -------------------------------------------------------------------------------- /native-app-generation/assets/macos/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | reldir=`dirname $0` 4 | cd $reldir 5 | directory=`pwd` 6 | 7 | ./ml-ttk 8 | -------------------------------------------------------------------------------- /native-app-generation/build-native-app.sh: -------------------------------------------------------------------------------- 1 | TTK_UI_TAG="v16.0.0" 2 | 3 | HelpMessage () { 4 | echo "Usage: $0 -platform [macos|linux|win] -arch [x64|x86|armv6|armv7]" 5 | } 6 | 7 | ARCH="" 8 | PLATFORM="" 9 | 10 | while [ $# -gt 0 ] 11 | do 12 | case $1 in 13 | -platform) PLATFORM=$2 ;; 14 | -arch) ARCH=$2 ;; 15 | -h) HelpMessage; exit 1 ;; 16 | -*) echo "$0: Invalid option $1" ; HelpMessage; exit 2 ;; 17 | *) echo "$0: Invalid option $1" ; HelpMessage; exit 2 ;; 18 | esac 19 | shift 20 | shift 21 | done 22 | 23 | if [ ! -d "node_modules" ]; then 24 | echo "Folder node_modules doesn't exist" 25 | exit 1 26 | fi 27 | 28 | if [ -z $ARCH ]; then 29 | echo "arch is not specified" 30 | exit 1 31 | fi 32 | if [ -z $PLATFORM ]; then 33 | echo "platform is not specified" 34 | exit 1 35 | fi 36 | ### Some tweak for postman-sandbox libray to be compatible for packaging 37 | sed '/\"type\": \"module\"/d' node_modules/uvm/node_modules/flatted/package.json > node_modules/uvm/node_modules/flatted/package2.json 38 | rm node_modules/uvm/node_modules/flatted/package.json 39 | mv node_modules/uvm/node_modules/flatted/package2.json node_modules/uvm/node_modules/flatted/package.json 40 | ### Start packaging 41 | rm -rf out_native_bin/$PLATFORM-$ARCH 42 | mkdir -p out_native_bin/$PLATFORM-$ARCH 43 | pkg -t node12-$PLATFORM-$ARCH . -o out_native_bin/$PLATFORM-$ARCH/ml-ttk 44 | cp -R spec_files out_native_bin/$PLATFORM-$ARCH 45 | cp -R examples out_native_bin/$PLATFORM-$ARCH 46 | ### Get the UI files from docker image 47 | docker cp $(docker create --rm mojaloop/ml-testing-toolkit-ui:$TTK_UI_TAG):/usr/share/nginx/html ./public_html 48 | if [ ! -d "public_html" ]; then 49 | echo "Couldn't get the TTK UI from docker" 50 | exit 1 51 | fi 52 | cp -R public_html out_native_bin/$PLATFORM-$ARCH 53 | 54 | ### Copy files specific to platform 55 | if [ "$PLATFORM" = "macos" ]; then 56 | cp native-app-generation/assets/$PLATFORM/start.sh out_native_bin/$PLATFORM-$ARCH 57 | fi 58 | -------------------------------------------------------------------------------- /secrets/keygen.sh: -------------------------------------------------------------------------------- 1 | #openssl genrsa -des3 -out privatekey.pem 2048 2 | openssl genrsa -out privatekey.pem 2048 3 | openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 1825 -subj "/CN=testingtoolkitdfsp/C=US/ST=Ohio/L=Columbus/O=Testing Toolkit/OU=Payments" 4 | #openssl rsa -in privatekey.pem -pubout -out publickey.cer 5 | #openssl rsa -in privatekey.pem -out privatekey.pem 6 | -------------------------------------------------------------------------------- /secrets/privatekey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpQIBAAKCAQEAwczEjlUeOPutgPRlpZSbcbJJwsmmxsBfoPDw1sjBiR7L6Doh 3 | VqKd810+TmiDRYgCzOLabje/mtLiDC95MtuPF5yUiVE04ar6Ny5pZLxJEnbDEOAE 4 | TxOn1gzCKeRHYOcgybDi6TLhnvyFyIaXKzyBhEYvxI8VvRV11UawLqvpgVrdsbZy 5 | 1FQOMLq7OB+J6qC7fhR61F6Wu45RZlZMB482c658P7dCQCdQtEMEF5kuBNB/JuUR 6 | e0qKjl2udKVL3wgBC7J7o7Tx8kY5T63q/ZC3TfoTclFeXtIePt8Eu74u3d6WpSWb 7 | Z12mewRBVPtmbGHgEXpih3uayaqIeC8Dc4zO5QIDAQABAoIBAQCPMGJR36YS6DGL 8 | xAeOTbyERvykxSVKWDzPxvXLXE1SqMRz8u9K+Z/GfjBY8nN7XkDjbQGCygHxvLpz 9 | 0me0IfEZuwEsbCmsSw3Q06PfYBaFY+ZAg6PrYVRynL6hAR+UA3GAVAdz0bpOI7od 10 | LQRoV65CMzF8A1RGfqKvUClAcph2j4lbjjRZ1OExDdcbRCI4h9qgGOMo9o9OEB1X 11 | HHiPhtS1ZwjczqCyJHkkHbOgYNPN7SDy8vHFOVjMDIADF+S/NLrxGUUIUDvNMnGV 12 | D4G8thQD2zSatMjlbJJ+oNt++T/SJMSIiuQTB5zy/KpiMPUN+AXhq5h/dHDcFXhA 13 | ng2deEcJAoGBAOQr1g/s/3V32tQpYloTMOPqIJoVnZnlcXbKy3nWLuOrkVlM0x3V 14 | AEwC7ntb2eOSQ331AvBd/EESgtZr1jvxfsHG+MjwEylcOE33g4MqCKthGcnFA8zG 15 | Z5h6OqTtHdY1bmuiisPvBA4/x2o7mWJz35vT0Sny3cci3f2D6pmPpuq3AoGBANlv 16 | wjWgeDQSR8nTdM1P7zepVdN51f8Fl3r49kMhceVHdwL5iL7q4GkxUgpCyBkFoElW 17 | vmsLgR1fnb+qBtF2kvljQtlRrlgwz1GgYNhp+aAgcAjvQ9fQcvCLr1leXzf6VBHx 18 | jXEIUAlAJVlJ5gWKlDNK9ytjurOvOXipRC4GQKdDAoGBALNOt6RATOjVTYSZGQ9M 19 | MYmKPiCYiAeexbHi4FBYvvRvqYOR2f6BmwAg9aS/o9Uw5hUf7DVUxp2knGlAyVTG 20 | DSTe5jeSYpyIOj8bGaCD8dgsMIXda4ULDfJHa7qcFGx4BNRVIdOkC33fJSkYuQsj 21 | oD/nD2J1109c2TMW7c/LkhK1AoGAUD8xws7tbfJNMkxrMBbPJ5DETx8I/myW4lid 22 | slrWiRLd9mgXsrZGiiwcphLNfIaaCFcOQb1mMmwGcSUUDRwg1A9xLXk6yeuBqBNz 23 | iotaCGHQV0vOkwioUuSKm4X7yFIH0vN+CvhRaYiWACUI0oS5e1CwdgABeK0znbeC 24 | pSXDmLcCgYEA1ls595Ue5cUCmFDvpCIifsATNOMPguKeFuPbYSItQod3P3Bj6txV 25 | phe0jUtWPhIF3I0XOtea2Usvbrj64GMNWLaeK2pdsbIWBlsu2tuqaAfKYiGpGCAh 26 | QWGAPwZ4w7Z3nmA6IhaD6zUnzBGserHv59XttKK0AiQwYMn6UvUIq0M= 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /secrets/publickey.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDbjCCAlYCCQDudXfDH36/JjANBgkqhkiG9w0BAQsFADB5MRswGQYDVQQDDBJ0 3 | ZXN0aW5ndG9vbGtpdGRmc3AxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREw 4 | DwYDVQQHDAhDb2x1bWJ1czEYMBYGA1UECgwPVGVzdGluZyBUb29sa2l0MREwDwYD 5 | VQQLDAhQYXltZW50czAeFw0yMDAzMjQxNzU1MjZaFw0yNTAzMjMxNzU1MjZaMHkx 6 | GzAZBgNVBAMMEnRlc3Rpbmd0b29sa2l0ZGZzcDELMAkGA1UEBhMCVVMxDTALBgNV 7 | BAgMBE9oaW8xETAPBgNVBAcMCENvbHVtYnVzMRgwFgYDVQQKDA9UZXN0aW5nIFRv 8 | b2xraXQxETAPBgNVBAsMCFBheW1lbnRzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A 9 | MIIBCgKCAQEAwczEjlUeOPutgPRlpZSbcbJJwsmmxsBfoPDw1sjBiR7L6DohVqKd 10 | 810+TmiDRYgCzOLabje/mtLiDC95MtuPF5yUiVE04ar6Ny5pZLxJEnbDEOAETxOn 11 | 1gzCKeRHYOcgybDi6TLhnvyFyIaXKzyBhEYvxI8VvRV11UawLqvpgVrdsbZy1FQO 12 | MLq7OB+J6qC7fhR61F6Wu45RZlZMB482c658P7dCQCdQtEMEF5kuBNB/JuURe0qK 13 | jl2udKVL3wgBC7J7o7Tx8kY5T63q/ZC3TfoTclFeXtIePt8Eu74u3d6WpSWbZ12m 14 | ewRBVPtmbGHgEXpih3uayaqIeC8Dc4zO5QIDAQABMA0GCSqGSIb3DQEBCwUAA4IB 15 | AQAZ1lQ/KcSGwy/jQUIGF87JugLU17nnIEG2TrkC5n+fZDQqs8QqU6itbkdGQyNj 16 | F5aLoPEdrKzevnBztlAEq0bofR0uDnQPN74A/NwOUfWds0hq5elZnO9Uq0G15Go4 17 | pfqLbSjHxSu6LZaHP6f9+WvMqNbGr3kipz8GSIQWixzdKBnNxCwWjZmk4gD5cahU 18 | XIpMAZumsnKk6pWilmuMIxC579CyLkGdVze3Kj6GunUJ1pieZzv4+RUJz8NgXxjW 19 | ZRwqCkEqPe/8S1X9srtcrdbHryDdC18Ldu/rADEKbSqy0BhQdKYDcxulaQuqibwD 20 | i0dWSdTWoseAbUqp2ACc6aF/ 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /secrets/tls/createSecrets.sh: -------------------------------------------------------------------------------- 1 | OUTPUT_DIR="." 2 | setopt +o nomatch 3 | rm *.key *.pem *.csr *.crt *.srl 4 | 5 | ## Generating Server CA certificate 6 | openssl req -x509 -config openssl-serverca.cnf -newkey rsa:4096 -sha256 -nodes -out hub_server_cacert.pem -outform PEM 7 | 8 | ## Generate server csr 9 | openssl req -config openssl-server.cnf -newkey rsa:4096 -sha256 -nodes -out hub_server.csr -outform PEM 10 | 11 | ## Sign server cert 12 | openssl ca -config openssl-serverca.cnf -policy signing_policy -extensions signing_req -out hub_server_cert.pem -infiles hub_server.csr 13 | 14 | ##################### 15 | 16 | ## Generating Client CA certificate 17 | openssl req -x509 -config openssl-clientca.cnf -newkey rsa:4096 -sha256 -nodes -out hub_client_cacert.pem -outform PEM 18 | 19 | ## Generate client csr 20 | openssl req -config openssl-client.cnf -newkey rsa:4096 -sha256 -nodes -out hub_client.csr -outform PEM 21 | -------------------------------------------------------------------------------- /secrets/tls/hub_client.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIFmTCCA4ECAQAwgZAxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJNRDESMBAGA1UE 3 | BwwJQmFsdGltb3JlMRMwEQYDVQQKDApIdWIgQ2xpZW50MREwDwYDVQQLDAhQYXlt 4 | ZW50czESMBAGA1UEAwwJaHViY2xpZW50MSQwIgYJKoZIhvcNAQkBFhVodWJjbGll 5 | bnRAZXhhbXBs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aWNhdGUwDQYJKoZI 21 | hvcNAQELBQADggIBAFhpQTw1vKC+UsMX5IcPOoGHomC+QVTM2fBi9yH7klyp2+1p 22 | 8kDaZ0/ziGFG77bdoLm5h6Djr7dHoNQ9LgmF/6aq2pfyu6ZXHkCZu77eEhRDx5cA 23 | C8dG0DZB5ZMkHyyAj28j5c4+SXIWJFjDlDeyZntvoF4cI+vkrCXzMpRxAv2VZF0a 24 | 7ZrJ97IhckfGsFLxzHmOUAACOzsjPfR4fOT5kzl1KAGSYJ0ucP4X0u+jPy8YharF 25 | /CoOA9JdcC8LTlEjHifVbbi3HXufd9E9H+Xx64nSpoOo/6Do9/JGOlVPIaNppqkM 26 | hmWzLmo1ygEJu8lrSZfDYK6ZVCrrHOpo/G5mRJp1JoDnxTE0ToeeLRXKJaAZ6V2y 27 | f/gwYUbUjLl2jhBfrtzmucA7y2q3bf9QZnwDCvPg1m/LxfYZtTrf0AFD4fRujUvC 28 | 5S1A878LFLy5HIIgiysvSBjL5ZcdMe/HkxRITwgKRu9fLN8sa+WRGXxda3nWD2mR 29 | kgCINFbYI+8B57j99eoXCf0cEqdywvsb/SPhge+E6Rr1h0Z09YmMAnLGcVKDUhIh 30 | CUD4aLwOlzkNtKkWspEZsjWYvk0bN2p/RreKBqAxEKLxd5ua9CaHTlI9kBF+ViUt 31 | mDYe8qxJKP4Df4fL1u8aAXlVQMTK3pMZrq9zAldxBfVe9rRNuB7vN9eRVzKi 32 | -----END CERTIFICATE REQUEST----- 33 | -------------------------------------------------------------------------------- /secrets/tls/hub_client_cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGHzCCBAegAwIBAgIJAK8mdXuByaCvMA0GCSqGSIb3DQEBCwUAMIGdMQswCQYD 3 | VQQGEwJVUzERMA8GA1UECAwITWFyeWxhbmQxEjAQBgNVBAcMCUJhbHRpbW9yZTEW 4 | MBQGA1UECgwNSHViIENsaWVudCBDQTERMA8GA1UECwwIUGF5bWVudHMxFD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7/twXrSdpvVrGTkTgGH4 21 | XObMrMraT68Vb3b4blALiPvSEpD7x+W5AgMBAAGjYDBeMB0GA1UdDgQWBBQapk5z 22 | y7GgBl4g+oyPH+OvOSIj+TAfBgNVHSMEGDAWgBQapk5zy7GgBl4g+oyPH+OvOSIj 23 | +TAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsFAAOC 24 | AgEAA7mg3wADqlTtbw6sibe7IFvpBbRAjZfXAzn3TEDXeSIPhyGJ+6B050gsBDQS 25 | vhLeilfu3f6nZe7/ps+OU+qjOisGPhkk+4oeIJwMQ6ekioFTgma1t8W3B5HDC0Cg 26 | vzIaOpGHKkpeDgtgEEDGefgaM9OZgN9M7dcWlwV6hsuTmu9Y0z67jknP7EDrdVok 27 | mdP4wPKV+/FSdsFuEjH/mGJ8dtNAFj9Ft6Y5AHZ+qk5RAZkUHgcfHVwqLwScH9L+ 28 | y+lRrkKATPgQCk+j/DvURjrgCPH3U9KKKCfBg8Vra/4vg6Z4YzEu/N50hBBxFgCb 29 | E/prr8kRmYt2+c5E7+zrnh29Fz3REffZlIdSJ4dFKvy5hRl7PZXGmUu6ReMLfgPc 30 | upQNkiIvBxXRbAefgOz9LTU/N1vhg02H7LwoH8cU9pQ9KVEIbQlmC1QPqxfJAEK1 31 | z2wvzMZ1b8QVwSHZ85u4hM668sqMzqj1OQYE6rdUiLF3cnkl2hrD1ilJKAbAP5t8 32 | l1YBIzwoy9ZBp/k/hscSFiXJ4d1DeznvlueuFe9VVZV0fzCPUGp7y04j+HCNvecr 33 | fsoO5zfykk5rDSxFcYryPsae2O0/RaHMVrmRH9kB/eKKaq91+ZlDSpT2gXYkRwwI 34 | 9zQGoAV5TZsWZjZCuyyK7Ve0n/2ll1whLIpW7NCeVc7r5yQ= 35 | -----END CERTIFICATE----- 36 | -------------------------------------------------------------------------------- /secrets/tls/hub_server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST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ZXN0aW5nLXRvb2xraXSCCWxv 18 | Y2FsaG9zdIIIa2V5Y2xvYWuCFmNvbm5lY3Rpb24tbWFuYWdlci1hcGkwLAYJYIZI 19 | AYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMA0GCSqGSIb3 20 | DQEBCwUAA4ICAQA1z3nT3Qa1BOJGdxLAd9UCHMuy5q9ITW4fpQo/2PxDHsB2VYI0 21 | hcxDyc0yrKHpd5aoZWx28HKFcpLXbPIX71BE+XoYNxCTsmAVrE9JhoTeb5742mxB 22 | 1A2vgfNzphi7ZqMD3LwWs1fW+ySH9PpRxqGQxeg3P8r/7eWc7Mv21+SrGb+LEDuk 23 | HRpZAb90/KOfGTGhDe85tdG2t4jj2xw2KofRNOPk//PX73HmnnYYGK4/KFT+NYUV 24 | EnjzR7ECLTq7Nv5NFloY7LSmZT2mQbmBd2+vOD9QlqHIDucmFqAnTdOxBaiv6u// 25 | I+n55SdZqISqtzZ7a71MnOnFpReg4jgF9EGm5YG5n5j9y711o5jSDTaM9fsr/Bia 26 | Q+qe7eqDFuhWB8aFrl57AqiJ3uRt6G8bwXiC8YHpgtMDkG0ut/IETavVOxaZmMff 27 | BI+wQe8453/fMPbQmRoanT13wHRLAv/dUsXGqHeZA/NgYNpp06wcoG5hT0swRPnj 28 | 1KeKr8lZ0PZCqAfowz01pFgom1W2PgdTO2RgQt7Py7u1DVWxRTD1RJ1df9wKJpiH 29 | hdUR3Q3nJSnh0Ewi5YVpbDxcHuXjH9vuWIofAVwAvtfzopoPLqHXP6cPf5Z2qfP7 30 | fWML4Chbs2sPOpSvgmSv7/q94ldaCJDFC2u0kDsb1Fe2jE/h0v5FJ73EyQ== 31 | -----END CERTIFICATE REQUEST----- 32 | -------------------------------------------------------------------------------- /secrets/tls/hub_server_cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGHzCCBAegAwIBAgIJALhBljN5RqXhMA0GCSqGSIb3DQE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ZRWCaw8v6qqK9DuaH+XkKy5mtp2zzg/MkPG0a8rUo/yA5ZI= 35 | -----END CERTIFICATE----- 36 | -------------------------------------------------------------------------------- /secrets/tls/index.txt: -------------------------------------------------------------------------------- 1 | V 240704060315Z 01 unknown /CN=mojaloop-testing-toolkit 2 | -------------------------------------------------------------------------------- /secrets/tls/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = no 2 | -------------------------------------------------------------------------------- /secrets/tls/openssl-client.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ req ] 6 | default_bits = 4096 7 | default_keyfile = hub_client_key.key 8 | distinguished_name = client_distinguished_name 9 | req_extensions = client_req_extensions 10 | string_mask = utf8only 11 | prompt = no 12 | 13 | #################################################################### 14 | [ client_distinguished_name ] 15 | countryName = US 16 | stateOrProvinceName = MD 17 | localityName = Baltimore 18 | organizationName = Hub Client 19 | organizationalUnitName = Payments 20 | commonName = hubclient 21 | emailAddress = hubclient@example.com 22 | 23 | #################################################################### 24 | [ client_req_extensions ] 25 | 26 | subjectKeyIdentifier = hash 27 | basicConstraints = CA:FALSE 28 | keyUsage = digitalSignature, keyEncipherment 29 | extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection 30 | subjectAltName = @alternate_names 31 | nsComment = "OpenSSL Generated Certificate" 32 | 33 | #################################################################### 34 | [ alternate_names ] 35 | 36 | DNS.1 = localhost -------------------------------------------------------------------------------- /secrets/tls/openssl-clientca.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ ca ] 6 | default_ca = CA_default # The default ca section 7 | 8 | [ CA_default ] 9 | 10 | base_dir = . 11 | certificate = $base_dir/hub_client_cacert.pem # The CA certifcate 12 | private_key = $base_dir/hub_client_cakey.pem # The CA private key 13 | new_certs_dir = $base_dir # Location for new certs after signing 14 | database = $base_dir/index.txt # Database index file 15 | serial = $base_dir/serial.txt # The current serial number 16 | 17 | unique_subject = no 18 | 19 | default_days = 1000 # How long to certify for 20 | default_crl_days = 30 # How long before next CRL 21 | default_md = sha256 # Use public key default MD 22 | preserve = no # Keep passed DN ordering 23 | 24 | x509_extensions = ca_extensions # The extensions to add to the cert 25 | 26 | email_in_dn = no # Don't concat the email in the DN 27 | copy_extensions = copy # Required to copy SANs from CSR to cert 28 | 29 | #################################################################### 30 | [ req ] 31 | default_bits = 4096 32 | default_keyfile = hub_client_cakey.pem 33 | distinguished_name = ca_distinguished_name 34 | x509_extensions = ca_extensions 35 | string_mask = utf8only 36 | prompt = no 37 | 38 | #################################################################### 39 | [ ca_distinguished_name ] 40 | countryName = US 41 | stateOrProvinceName = Maryland 42 | localityName = Baltimore 43 | organizationName = Hub Client CA 44 | organizationalUnitName = Payments 45 | commonName = hubclientca 46 | emailAddress = hubserverca@example.com 47 | 48 | #################################################################### 49 | [ ca_extensions ] 50 | 51 | subjectKeyIdentifier = hash 52 | authorityKeyIdentifier = keyid:always, issuer 53 | basicConstraints = critical, CA:true 54 | keyUsage = keyCertSign, cRLSign 55 | 56 | #################################################################### 57 | [ signing_policy ] 58 | countryName = optional 59 | stateOrProvinceName = optional 60 | localityName = optional 61 | organizationName = optional 62 | organizationalUnitName = optional 63 | commonName = supplied 64 | emailAddress = optional 65 | 66 | #################################################################### 67 | [ signing_req ] 68 | subjectKeyIdentifier = hash 69 | authorityKeyIdentifier = keyid,issuer 70 | basicConstraints = CA:FALSE 71 | keyUsage = digitalSignature, keyEncipherment -------------------------------------------------------------------------------- /secrets/tls/openssl-server.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ req ] 6 | default_bits = 4096 7 | default_keyfile = hub_server_key.key 8 | distinguished_name = server_distinguished_name 9 | req_extensions = server_req_extensions 10 | string_mask = utf8only 11 | 12 | #################################################################### 13 | [ server_distinguished_name ] 14 | countryName_default = US 15 | stateOrProvinceName_default = MD 16 | localityName_default = Baltimore 17 | organizationName_default = Test Server, Limited 18 | organizationalUnitName_default = Payments 19 | commonName = Your FQDN 20 | commonName_default = mojaloop-testing-toolkit 21 | emailAddress_default = hubserver@example.com 22 | 23 | #################################################################### 24 | [ server_req_extensions ] 25 | 26 | subjectKeyIdentifier = hash 27 | basicConstraints = CA:FALSE 28 | keyUsage = digitalSignature, keyEncipherment 29 | extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection 30 | subjectAltName = @alternate_names 31 | nsComment = "OpenSSL Generated Certificate" 32 | 33 | #################################################################### 34 | [ alternate_names ] 35 | 36 | DNS.1 = mojaloop-testing-toolkit 37 | DNS.2 = localhost 38 | DNS.3 = keycloak 39 | DNS.4 = connection-manager-api -------------------------------------------------------------------------------- /secrets/tls/openssl-serverca.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ ca ] 6 | default_ca = CA_default # The default ca section 7 | 8 | [ CA_default ] 9 | 10 | base_dir = . 11 | certificate = $base_dir/hub_server_cacert.pem # The CA certifcate 12 | private_key = $base_dir/hub_server_cakey.pem # The CA private key 13 | new_certs_dir = $base_dir # Location for new certs after signing 14 | database = $base_dir/index.txt # Database index file 15 | serial = $base_dir/serial.txt # The current serial number 16 | 17 | unique_subject = no 18 | 19 | default_days = 1000 # How long to certify for 20 | default_crl_days = 30 # How long before next CRL 21 | default_md = sha256 # Use public key default MD 22 | preserve = no # Keep passed DN ordering 23 | 24 | x509_extensions = ca_extensions # The extensions to add to the cert 25 | 26 | email_in_dn = no # Don't concat the email in the DN 27 | copy_extensions = copy # Required to copy SANs from CSR to cert 28 | 29 | #################################################################### 30 | [ req ] 31 | default_bits = 4096 32 | default_keyfile = hub_server_cakey.pem 33 | distinguished_name = ca_distinguished_name 34 | x509_extensions = ca_extensions 35 | string_mask = utf8only 36 | prompt = no 37 | 38 | #################################################################### 39 | [ ca_distinguished_name ] 40 | countryName = US 41 | stateOrProvinceName = Maryland 42 | localityName = Baltimore 43 | organizationName = Hub Server CA 44 | organizationalUnitName = Payments 45 | commonName = hubserverca 46 | emailAddress = hubserverca@example.com 47 | 48 | #################################################################### 49 | [ ca_extensions ] 50 | 51 | subjectKeyIdentifier = hash 52 | authorityKeyIdentifier = keyid:always, issuer 53 | basicConstraints = critical, CA:true 54 | keyUsage = keyCertSign, cRLSign 55 | 56 | #################################################################### 57 | [ signing_policy ] 58 | countryName = optional 59 | stateOrProvinceName = optional 60 | localityName = optional 61 | organizationName = optional 62 | organizationalUnitName = optional 63 | commonName = supplied 64 | emailAddress = optional 65 | 66 | #################################################################### 67 | [ signing_req ] 68 | subjectKeyIdentifier = hash 69 | authorityKeyIdentifier = keyid,issuer 70 | basicConstraints = CA:FALSE 71 | keyUsage = digitalSignature, keyEncipherment -------------------------------------------------------------------------------- /secrets/tls/serial.txt: -------------------------------------------------------------------------------- 1 | 02 2 | -------------------------------------------------------------------------------- /simulator/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | services: 3 | redis: 4 | image: "redis:5.0.4-alpine" 5 | sim: 6 | image: "mojaloop/mojaloop-simulator:v11.3.0" 7 | env_file: ./sim-backend.env 8 | ports: 9 | - "3003:3003" 10 | depends_on: 11 | - scheme-adapter 12 | scheme-adapter: 13 | image: "mojaloop/sdk-scheme-adapter:v11.10.4" 14 | env_file: ./scheme-adapter.env 15 | volumes: 16 | - "./secrets:/secrets" 17 | ports: 18 | - "4000:4000" 19 | - "4002:4002" 20 | depends_on: 21 | - redis 22 | mojaloop-simulator-ui: 23 | image: "mojaloop/mojaloop-simulator-ui:v0.1.0" 24 | tty: true 25 | stdin_open: true 26 | ports: 27 | - "80:8080" 28 | restart: always 29 | networks: 30 | default: 31 | name: mojaloop-testing-toolkit 32 | -------------------------------------------------------------------------------- /simulator/provision.sh: -------------------------------------------------------------------------------- 1 | DATA='{ 2 | "displayName": "Jimmy", 3 | "firstName": "James", 4 | "middleName": "J", 5 | "lastName": "Murphy", 6 | "dateOfBirth": "1970-01-01", 7 | "idType": "MSISDN", 8 | "idValue": "27713803912" 9 | }' 10 | 11 | docker ps --format {{.Ports}} --filter ancestor=mojaloop/mojaloop-simulator:v11.2.1 |awk -F',' '{print $2}' |awk -F'->' '{print $1}' |awk -F ':' '{print $2}' |xargs -I{} curl -w '\n' -i -X POST -H 'content-type: application/json' localhost:{}/repository/parties --data "${DATA}" -------------------------------------------------------------------------------- /simulator/secrets/jws/keygen.sh: -------------------------------------------------------------------------------- 1 | #openssl genrsa -des3 -out privatekey.pem 2048 2 | openssl genrsa -out privatekey.pem 2048 3 | openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 1825 -subj "/CN=userdfsp/C=US/ST=Ohio/L=Columbus/O=User/OU=Testing" 4 | #openssl rsa -in privatekey.pem -pubout -out publickey.cer 5 | #openssl rsa -in privatekey.pem -out privatekey.pem 6 | -------------------------------------------------------------------------------- /simulator/secrets/jws/privatekey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEogIBAAKCAQEArXxsYt3uXHaw2Tiw0fNfiQmYO5IZDwQ8NlJciN6GMWaEAg+/ 3 | UIvYCcfqgn1mL8xFY70txkB+KZPgFN30l9aPwUWywJH5esBxb8tMRWZgIkCYbHCD 4 | IEbSslg9frOnYqQwN3mBD1y8HBTCc/5OQMdBfq0uuX2Mjvu9qCrGTMHjw/Ic5ZdV 5 | CMOI7oPo5fKRlZMOHcS0Ab/jRgpDvVVJAHcKZ4X8UovmPpPT1qHxoyDVNiOQN4X/ 6 | KVJ78C8DlELMzaqt3JQgSNkfestXus+LUxcQSofEBQAyjKdV+hFnvDwLQ1H3Y53E 7 | 9bfTAe/6f2xWZE9afJy3NIMkQWAsznKSfdzWhQIDAQABAoIBAGYuCoiQvnunTLIk 8 | OcDu3y4PgKJVgnzdubkk+WuD5PXjs4yjScNfGndoUC9bPHyai6QbIILMKYLDng+s 9 | SwvDTB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UJNlbhSciVR96z7bWrmWgV25RasSPx 25 | ATog5b58SahoGEH7+z8o3w6EL8zemNA/pb8SaoKFamKQtDKJtiPox6dU6e2m70tw 26 | J+1NTzOMEcaGCdSyCWGq6XMA6oyz76aYda1hYIVLn7vfVAnP3/s= 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /simulator/secrets/jws/publickey.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDQjCCAioCCQDhplKqxGjPkzANBgkqhkiG9w0BAQsFADBjMREwDwYDVQQDDAh1 3 | c2VyZGZzcDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAPBgNVBAcMCENv 4 | bHVtYnVzMQ0wCwYDVQQKDARVc2VyMRAwDgYDVQQLDAdUZXN0aW5nMB4XDTIwMDMy 5 | NDE3NTQyNFoXDTI1MDMyMzE3NTQyNFowYzERMA8GA1UEAwwIdXNlcmRmc3AxCzAJ 6 | BgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREwDwYDVQQHDAhDb2x1bWJ1czENMAsG 7 | A1UECgwEVXNlcjEQMA4GA1UECwwHVGVzdGluZzCCASIwDQYJKoZIhvcNAQEBBQAD 8 | ggEPADCCAQoCggEBAK18bGLd7lx2sNk4sNHzX4kJmDuSGQ8EPDZSXIjehjFmhAIP 9 | v1CL2AnH6oJ9Zi/MRWO9LcZAfimT4BTd9JfWj8FFssCR+XrAcW/LTEVmYCJAmGxw 10 | gyBG0rJYPX6zp2KkMDd5gQ9cvBwUwnP+TkDHQX6tLrl9jI77vagqxkzB48PyHOWX 11 | VQjDiO6D6OXykZWTDh3EtAG/40YKQ71VSQB3CmeF/FKL5j6T09ah8aMg1TYjkDeF 12 | /ylSe/AvA5RCzM2qrdyUIEjZH3rLV7rPi1MXEEqHxAUAMoynVfoRZ7w8C0NR92Od 13 | xPW30wHv+n9sVmRPWnyctzSDJEFgLM5ykn3c1oUCAwEAATANBgkqhkiG9w0BAQsF 14 | AAOCAQEAI1c698wJxbuGlr6epctkvDrgCV8SMQQzBA1947uswXoNdacAIdKF4j+3 15 | F1z5+DfdMeVpxNi9L5zcMmiy+Nn/VhC+BN2oNKKgiFwHbs5Iq8+sIhmJqWIvdUXk 16 | utslr9fuVnAndpzAkIdyFpn6fE4XoYmtCo1vemt/FPOHLrZWkj6Ebxclc2neM6IB 17 | 4BScQj2iu+/YKShbc2XXbOwctk65NRE9EjBpjpBhY96uUd0sL/7IhjNfs1xjne3p 18 | sOJRGNhWuIUzErdMSxrNZxp1ffOZA7OFDpj2qnz2SGYj454QEoEM1Z5dwP4JlYfy 19 | CkFCXZ3mGY87VIsMuqWtMdPlbMcy0w== 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /simulator/secrets/jws/verification_keys/testingtoolkitdfsp.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDbjCCAlYCCQDudXfDH36/JjANBgkqhkiG9w0BAQsFADB5MRswGQYDVQQDDBJ0 3 | ZXN0aW5ndG9vbGtpdGRmc3AxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREw 4 | DwYDVQQHDAhDb2x1bWJ1czEYMBYGA1UECgwPVGVzdGluZyBUb29sa2l0MREwDwYD 5 | VQQLDAhQYXltZW50czAeFw0yMDAzMjQxNzU1MjZaFw0yNTAzMjMxNzU1MjZaMHkx 6 | GzAZBgNVBAMMEnRlc3Rpbmd0b29sa2l0ZGZzcDELMAkGA1UEBhMCVVMxDTALBgNV 7 | BAgMBE9oaW8xETAPBgNVBAcMCENvbHVtYnVzMRgwFgYDVQQKDA9UZXN0aW5nIFRv 8 | b2xraXQxETAPBgNVBAsMCFBheW1lbnRzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A 9 | MIIBCgKCAQEAwczEjlUeOPutgPRlpZSbcbJJwsmmxsBfoPDw1sjBiR7L6DohVqKd 10 | 810+TmiDRYgCzOLabje/mtLiDC95MtuPF5yUiVE04ar6Ny5pZLxJEnbDEOAETxOn 11 | 1gzCKeRHYOcgybDi6TLhnvyFyIaXKzyBhEYvxI8VvRV11UawLqvpgVrdsbZy1FQO 12 | MLq7OB+J6qC7fhR61F6Wu45RZlZMB482c658P7dCQCdQtEMEF5kuBNB/JuURe0qK 13 | jl2udKVL3wgBC7J7o7Tx8kY5T63q/ZC3TfoTclFeXtIePt8Eu74u3d6WpSWbZ12m 14 | ewRBVPtmbGHgEXpih3uayaqIeC8Dc4zO5QIDAQABMA0GCSqGSIb3DQEBCwUAA4IB 15 | AQAZ1lQ/KcSGwy/jQUIGF87JugLU17nnIEG2TrkC5n+fZDQqs8QqU6itbkdGQyNj 16 | F5aLoPEdrKzevnBztlAEq0bofR0uDnQPN74A/NwOUfWds0hq5elZnO9Uq0G15Go4 17 | pfqLbSjHxSu6LZaHP6f9+WvMqNbGr3kipz8GSIQWixzdKBnNxCwWjZmk4gD5cahU 18 | XIpMAZumsnKk6pWilmuMIxC579CyLkGdVze3Kj6GunUJ1pieZzv4+RUJz8NgXxjW 19 | ZRwqCkEqPe/8S1X9srtcrdbHryDdC18Ldu/rADEKbSqy0BhQdKYDcxulaQuqibwD 20 | i0dWSdTWoseAbUqp2ACc6aF/ 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /simulator/secrets/jws/verification_keys/userdfsp2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDRDCCAiwCCQCgzZxVjh87FjANBgkqhkiG9w0BAQsFADBkMRIwEAYDVQQDDAl1 3 | c2VyZGZzcDIxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREwDwYDVQQHDAhD 4 | b2x1bWJ1czENMAsGA1UECgwEVXNlcjEQMA4GA1UECwwHVGVzdGluZzAeFw0yMDA4 5 | MTExMDUzMTZaFw0yNTA4MTAxMDUzMTZaMGQxEjAQBgNVBAMMCXVzZXJkZnNwMjEL 6 | MAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAPBgNVBAcMCENvbHVtYnVzMQ0w 7 | CwYDVQQKDARVc2VyMRAwDgYDVQQLDAdUZXN0aW5nMIIBIjANBgkqhkiG9w0BAQEF 8 | AAOCAQ8AMIIBCgKCAQEA616IiHg7zWrMuEt15ME1LmZPPRZnno/Zb/1cmUyJXGl7 9 | SGyGTCore1GTbRUUG/ZefrIl9d+GOrcxE/5tJuVH7EN+QwKudoRyXn4T1slhLGZs 10 | LWRVEDaz0CnhgmPo2gC5ulzhSqMoMjidjyJFMu1ELaZMkZLfz4ikHfdUsw0JVfA9 11 | vnx5DDTdSK02Jnc7lTwd4W3j5ZKOaZxGdkqztMaepSka6llEQQ9ddU16n+uz/CFb 12 | ouRjcs+dFQ+SgZZIzHex12Jie82w1H7m4rxLITBsYN1yAndnHRBk2CtmRPZkmDl7 13 | K0hRC6u/aHAMkaJGiJEKLodKGX+rX5UE5SsGDV/P1QIDAQABMA0GCSqGSIb3DQEB 14 | CwUAA4IBAQAAPMWspiIDQef+lddMxn33KEKT42Lnm/xrJylIRg4jgaf4O4Oz8wUO 15 | l+diL5xpwQh2q4t6hYQvosaPQUv26TNJ6lg2Xc6ScJN4p3Hjt4bjSsnb7yRJWT1O 16 | sGOQdRyS6CMQgjlpo26BGN1wkqm6YYTBX518QIwzjmJfkHzgLuHR77oE+GzObbuK 17 | QYw1gfEMfqZd0OvvTue8rLMuiWvYYsxF0w601smdG0a/7raYaVKGAEn+wd65saNg 18 | RCfAXCtmBcK+HTHkuR0Hq25kVuf4uQC2Y8NgcIJ9y3q+94XpZBEb1PNqEGghxFRF 19 | oV9HWcjyY3Zo7cCmIBxoU04Ot8G3RSmR 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /simulator/secrets/tls/createSecrets.sh: -------------------------------------------------------------------------------- 1 | OUTPUT_DIR="." 2 | setopt +o nomatch 3 | 4 | rm -f *.key *.pem *.csr *.crt *.old *.attr 5 | 6 | ## Generating Server CA certificate 7 | openssl req -x509 -config openssl-serverca.cnf -newkey rsa:4096 -sha256 -nodes -out dfsp_server_cacert.pem -outform PEM 8 | 9 | ## Generate server csr 10 | openssl req -config openssl-server.cnf -newkey rsa:4096 -sha256 -nodes -out dfsp_server.csr -outform PEM 11 | 12 | ## Sign server cert 13 | openssl ca -config openssl-serverca.cnf -policy signing_policy -extensions signing_req -out dfsp_server_cert.pem -infiles dfsp_server.csr 14 | 15 | ##################### 16 | 17 | ## Generating Client CA certificate 18 | openssl req -x509 -config openssl-clientca.cnf -newkey rsa:4096 -sha256 -nodes -out dfsp_client_cacert.pem -outform PEM 19 | 20 | ## Generate client csr 21 | openssl req -config openssl-client.cnf -newkey rsa:4096 -sha256 -nodes -out dfsp_client.csr -outform PEM 22 | 23 | 24 | # Sign the hub client csr with clientca 25 | # openssl ca -config openssl-clientca.cnf -policy signing_policy -extensions signing_req -out hub_client_cert.pem -infiles hub_client.csr 26 | 27 | 28 | -------------------------------------------------------------------------------- /simulator/secrets/tls/index.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/simulator/secrets/tls/index.txt -------------------------------------------------------------------------------- /simulator/secrets/tls/openssl-client.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ req ] 6 | default_bits = 4096 7 | default_keyfile = dfsp_client_key.key 8 | distinguished_name = client_distinguished_name 9 | req_extensions = client_req_extensions 10 | string_mask = utf8only 11 | prompt = no 12 | 13 | #################################################################### 14 | [ client_distinguished_name ] 15 | countryName = US 16 | stateOrProvinceName = MD 17 | localityName = Baltimore 18 | organizationName = DFSP Client 19 | organizationalUnitName = Payments 20 | commonName = dfspclient 21 | emailAddress = dfspclient@example.com 22 | 23 | #################################################################### 24 | [ client_req_extensions ] 25 | 26 | subjectKeyIdentifier = hash 27 | basicConstraints = CA:FALSE 28 | keyUsage = digitalSignature, keyEncipherment 29 | extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection 30 | subjectAltName = @alternate_names 31 | nsComment = "OpenSSL Generated Certificate" 32 | 33 | #################################################################### 34 | [ alternate_names ] 35 | 36 | DNS.1 = localhost -------------------------------------------------------------------------------- /simulator/secrets/tls/openssl-clientca.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ ca ] 6 | default_ca = CA_default # The default ca section 7 | 8 | [ CA_default ] 9 | 10 | base_dir = . 11 | certificate = $base_dir/dfsp_client_cacert.pem # The CA certifcate 12 | private_key = $base_dir/dfsp_client_cakey.pem # The CA private key 13 | new_certs_dir = $base_dir # Location for new certs after signing 14 | database = $base_dir/index.txt # Database index file 15 | serial = $base_dir/serial.txt # The current serial number 16 | 17 | unique_subject = no 18 | 19 | default_days = 1000 # How long to certify for 20 | default_crl_days = 30 # How long before next CRL 21 | default_md = sha256 # Use public key default MD 22 | preserve = no # Keep passed DN ordering 23 | 24 | x509_extensions = ca_extensions # The extensions to add to the cert 25 | 26 | email_in_dn = no # Don't concat the email in the DN 27 | copy_extensions = copy # Required to copy SANs from CSR to cert 28 | 29 | #################################################################### 30 | [ req ] 31 | default_bits = 4096 32 | default_keyfile = dfsp_client_cakey.pem 33 | distinguished_name = ca_distinguished_name 34 | x509_extensions = ca_extensions 35 | string_mask = utf8only 36 | prompt = no 37 | 38 | #################################################################### 39 | [ ca_distinguished_name ] 40 | countryName = US 41 | stateOrProvinceName = Maryland 42 | localityName = Baltimore 43 | organizationName = DFSP Client CA 44 | organizationalUnitName = Payments 45 | commonName = dfspclientca 46 | emailAddress = dfspserverca@example.com 47 | 48 | #################################################################### 49 | [ ca_extensions ] 50 | 51 | subjectKeyIdentifier = hash 52 | authorityKeyIdentifier = keyid:always, issuer 53 | basicConstraints = critical, CA:true 54 | keyUsage = keyCertSign, cRLSign 55 | 56 | #################################################################### 57 | [ signing_policy ] 58 | countryName = optional 59 | stateOrProvinceName = optional 60 | localityName = optional 61 | organizationName = optional 62 | organizationalUnitName = optional 63 | commonName = supplied 64 | emailAddress = optional 65 | 66 | #################################################################### 67 | [ signing_req ] 68 | subjectKeyIdentifier = hash 69 | authorityKeyIdentifier = keyid,issuer 70 | basicConstraints = CA:FALSE 71 | keyUsage = digitalSignature, keyEncipherment -------------------------------------------------------------------------------- /simulator/secrets/tls/openssl-server.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ req ] 6 | default_bits = 2048 7 | default_keyfile = dfsp_server_key.key 8 | distinguished_name = server_distinguished_name 9 | req_extensions = server_req_extensions 10 | string_mask = utf8only 11 | 12 | #################################################################### 13 | [ server_distinguished_name ] 14 | countryName_default = US 15 | stateOrProvinceName_default = MD 16 | localityName_default = Baltimore 17 | organizationName_default = Test Server, Limited 18 | organizationalUnitName_default = Payments 19 | commonName = Your FQDN 20 | commonName_default = scheme-adapter 21 | emailAddress_default = dfspserver@example.com 22 | 23 | #################################################################### 24 | [ server_req_extensions ] 25 | 26 | subjectKeyIdentifier = hash 27 | basicConstraints = CA:FALSE 28 | keyUsage = digitalSignature, keyEncipherment 29 | extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection 30 | subjectAltName = @alternate_names 31 | nsComment = "OpenSSL Generated Certificate" 32 | 33 | #################################################################### 34 | [ alternate_names ] 35 | 36 | DNS.1 = scheme-adapter -------------------------------------------------------------------------------- /simulator/secrets/tls/openssl-serverca.cnf: -------------------------------------------------------------------------------- 1 | HOME = . 2 | RANDFILE = $ENV::HOME/.rnd 3 | 4 | #################################################################### 5 | [ ca ] 6 | default_ca = CA_default # The default ca section 7 | 8 | [ CA_default ] 9 | 10 | base_dir = . 11 | certificate = $base_dir/dfsp_server_cacert.pem # The CA certifcate 12 | private_key = $base_dir/dfsp_server_cakey.pem # The CA private key 13 | new_certs_dir = $base_dir # Location for new certs after signing 14 | database = $base_dir/index.txt # Database index file 15 | serial = $base_dir/serial.txt # The current serial number 16 | 17 | unique_subject = no 18 | 19 | default_days = 1000 # How long to certify for 20 | default_crl_days = 30 # How long before next CRL 21 | default_md = sha256 # Use public key default MD 22 | preserve = no # Keep passed DN ordering 23 | 24 | x509_extensions = ca_extensions # The extensions to add to the cert 25 | 26 | email_in_dn = no # Don't concat the email in the DN 27 | copy_extensions = copy # Required to copy SANs from CSR to cert 28 | 29 | #################################################################### 30 | [ req ] 31 | default_bits = 4096 32 | default_keyfile = dfsp_server_cakey.pem 33 | distinguished_name = ca_distinguished_name 34 | x509_extensions = ca_extensions 35 | string_mask = utf8only 36 | prompt = no 37 | 38 | #################################################################### 39 | [ ca_distinguished_name ] 40 | countryName = US 41 | stateOrProvinceName = Maryland 42 | localityName = Baltimore 43 | organizationName = DFSP Server CA 44 | organizationalUnitName = Payments 45 | commonName = dfspserverca 46 | emailAddress = dfspserverca@example.com 47 | 48 | #################################################################### 49 | [ ca_extensions ] 50 | 51 | subjectKeyIdentifier = hash 52 | authorityKeyIdentifier = keyid:always, issuer 53 | basicConstraints = critical, CA:true 54 | keyUsage = keyCertSign, cRLSign 55 | 56 | #################################################################### 57 | [ signing_policy ] 58 | countryName = optional 59 | stateOrProvinceName = optional 60 | localityName = optional 61 | organizationName = optional 62 | organizationalUnitName = optional 63 | commonName = supplied 64 | emailAddress = optional 65 | 66 | #################################################################### 67 | [ signing_req ] 68 | subjectKeyIdentifier = hash 69 | authorityKeyIdentifier = keyid,issuer 70 | basicConstraints = CA:FALSE 71 | keyUsage = digitalSignature, keyEncipherment -------------------------------------------------------------------------------- /simulator/secrets/tls/serial.txt: -------------------------------------------------------------------------------- 1 | 01 2 | -------------------------------------------------------------------------------- /simulator/sim-backend.env: -------------------------------------------------------------------------------- 1 | # Enable mutual TLS authentication. Useful when the simulator is not running in a Mojaloop 2 | # environment, i.e. when you're running it locally against your own implementation. 3 | MUTUAL_TLS_ENABLED=false 4 | 5 | # Enable server-only TLS; i.e. serve on HTTPS instead of HTTP. 6 | HTTPS_ENABLED=false 7 | 8 | # Location of certs and key required for TLS 9 | CA_CERT_PATH=./secrets/cacert.pem 10 | SERVER_CERT_PATH=./secrets/servercert.pem 11 | SERVER_KEY_PATH=./secrets/serverkey.pem 12 | 13 | # The number of space characters by which to indent pretty-printed logs. If set to zero, log events 14 | # will each be printed on a single line. 15 | LOG_INDENT=0 16 | 17 | # The name of the sqlite log file. This probably doesn't matter much to the user, except that 18 | # setting :memory: will use an in-memory sqlite db, which will be faster and not consume disk 19 | # space. However, it will also mean that the logs will be lost once the container is stopped. 20 | SQLITE_LOG_FILE=:memory: 21 | 22 | # The DFSPID of this simulator. The simulator will accept any requests routed to 23 | # FSPIOP-Destination: $DFSP_ID. Other requests will be rejected. 24 | DFSP_ID=payerfsp 25 | 26 | # The name of the sqlite model database. If you would like to start the simulator with preloaded 27 | # state you can use a preexisting file. If running in a container, you can mount a sqlite file as a 28 | # volume in the container to preserve state between runs. 29 | # Use MODEL_DATABASE=:memory: for an ephemeral in-memory database 30 | MODEL_DATABASE=./model.sqlite 31 | 32 | # Outbound API endpoint (It might be a container in the compose file so remember the networking IP) 33 | OUTBOUND_ENDPOINT=http://scheme-adapter:4001 34 | 35 | # The simulator can automatically add fees when generating quote responses. Use this 36 | # variable to control the fee amounts added. e.g. for a transfer of 100 USD a FEE_MULTIPLIER of 0.1 37 | # reuslts in fees of USD 10 being applied to the quote response 38 | FEE_MULTIPLIER=0.05 39 | 40 | # Specifies the location of a rules file for the simulator backend. Rules can be used to produce 41 | # specific simulator behaviours in response to incoming requests that match certain conditions. 42 | # e.g. a rule can be used to trigger NDC errors given transfers between certain limits. 43 | 44 | RULES_FILE=./rules.json 45 | -------------------------------------------------------------------------------- /simulator2/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | services: 3 | redis2: 4 | image: "redis:5.0.4-alpine" 5 | sim2: 6 | image: "mojaloop/mojaloop-simulator:v8.2.0" 7 | env_file: ./sim-backend.env 8 | ports: 9 | - "23003:3003" 10 | depends_on: 11 | - scheme-adapter2 12 | scheme-adapter2: 13 | image: "mojaloop/sdk-scheme-adapter:v8.6.0" 14 | # image: "sdk-scheme-adapter:local" 15 | env_file: ./scheme-adapter.env 16 | volumes: 17 | - "./secrets:/src/secrets" 18 | ports: 19 | - "24000:4000" 20 | depends_on: 21 | - redis2 22 | networks: 23 | default: 24 | name: mojaloop-testing-toolkit 25 | -------------------------------------------------------------------------------- /simulator2/secrets/jws/keygen.sh: -------------------------------------------------------------------------------- 1 | #openssl genrsa -des3 -out privatekey.pem 2048 2 | openssl genrsa -out privatekey.pem 2048 3 | openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 1825 -subj "/CN=userdfsp2/C=US/ST=Ohio/L=Columbus/O=User/OU=Testing" 4 | #openssl rsa -in privatekey.pem -pubout -out publickey.cer 5 | #openssl rsa -in privatekey.pem -out privatekey.pem 6 | -------------------------------------------------------------------------------- /simulator2/secrets/jws/privatekey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA616IiHg7zWrMuEt15ME1LmZPPRZnno/Zb/1cmUyJXGl7SGyG 3 | TCore1GTbRUUG/ZefrIl9d+GOrcxE/5tJuVH7EN+QwKudoRyXn4T1slhLGZsLWRV 4 | EDaz0CnhgmPo2gC5ulzhSqMoMjidjyJFMu1ELaZMkZLfz4ikHfdUsw0JVfA9vnx5 5 | DDTdSK02Jnc7lTwd4W3j5ZKOaZxGdkqztMaepSka6llEQQ9ddU16n+uz/CFbouRj 6 | cs+dFQ+SgZZIzHex12Jie82w1H7m4rxLITBsYN1yAndnHRBk2CtmRPZkmDl7K0hR 7 | C6u/aHAMkaJGiJEKLodKGX+rX5UE5SsGDV/P1QIDAQABAoIBAQCuXacaKrBq+m7V 8 | LRoWsMecKzESmVGEVx8HZxQ9gUTVkFNDkRpgvHDf98wW6KGwIXFZvNKAdupy/xm9 9 | rSPhx8PjlRCpxgfHR1GPDSnXWfLC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UGjcYV4EeUqnAbiRrPwLJq9S3vgTaj18RrKiyqxaPHUID1y4 26 | IdTqs6k8+1i0B2d5MbC5SXCzJY7pj0rPkiGDZT4MRglUWy1Wj0uSGw== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /simulator2/secrets/jws/publickey.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDRDCCAiwCCQCgzZxVjh87FjANBgkqhkiG9w0BAQsFADBkMRIwEAYDVQQDDAl1 3 | c2VyZGZzcDIxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREwDwYDVQQHDAhD 4 | b2x1bWJ1czENMAsGA1UECgwEVXNlcjEQMA4GA1UECwwHVGVzdGluZzAeFw0yMDA4 5 | MTExMDUzMTZaFw0yNTA4MTAxMDUzMTZaMGQxEjAQBgNVBAMMCXVzZXJkZnNwMjEL 6 | MAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAPBgNVBAcMCENvbHVtYnVzMQ0w 7 | CwYDVQQKDARVc2VyMRAwDgYDVQQLDAdUZXN0aW5nMIIBIjANBgkqhkiG9w0BAQEF 8 | AAOCAQ8AMIIBCgKCAQEA616IiHg7zWrMuEt15ME1LmZPPRZnno/Zb/1cmUyJXGl7 9 | SGyGTCore1GTbRUUG/ZefrIl9d+GOrcxE/5tJuVH7EN+QwKudoRyXn4T1slhLGZs 10 | LWRVEDaz0CnhgmPo2gC5ulzhSqMoMjidjyJFMu1ELaZMkZLfz4ikHfdUsw0JVfA9 11 | vnx5DDTdSK02Jnc7lTwd4W3j5ZKOaZxGdkqztMaepSka6llEQQ9ddU16n+uz/CFb 12 | ouRjcs+dFQ+SgZZIzHex12Jie82w1H7m4rxLITBsYN1yAndnHRBk2CtmRPZkmDl7 13 | K0hRC6u/aHAMkaJGiJEKLodKGX+rX5UE5SsGDV/P1QIDAQABMA0GCSqGSIb3DQEB 14 | CwUAA4IBAQAAPMWspiIDQef+lddMxn33KEKT42Lnm/xrJylIRg4jgaf4O4Oz8wUO 15 | l+diL5xpwQh2q4t6hYQvosaPQUv26TNJ6lg2Xc6ScJN4p3Hjt4bjSsnb7yRJWT1O 16 | sGOQdRyS6CMQgjlpo26BGN1wkqm6YYTBX518QIwzjmJfkHzgLuHR77oE+GzObbuK 17 | QYw1gfEMfqZd0OvvTue8rLMuiWvYYsxF0w601smdG0a/7raYaVKGAEn+wd65saNg 18 | RCfAXCtmBcK+HTHkuR0Hq25kVuf4uQC2Y8NgcIJ9y3q+94XpZBEb1PNqEGghxFRF 19 | oV9HWcjyY3Zo7cCmIBxoU04Ot8G3RSmR 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /simulator2/secrets/jws/verification_keys/testingtoolkitdfsp.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDbjCCAlYCCQDudXfDH36/JjANBgkqhkiG9w0BAQsFADB5MRswGQYDVQQDDBJ0 3 | ZXN0aW5ndG9vbGtpdGRmc3AxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREw 4 | DwYDVQQHDAhDb2x1bWJ1czEYMBYGA1UECgwPVGVzdGluZyBUb29sa2l0MREwDwYD 5 | VQQLDAhQYXltZW50czAeFw0yMDAzMjQxNzU1MjZaFw0yNTAzMjMxNzU1MjZaMHkx 6 | GzAZBgNVBAMMEnRlc3Rpbmd0b29sa2l0ZGZzcDELMAkGA1UEBhMCVVMxDTALBgNV 7 | BAgMBE9oaW8xETAPBgNVBAcMCENvbHVtYnVzMRgwFgYDVQQKDA9UZXN0aW5nIFRv 8 | b2xraXQxETAPBgNVBAsMCFBheW1lbnRzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A 9 | MIIBCgKCAQEAwczEjlUeOPutgPRlpZSbcbJJwsmmxsBfoPDw1sjBiR7L6DohVqKd 10 | 810+TmiDRYgCzOLabje/mtLiDC95MtuPF5yUiVE04ar6Ny5pZLxJEnbDEOAETxOn 11 | 1gzCKeRHYOcgybDi6TLhnvyFyIaXKzyBhEYvxI8VvRV11UawLqvpgVrdsbZy1FQO 12 | MLq7OB+J6qC7fhR61F6Wu45RZlZMB482c658P7dCQCdQtEMEF5kuBNB/JuURe0qK 13 | jl2udKVL3wgBC7J7o7Tx8kY5T63q/ZC3TfoTclFeXtIePt8Eu74u3d6WpSWbZ12m 14 | ewRBVPtmbGHgEXpih3uayaqIeC8Dc4zO5QIDAQABMA0GCSqGSIb3DQEBCwUAA4IB 15 | AQAZ1lQ/KcSGwy/jQUIGF87JugLU17nnIEG2TrkC5n+fZDQqs8QqU6itbkdGQyNj 16 | F5aLoPEdrKzevnBztlAEq0bofR0uDnQPN74A/NwOUfWds0hq5elZnO9Uq0G15Go4 17 | pfqLbSjHxSu6LZaHP6f9+WvMqNbGr3kipz8GSIQWixzdKBnNxCwWjZmk4gD5cahU 18 | XIpMAZumsnKk6pWilmuMIxC579CyLkGdVze3Kj6GunUJ1pieZzv4+RUJz8NgXxjW 19 | ZRwqCkEqPe/8S1X9srtcrdbHryDdC18Ldu/rADEKbSqy0BhQdKYDcxulaQuqibwD 20 | i0dWSdTWoseAbUqp2ACc6aF/ 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /simulator2/secrets/jws/verification_keys/userdfsp.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDQjCCAioCCQDhplKqxGjPkzANBgkqhkiG9w0BAQsFADBjMREwDwYDVQQDDAh1 3 | c2VyZGZzcDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAPBgNVBAcMCENv 4 | bHVtYnVzMQ0wCwYDVQQKDARVc2VyMRAwDgYDVQQLDAdUZXN0aW5nMB4XDTIwMDMy 5 | NDE3NTQyNFoXDTI1MDMyMzE3NTQyNFowYzERMA8GA1UEAwwIdXNlcmRmc3AxCzAJ 6 | BgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREwDwYDVQQHDAhDb2x1bWJ1czENMAsG 7 | A1UECgwEVXNlcjEQMA4GA1UECwwHVGVzdGluZzCCASIwDQYJKoZIhvcNAQEBBQAD 8 | ggEPADCCAQoCggEBAK18bGLd7lx2sNk4sNHzX4kJmDuSGQ8EPDZSXIjehjFmhAIP 9 | v1CL2AnH6oJ9Zi/MRWO9LcZAfimT4BTd9JfWj8FFssCR+XrAcW/LTEVmYCJAmGxw 10 | gyBG0rJYPX6zp2KkMDd5gQ9cvBwUwnP+TkDHQX6tLrl9jI77vagqxkzB48PyHOWX 11 | VQjDiO6D6OXykZWTDh3EtAG/40YKQ71VSQB3CmeF/FKL5j6T09ah8aMg1TYjkDeF 12 | /ylSe/AvA5RCzM2qrdyUIEjZH3rLV7rPi1MXEEqHxAUAMoynVfoRZ7w8C0NR92Od 13 | xPW30wHv+n9sVmRPWnyctzSDJEFgLM5ykn3c1oUCAwEAATANBgkqhkiG9w0BAQsF 14 | AAOCAQEAI1c698wJxbuGlr6epctkvDrgCV8SMQQzBA1947uswXoNdacAIdKF4j+3 15 | F1z5+DfdMeVpxNi9L5zcMmiy+Nn/VhC+BN2oNKKgiFwHbs5Iq8+sIhmJqWIvdUXk 16 | utslr9fuVnAndpzAkIdyFpn6fE4XoYmtCo1vemt/FPOHLrZWkj6Ebxclc2neM6IB 17 | 4BScQj2iu+/YKShbc2XXbOwctk65NRE9EjBpjpBhY96uUd0sL/7IhjNfs1xjne3p 18 | sOJRGNhWuIUzErdMSxrNZxp1ffOZA7OFDpj2qnz2SGYj454QEoEM1Z5dwP4JlYfy 19 | CkFCXZ3mGY87VIsMuqWtMdPlbMcy0w== 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_client.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIE1jCCAr4CAQAwgZAxEzARBgNVBAMMCmRmc3BjbGllbnQxCzAJBgNVBAYTAlVT 3 | MQ0wCwYDVQQIDARPaGlvMREwDwYDVQQHD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aT9R5FtJBQ/EUh4DfcB8VwtuvY9sZjkKTyNVGlJJNK6nT5aLXf2PKUEhn 20 | eJnIPx+gQdSV8y6/9P9/H8ijEnWdKWvdQvP7xUBYvRrBwcNTdi3CpqVMkCFGPBvo 21 | GrfTUMQyExBHUAPM3snFod1Z5ddaxvADZ7DtiJBt5MVvt+cLuTiNYV0hCBkD8h4r 22 | 2Hw+bXsAcI4LW+W2ROz7rseo7rVMpbAT3T8hFY3bWCngKHuSl9Z5HIn/nL6kYOiu 23 | wibFUSORf7+mNHQr10BtRB5UehBEhRSQOwlQnQKh3xveRN+fcoujcfHb8tyO9pet 24 | IvW5bHsuaWCnFfkeL7h4GCuTgnJgu2/elZvPIG6A0ebif7BHserzo6IhxikebAEJ 25 | ck/soHx96ajp9mfRNVoCle+pww8mtDls/iQzqv+uFDknlSBijgxc9BOo4WvzN5lg 26 | 4b57eMWSjnaQm8zkoJYbB28JLCR/YTCQY7WKUVSREQf/ZvYCgFYDImyjZ5qZdU+a 27 | cIojgOy27/f7UvH0koeCa5fg8A2Ba/sAoC7rg6cxv9ISYdr9/VlS9ky9 28 | -----END CERTIFICATE REQUEST----- 29 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_client_cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFejCCA2KgAwIBAgIJAKwaPGSyCpeeMA0GCSqGSIb3DQEBCwUAMHIxFTATBgNV 3 | BAMMDGRmc3BjbGllbnRjYTELMAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAP 4 | BgNVBAcMCENvbHVtYnVzMRcwFQYDVQQKDA5ERlNQIENsaWVudCBDQTERMA8GA1UE 5 | CwwIUGF5bWVudHMwHhcNMjAwODExMTA0ODE0WhcNNDcxMjI4MTA0ODE0WjByMRUw 6 | EwYDVQQDDAxkZnNwY2xpZW50Y2ExCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlv 7 | MREwDwYDVQQHDAhDb2x1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57ZZc9ge33O7MFeePn7tx9YK5UeMhFqKujVB8idvdXIQnXUh+Is07js 24 | gN0zfrymBKqN/VcChKimB7Qt4/Sf37ZIRiLiGWcFjrs3bSjBW98ssj52BhdTLBzD 25 | a2DtTdCoKvSrMt/bSCVHwSiex9fVWGLEJbsWAC3e9uSWdIxvGIIkqsDRCYf+q/Bq 26 | YQY5XOCbpI9053CVU2MJ2s4uiW7+HGGrGTxNBE9VU9sAq6UXMpxmtdPEMlPq6oj3 27 | 2vu7DnUUkAbofD2LDDW652Pbb4BvoXLki/NWs8++jv16XhoBj6JaYKOjU8Eyxihs 28 | bp3+BJqYiLHCowhA/sgdeaDWaqPIuyzWnb4lZi3OkTWH6nTrueckaE/o0bLgYrj5 29 | 9jt0gmEoRCJX+sQun8nFqlfOeEBILe4g46zMF/cz3UTAGvYqoJcJq2F3j/zew2aG 30 | J+9GCb52NHPi2WH9tfbnk6oRrD6rG6zuza4Ijo7Ur85TT1H6w8vSeoS0wixjIO38 31 | ji6P/RpSmvu9QQBGSw0= 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_client_cacert.srl: -------------------------------------------------------------------------------- 1 | AE0564F84318BE2E 2 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_client_cert.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGFzCCA/+gAwIBAgIUEiuay1O3zb7p8atk42hAuXdq0VkwDQYJKoZIhvcNAQEL 3 | BQAweTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk5ZMQswCQYDVQQHEwJOWTEfMB0G 4 | A1UEChMWVGVzdGluZyBUb29sa2l0IEh1YiBDQTERMA8GA1UECxMIUGF5bWVudHMx 5 | HDAaBgNVBAMTE3Rlc3Rpbmd0b29sa2l0aHViY2EwHhcNMjAwODExMTA0NjAwWhcN 6 | MzAwODA5MTA0NjAwWjCBkDETMBEGA1UEAxMKZGZzcGNsaWVudDELMAkGA1U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ByqmXGpDAdBgNVHREE 23 | FjAUgRJhZG1pbkB1c2VyZGZzcC5jb20wDQYJKoZIhvcNAQELBQADggIBAHmVcwjE 24 | GfqVU3pB3VW6doqe3HFxcsZ5yjeI6yENOtW3QYfSSOxRjevLd9l8kPGBK+VlvopZ 25 | i6B0bOBR72SwubX+bYpaWBFO19YS0yqFeVzCuPDY7o6+YblhKZUavKXM2KtOa6bb 26 | pplL5g2vcmpSRKJAPOQDzl0PyXWrxyqLQBu1SBoNTeCLDXRF5QJKxPdNtdWVz+02 27 | bU3XsAr7QyJOlJMjYCNK74j+P0SvU669lGs2sMROnebpzUuDfAxx1zX8N14SF8xw 28 | Qxy9k6nLk2N/lJrSWdEyddOPwta1oowvuguvjtk1Qk7AqG+e+6YKE4T+SAQvmYFf 29 | 2Wf2n4Z9u1aXOM1u4sQUfIVprV0FH6YxR1o5fStasBbperjsr7KPuy0/AAJWrTom 30 | vuC7isESOMYQw4/0Y1ogCtIRWmK8InM1NxoaP0NQtJu70qAeW17jfnQAdXFC1pzi 31 | IvDqPJKo7c2JmXgUrDcm8rMQeWyTr2VdEvUJSkrr/wTAz3Z3BfBLJ7eeJEns/11+ 32 | VPIWb5rgo41yI5Gy0EKv0mewPv8OFNMeUNyd3Us2puaCL5E24ou0axaDEKz7B5gp 33 | rrjIvQJGDP1ifxDeoVuU9YL8JTL06mb+wgYuiEBoLqoul/bgRBJZjWwI/g6dqnPc 34 | cE9r020Vszi0Y+1SX/PDRPoxE6J4pDlWcWbf 35 | -----END CERTIFICATE----- 36 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIEsTCCApkCAQAwSjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMRQwEgYDVQQK 3 | DAtERlNQIFNlcnZlcjEYMBYGA1UEAwwPc2NoZW1lLWFkYXB0ZXIyMIICIjANBgkq 4 | hkiG9w0BAQEFAAOCA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zp4AolUgcji 20 | 1KND+KEO+JE9nofPj/hPHGGy3tlJWDMT+WRw2QXQCXrkTAhzk21NILaKOW+7ycT3 21 | qYVxQlm+Bxl33QWvE1CwdxM19xot4QYMQqL1oFf1xGuol8MHX7CqhK9cmgYP1Ffs 22 | JeL1iCdivIjoSby0LYeCabAqPgnK4N1/VTzv2DWhizYFpCYgLAvbkJWhHLcz1tbW 23 | tGjgSsEE5C/aQALEpZYl2fh1CNrTwh1aNv2jCZMSHAV4TXbaT2inXzl/tHgGnJB6 24 | EHVHncEByC0pb7QpAPYFW7ymh6lDMEqVsOsFcjCWrTCMNO5I2YrsYbz0w18uyMJB 25 | fRhApX4XhNyFSottxgj8YDt1E75k41v3P5HHIrttzHchbzWTdJSiG+qgJXVdhy+E 26 | KtX3aaJ6Cvy1dSATCUq6YLvN7skWNvzYna7H32yGRO2nWr9wYvoFZ7pAQN+WcT3u 27 | kqoTUTM= 28 | -----END CERTIFICATE REQUEST----- 29 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_server_cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFejCCA2KgAwIBAgIJAJ/nQElUMqtQMA0GCSqGSIb3DQEBCwUAMHIxFTATBgNV 3 | BAMMDGRmc3BzZXJ2ZXJjYTELMAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAP 4 | BgNVBAcMCENvbHVtYnVzMRcwFQYDVQQKDA5ERlNQIFNlcnZlciBDQTERMA8GA1UE 5 | CwwIUGF5bWVudHMwHhcNMjAwODExMTA0ODEzWhcNNDcxMjI4MTA0ODEzWjByMRUw 6 | EwYDVQQDDAxkZnNwc2VydmVyY2ExCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlv 7 | MREwDwYDVQQHDAhDb2x1bWJ1czEXMBUGA1UECgwOREZTUCBTZXJ2ZXIgQ0ExETAP 8 | BgNVBAsMCFBheW1lbnRzMIICIjANBgkqhkiG9w0BAQEFAAOC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fLYqg2p5w8xE9C4JAWLVwW/Vlc14ZnxNXfP95cg 25 | bLT1yDCXNCStZDtKXo8JjkW50GfiLJb0M4AHwaOszkQ6CK6z9WQS4yCXSq1o1RnJ 26 | nu6mWVFGFJx4tGZ/VR20he2bNfpw8liOne9pfcMRWxcFklaKKm/e270OL5IAZDyw 27 | RAnHLmKxwz42nPicvSYTDybtHI3Tnn1vaVpF0eyK4pQyy8uUdcY7ABF+RfpwPYCo 28 | VGQDvsHicqFsWS7Sd9pWopwgszgyZWRVVfcyf5NQainzywubcqRDDwiNSd9f7NE4 29 | zXcZ/Cl6OF0rqB/9WPtcgzn7J7yzy7GLWxpfQkTmtOS9Pf2AAopA5rjENsLwsUQ/ 30 | 9x/iEE9GTt+MrGqhsfNGEHEJz0LMger862RVDTeOBcKjP+E5L7V5nyFO5mNY4lpa 31 | 5AAGAONWELW4Vjk5mYY= 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_server_cacert.srl: -------------------------------------------------------------------------------- 1 | FD19E8534EA08D4D 2 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/dfsp_server_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFvTCCA6WgAwIBAgIJAP0Z6FNOoI1NMA0GCSqGSIb3DQEBCwUAMHIxFTATBgNV 3 | BAMMDGRmc3BzZXJ2ZXJjYTELMAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAP 4 | BgNVBAcMCENvbHVtYnVzMRcwFQYDVQQKDA5ERlNQIFNlcnZlciBDQTERMA8GA1UE 5 | CwwIUGF5bWVudHMwHhcNMjAwODExMTA0ODEzWhcNMzAwODA5MTA0ODEzWjBKMQsw 6 | CQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExFDASBgNVBAoMC0RGU1AgU2VydmVyMRgw 7 | FgYDVQQDDA9zY2hlbWUtYWRhcHRlcjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICD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S5zYcBWqBGtuA+mzcqhes 24 | 3wrCjdK61HuH47/XMUEUAfwWeuukK8NJarNGPq3qjWD44tb79je+s4qZrdRqBbOL 25 | qGkfMG8jKnIaTYSyyDRhS2pbJ2XbXE+M9wyHz0CxwXOQpDwc47It5+bfG4NK7hTC 26 | wMSzliuKE7T3O025dS3BjK8LMBKLG2pbevdf8R4xP6Ltb0rtpBfMT1s9BtZVbPPb 27 | zdcxsKgin9wt4WItj0t1YtNITQyziS4s2qjX1C941/8kvG7dgJ7nQaHqE9egIxFO 28 | 7oj9VOJSUvHWKcoCxEcWY/l7KlvwNI6EsSvx2t6nrfuTmpP0sMANx29lUVu8obe9 29 | JsdC2eBG95nmGmD1mfFgeYIv43rQ0BHLZUuDZh6LKmDEusy8Bl5V1lCkxmwa2r6c 30 | j0tHnFYyTucFzdmb4HKVwvhLJkljER9oP7E7elvgyDwrvtwLgBWnp9yf/YILnxkS 31 | EIbtblSTluVW7T59dPfhD8d/bnhPtZjkH8DNB1dXEpuQzeWzVVkyMmarrzwM2VJb 32 | jh6hytMPUuAUp/99Yh6AuDFj+JlPkCXQPBrQamWnMGiL 33 | -----END CERTIFICATE----- 34 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/hub_client.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIE1TCCAr0CAQAwgY8xEjAQBgNVBAMMCWh1YmNsaWVudDELMAkGA1UEBhMCVVMx 3 | DTALBgNVBAgMBE9oaW8xETAPBgNVBAcMCENvbHVtYnVzMRMwEQYDVQQKDApIdWIg 4 | Q2xpZW50MREwDwYDVQQLDAhQYXltZW50czEiMCAGCSqGSIb3DQEJARYTYWRtaW5A 5 | aHViY2xpZW50LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMXw 6 | zRGgrVa7eiuO6ZgNc16gLTW+akYh86CDIiIYtDIKUcLsmViLVXqMdPbaheMPTNr3 7 | PGhAYyMjRUSf/PtxokTexyf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JQcpdLwrEV2WDFsxRalYTnvYazv+dtBmidSHziZythQZNPcDQNvN 24 | 8OmwEE0t+o9TpEgHRVLonwRm3AfHiEmD/fsj0yylZzg7hSDa9QaQ1TW/nCC/3KfZ 25 | ASztRCe+teibaLbRiLNUwhI+kkYTy1jibeDtb7A/FE8rlnC21e+5/Ds+90FEtcaG 26 | kesHJkC7rtzGlsdZGB0HnDJTWE9vxFsIcHf0+oJ73yKI/17+0DW7jBFp874hdhMj 27 | ip8xnZFDmplztB3aPzIpmNClAcNn5AP+m9cKbg8wY/wmTcRlF7hNAMU= 28 | -----END CERTIFICATE REQUEST----- 29 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/hub_client_cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFdjCCA16gAwIBAgIJAL5G4HWE3SsRMA0GCSqGSIb3DQEBCwUAMHAxFDASBgNV 3 | BAMMC2h1YmNsaWVudGNhMQswCQYDVQQGEwJVUzENMAsGA1UECAwET2hpbzERMA8G 4 | A1UEBwwIQ29sdW1idXMxFjAUBgNVBAoMDUh1YiBDbGllbnQgQ0ExETAPBgNVBAsM 5 | CFBheW1lbnRzMB4XDTIwMDQwNzIwMjA0NVoXDTQ3MDgyNDIwMjA0NVowcDEUMBIG 6 | A1UEAwwLaHViY2xpZW50Y2ExCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREw 7 | DwYDVQQHDAhDb2x1bWJ1czEWMBQGA1UECgwNSHViIENsaWVudCBDQTERMA8GA1UE 8 | CwwIUGF5bWVudHMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDGeRcG 9 | 9RbcFLGTw5v9AsB3wTrcOCX3VQT8sCODAotd6heuOZwxeODZ1it35OtfNwhSDNlC 10 | xg3GxYnh+PThWpCW7fHeXYKskj+0iXtgOdnoyjJQbXW4YTHWt+m/1AaB3A2QgEwP 11 | 2alxSXqKVTPar70Swh8CSyfMWObXGHk6ydhZ87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DhApDy5CKXpW1j4fRWQy+vgLZTof3t8mv4znfc+P8M0ET/HoH2Q 28 | q1B8Cwis0JIxfMQJ/HiypVo0g2cPCpqQkhwJk8kFuJccPiCnm9yR5wsmVm0wF1/d 29 | glB2lou8lGNBjnMuRxSjQ6S/k4XNGupV8D9qnoHCrIcfNRwfsNIFFRbbDFn9pfog 30 | IV4kF6529qmxTMcmQXCPhkTHRkTypvPc9Hgxd60GtJVmHIxBFHRWNcSRVFuZtyHm 31 | cTQg3x0mFGAD9Q== 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/hub_client_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFfjCCA2YCCQCuBWT4Qxi+LjANBgkqhkiG9w0BAQsFADByMRUwEwYDVQQDDAxk 3 | ZnNwY2xpZW50Y2ExCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREwDwYDVQQH 4 | DAhDb2x1bWJ1czEXMBUGA1UECgwOREZTUCBDbGllbnQgQ0ExETAPBgNVBAsMCFBh 5 | eW1lbnRzMB4XDTIwMDgxMTEwNTEyM1oXDTMwMDgwOTEwNTEyM1owgY8xEjAQBgNV 6 | BAMMCWh1YmNsaWVudDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBE9oaW8xETAPBgNV 7 | BAcMCENvbHVtYnVzMRMwEQYDVQQKDApIdWIgQ2xpZW50MREwDwYDVQQLDAhQYXlt 8 | ZW50czEiMCAGCSqGSIb3DQEJARYTYWRtaW5AaHViY2xpZW50LmNvbTCCAiIwDQYJ 9 | KoZIhvcNAQEBBQADggIPADCCAgoCggIBAMXwzRGgrVa7eiuO6ZgNc16gLTW+akYh 10 | 86CDIiIYtDIKUcLsmViLVXqMdPbaheMPTNr3PGhAYyMjRUSf/PtxokTexyfr2ATF 11 | 1JL8MC9ea6y4nnKfuf5mHdEyWCEGMywNPsVO2Dvf8w7RmV+Do/HzE0479lK/JqFA 12 | OxeS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XgQvWQpQJR0QeOL74Jx+DqLRNcmzIyMHYjshjGr6xH8x87TGrjJLWloyXdeqq1ui 29 | z3X9jZPcfrQT+Cy1/6uVzGukP8mTuBC2wbPZ0Bo2bY9MpfBVhNUqG1Z3n+KOSEEq 30 | 0kdGpg1re8SWwNRr4kjZOc2+7sKobeZ+sOVTCiWwGq8ixlaD1L93srKj4NxQrpDy 31 | B3oXJUJwXydABwp5U6o4Q1wO 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/hub_server_cacert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFdjCCA16gAwIBAgIJAIl8NQS3mbtGMA0GCSqGSIb3DQEBCwUAMHAxFDASBgNV 3 | BAMMC2h1YnNlcnZlcmNhMQswCQYDVQQGEwJVUzENMAsGA1UECAwET2hpbzERMA8G 4 | A1UEBwwIQ29sdW1idXMxFjAUBgNVBAoMDUh1YiBTZXJ2ZXIgQ0ExETAPBgNVBAsM 5 | CFBheW1lbnRzMB4XDTIwMDQwNzIwMjA0MloXDTQ3MDgyNDIwMjA0MlowcDEUMBIG 6 | A1UEAwwLaHVic2VydmVyY2ExCzAJBgNVBAYTAlVTMQ0wCwYDVQQIDARPaGlvMREw 7 | DwYDVQQHDAhDb2x1bWJ1czEWMBQGA1UECgwNSHViIFNlcnZlciBDQTERMA8GA1UE 8 | CwwIUGF5bWVudHMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCk2scZ 9 | n0PznJdCjD7qu/jeGv8LsKVFufwouxVxw90W/xYPxwsPKp2yr0uBLLV2PgOlefO0 10 | InCd68fxLfIRF6jS1ai2YGg0mquufZ9Lr6jjC+nLuFFu107EBNizo+3WLgefvY/x 11 | p3mMNzi2jgWTKGebA0InqGYPuR+O+ca49hc0nsaCtDFfLGL5fA0Y111RM0aPDMkY 12 | SWnxE4NBAw78xQUehT5TteNEClM0RLao/qz2B5QrCrIhB1IMHgDbhbRRK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xw6EiteM4uYmQn9l/Wsd3NEVZ 29 | Ds7RFZrYWcPPHw0uaPIL5KQE6w2JgS+fraduc6kvBFgVfZIxJ97anVp6WzwLISbv 30 | aQyfltKvLrsSsrAmNDlWscKfJbgVt64ZbF1kVTeHNTgR1I0X8vf4v5CQm18X+D2C 31 | /q24z8GZ2Wwxxw== 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /simulator2/secrets/tls/openssl.conf: -------------------------------------------------------------------------------- 1 | [ req ] 2 | distinguished_name = req_distinguished_name 3 | extensions = v3_ca 4 | req_extensions = v3_ca 5 | [ v3_ca ] 6 | basicConstraints = critical,CA:TRUE 7 | [ v3_req ] 8 | basicConstraints = CA:FALSE 9 | extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection 10 | [ req_distinguished_name ] 11 | countryName = US 12 | countryName_default = KR 13 | countryName_min = 2 14 | countryName_max = 2 15 | organizationName = User DFSP CA 16 | organizationName_default = User DFSP CA -------------------------------------------------------------------------------- /simulator2/sim-backend.env: -------------------------------------------------------------------------------- 1 | # Enable mutual TLS authentication. Useful when the simulator is not running in a Mojaloop 2 | # environment, i.e. when you're running it locally against your own implementation. 3 | MUTUAL_TLS_ENABLED=false 4 | 5 | # Enable server-only TLS; i.e. serve on HTTPS instead of HTTP. 6 | HTTPS_ENABLED=false 7 | 8 | # Location of certs and key required for TLS 9 | CA_CERT_PATH=./secrets/cacert.pem 10 | SERVER_CERT_PATH=./secrets/servercert.pem 11 | SERVER_KEY_PATH=./secrets/serverkey.pem 12 | 13 | # The number of space characters by which to indent pretty-printed logs. If set to zero, log events 14 | # will each be printed on a single line. 15 | LOG_INDENT=0 16 | 17 | # The name of the sqlite log file. This probably doesn't matter much to the user, except that 18 | # setting :memory: will use an in-memory sqlite db, which will be faster and not consume disk 19 | # space. However, it will also mean that the logs will be lost once the container is stopped. 20 | SQLITE_LOG_FILE=:memory: 21 | 22 | # The DFSPID of this simulator. The simulator will accept any requests routed to 23 | # FSPIOP-Destination: $DFSP_ID. Other requests will be rejected. 24 | DFSP_ID=userdfsp2 25 | 26 | # The name of the sqlite model database. If you would like to start the simulator with preloaded 27 | # state you can use a preexisting file. If running in a container, you can mount a sqlite file as a 28 | # volume in the container to preserve state between runs. 29 | # Use MODEL_DATABASE=:memory: for an ephemeral in-memory database 30 | MODEL_DATABASE=./model.sqlite 31 | 32 | # Outbound API endpoint (It might be a container in the compose file so remember the networking IP) 33 | OUTBOUND_ENDPOINT=http://scheme-adapter2:4001 34 | 35 | # The simulator can automatically add fees when generating quote responses. Use this 36 | # variable to control the fee amounts added. e.g. for a transfer of 100 USD a FEE_MULTIPLIER of 0.1 37 | # reuslts in fees of USD 10 being applied to the quote response 38 | FEE_MULTIPLIER=0.05 39 | 40 | # Specifies the location of a rules file for the simulator backend. Rules can be used to produce 41 | # specific simulator behaviours in response to incoming requests that match certain conditions. 42 | # e.g. a rule can be used to trigger NDC errors given transfers between certain limits. 43 | 44 | RULES_FILE=./rules.json 45 | -------------------------------------------------------------------------------- /spec_files/api_definitions/central_admin_1.0/response_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "/health": { 3 | "get": { 4 | "response": {} 5 | } 6 | }, 7 | "/metrics": { 8 | "get": { 9 | "response": {} 10 | } 11 | }, 12 | "/participants": { 13 | "get": { 14 | "response": {} 15 | }, 16 | "post": { 17 | "response": {} 18 | } 19 | }, 20 | "/participants/limits": { 21 | "get": { 22 | "response": {} 23 | } 24 | }, 25 | "/participants/{name}": { 26 | "get": { 27 | "response": {} 28 | }, 29 | "put": { 30 | "response": {} 31 | } 32 | }, 33 | "/participants/{name}/endpoints": { 34 | "get": { 35 | "response": {} 36 | }, 37 | "post": { 38 | "response": {} 39 | } 40 | }, 41 | "/participants/{name}/limits": { 42 | "get": { 43 | "response": {} 44 | }, 45 | "put": { 46 | "response": {} 47 | } 48 | }, 49 | "/participants/{name}/positions": { 50 | "get": { 51 | "response": {} 52 | } 53 | }, 54 | "/participants/{name}/accounts": { 55 | "get": { 56 | "response": {} 57 | }, 58 | "post": { 59 | "response": {} 60 | } 61 | }, 62 | "/participants/{name}/initialPositionAndLimits": { 63 | "post": { 64 | "response": {} 65 | } 66 | }, 67 | "/participants/{name}/accounts/{id}": { 68 | "put": { 69 | "response": {} 70 | }, 71 | "post": { 72 | "response": {} 73 | } 74 | }, 75 | "/participants/{name}/accounts/{id}/transfers/{transferId}": { 76 | "put": { 77 | "response": {} 78 | } 79 | }, 80 | "/settlementModels": { 81 | "get": { 82 | "response": {} 83 | }, 84 | "post": { 85 | "response": {} 86 | } 87 | }, 88 | "/settlementModels/{name}": { 89 | "get": { 90 | "response": {} 91 | }, 92 | "put": { 93 | "response": {} 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /spec_files/api_definitions/central_admin_old_9.3/response_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "/health": { 3 | "get": { 4 | "response": {} 5 | } 6 | }, 7 | "/metrics": { 8 | "get": { 9 | "response": {} 10 | } 11 | }, 12 | "/participants": { 13 | "get": { 14 | "response": {} 15 | }, 16 | "post": { 17 | "response": {} 18 | } 19 | }, 20 | "/participants/limits": { 21 | "get": { 22 | "response": {} 23 | } 24 | }, 25 | "/participants/{name}": { 26 | "get": { 27 | "response": {} 28 | }, 29 | "put": { 30 | "response": {} 31 | } 32 | }, 33 | "/participants/{name}/endpoints": { 34 | "get": { 35 | "response": {} 36 | }, 37 | "post": { 38 | "response": {} 39 | } 40 | }, 41 | "/participants/{name}/limits": { 42 | "get": { 43 | "response": {} 44 | }, 45 | "put": { 46 | "response": {} 47 | } 48 | }, 49 | "/participants/{name}/positions": { 50 | "get": { 51 | "response": {} 52 | } 53 | }, 54 | "/participants/{name}/accounts": { 55 | "get": { 56 | "response": {} 57 | }, 58 | "post": { 59 | "response": {} 60 | } 61 | }, 62 | "/participants/{name}/initialPositionAndLimits": { 63 | "post": { 64 | "response": {} 65 | } 66 | }, 67 | "/participants/{name}/accounts/{id}": { 68 | "put": { 69 | "response": {} 70 | }, 71 | "post": { 72 | "response": {} 73 | } 74 | }, 75 | "/participants/{name}/accounts/{id}/transfers/{transferId}": { 76 | "put": { 77 | "response": {} 78 | } 79 | }, 80 | "/settlementModels": { 81 | "get": { 82 | "response": {} 83 | }, 84 | "post": { 85 | "response": {} 86 | } 87 | }, 88 | "/settlementModels/{name}": { 89 | "get": { 90 | "response": {} 91 | }, 92 | "put": { 93 | "response": {} 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /spec_files/api_definitions/fspiop_1.0/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "party.personalInfo.complexName.firstName", 4 | "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" 5 | }, 6 | { 7 | "id": "party.personalInfo.complexName.middleName", 8 | "pattern": "G|P|N|S" 9 | }, 10 | { 11 | "id": "party.personalInfo.complexName.lastName", 12 | "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" 13 | }, 14 | { 15 | "id": "party.personalInfo.dateOfBirth", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "transferId", 20 | "faker": "internet.email" 21 | }, 22 | { 23 | "id": "transferState", 24 | "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" 25 | }, 26 | { 27 | "id": "fulfilment", 28 | "pattern": "[A-Fa-f0-9]{64}" 29 | }, 30 | { 31 | "id": "condition", 32 | "pattern": "[A-Fa-f0-9]{64}" 33 | }, 34 | { 35 | "id": "ilpPacket", 36 | "pattern": "[A-Fa-f0-9]{256}" 37 | }, 38 | { 39 | "id": "transferAmount.currency", 40 | "pattern": "USD" 41 | }, 42 | { 43 | "id": "transferAmount.amount", 44 | "pattern": "123" 45 | }, 46 | { 47 | "id": "payeeReceiveAmount.currency", 48 | "pattern": "USD" 49 | }, 50 | { 51 | "id": "payeeReceiveAmount.amount", 52 | "pattern": "123" 53 | }, 54 | { 55 | "id": "payeeFspFee.currency", 56 | "pattern": "USD" 57 | }, 58 | { 59 | "id": "payeeFspFee.amount", 60 | "pattern": "2" 61 | }, 62 | { 63 | "id": "payeeFspCommission.currency", 64 | "pattern": "USD" 65 | }, 66 | { 67 | "id": "payeeFspCommission.amount", 68 | "pattern": "3" 69 | }, 70 | 71 | { 72 | "id": "errorInformation.errorCode", 73 | "pattern": "600[1-9]" 74 | }, 75 | { 76 | "id": "errorInformation.errorDescription", 77 | "pattern": "This is a mock error description" 78 | } 79 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/fspiop_1.1/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "party.personalInfo.complexName.firstName", 4 | "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" 5 | }, 6 | { 7 | "id": "party.personalInfo.complexName.middleName", 8 | "pattern": "G|P|N|S" 9 | }, 10 | { 11 | "id": "party.personalInfo.complexName.lastName", 12 | "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" 13 | }, 14 | { 15 | "id": "party.personalInfo.dateOfBirth", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "transferId", 20 | "faker": "internet.email" 21 | }, 22 | { 23 | "id": "transferState", 24 | "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" 25 | }, 26 | { 27 | "id": "fulfilment", 28 | "pattern": "[A-Fa-f0-9]{64}" 29 | }, 30 | { 31 | "id": "condition", 32 | "pattern": "[A-Fa-f0-9]{64}" 33 | }, 34 | { 35 | "id": "ilpPacket", 36 | "pattern": "[A-Fa-f0-9]{256}" 37 | }, 38 | { 39 | "id": "transferAmount.currency", 40 | "pattern": "USD" 41 | }, 42 | { 43 | "id": "transferAmount.amount", 44 | "pattern": "123" 45 | }, 46 | { 47 | "id": "payeeReceiveAmount.currency", 48 | "pattern": "USD" 49 | }, 50 | { 51 | "id": "payeeReceiveAmount.amount", 52 | "pattern": "123" 53 | }, 54 | { 55 | "id": "payeeFspFee.currency", 56 | "pattern": "USD" 57 | }, 58 | { 59 | "id": "payeeFspFee.amount", 60 | "pattern": "2" 61 | }, 62 | { 63 | "id": "payeeFspCommission.currency", 64 | "pattern": "USD" 65 | }, 66 | { 67 | "id": "payeeFspCommission.amount", 68 | "pattern": "3" 69 | }, 70 | 71 | { 72 | "id": "errorInformation.errorCode", 73 | "pattern": "600[1-9]" 74 | }, 75 | { 76 | "id": "errorInformation.errorDescription", 77 | "pattern": "This is a mock error description" 78 | } 79 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/fspiop_2.0/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "party.personalInfo.complexName.firstName", 4 | "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" 5 | }, 6 | { 7 | "id": "party.personalInfo.complexName.middleName", 8 | "pattern": "G|P|N|S" 9 | }, 10 | { 11 | "id": "party.personalInfo.complexName.lastName", 12 | "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" 13 | }, 14 | { 15 | "id": "party.personalInfo.dateOfBirth", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "transferId", 20 | "faker": "internet.email" 21 | }, 22 | { 23 | "id": "transferState", 24 | "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" 25 | }, 26 | { 27 | "id": "fulfilment", 28 | "pattern": "[A-Fa-f0-9]{64}" 29 | }, 30 | { 31 | "id": "condition", 32 | "pattern": "[A-Fa-f0-9]{64}" 33 | }, 34 | { 35 | "id": "ilpPacket", 36 | "pattern": "[A-Fa-f0-9]{256}" 37 | }, 38 | { 39 | "id": "transferAmount.currency", 40 | "pattern": "USD" 41 | }, 42 | { 43 | "id": "transferAmount.amount", 44 | "pattern": "123" 45 | }, 46 | { 47 | "id": "payeeReceiveAmount.currency", 48 | "pattern": "USD" 49 | }, 50 | { 51 | "id": "payeeReceiveAmount.amount", 52 | "pattern": "123" 53 | }, 54 | { 55 | "id": "payeeFspFee.currency", 56 | "pattern": "USD" 57 | }, 58 | { 59 | "id": "payeeFspFee.amount", 60 | "pattern": "2" 61 | }, 62 | { 63 | "id": "payeeFspCommission.currency", 64 | "pattern": "USD" 65 | }, 66 | { 67 | "id": "payeeFspCommission.amount", 68 | "pattern": "3" 69 | }, 70 | 71 | { 72 | "id": "errorInformation.errorCode", 73 | "pattern": "600[1-9]" 74 | }, 75 | { 76 | "id": "errorInformation.errorDescription", 77 | "pattern": "This is a mock error description" 78 | } 79 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "Rpt.UpdtdPtyAndAcctId.Pty.Nm", 4 | "pattern": "John G Smith|David P Jones|Michael N Johnson|Chris S Lee|Mike G Brown|Mark P Williams|Paul N Rodriguez|Daniel S Gonzalez|James G Lopez|Maria P Lopez" 5 | }, 6 | { 7 | "id": "Rpt.UpdtdPtyAndAcctId.Pty.Id.PrvtId.DtAndPlcOfBirth.BirthDt", 8 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 9 | }, 10 | { 11 | "id": "CdtTrfTxInf.PmtId.EndToEndId", 12 | "pattern": "^([0-7][0-9A-HJKMNP-TV-Z]{25})$" 13 | }, 14 | { 15 | "id": "TxInfAndSts.TxSts", 16 | "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" 17 | }, 18 | { 19 | "id": "TxInfAndSts.ExctnConf", 20 | "pattern": "[A-Fa-f0-9]{64}" 21 | }, 22 | { 23 | "id": "CdtTrfTxInf.VrfctnOfTerms.IlpV4PrepPacket", 24 | "pattern": "[A-Fa-f0-9]{256}" 25 | }, 26 | { 27 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.Ccy", 28 | "pattern": "USD" 29 | }, 30 | { 31 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount", 32 | "pattern": "123" 33 | }, 34 | { 35 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.Ccy", 36 | "pattern": "USD" 37 | }, 38 | { 39 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount", 40 | "pattern": "123" 41 | }, 42 | { 43 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.ChrgsInf.Amt.Ccy", 44 | "pattern": "USD" 45 | }, 46 | { 47 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.ChrgsInf.Amt.ActiveOrHistoricCurrencyAndAmount", 48 | "pattern": "2" 49 | }, 50 | { 51 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.ChrgsInf.Amt.Ccy", 52 | "pattern": "USD" 53 | }, 54 | { 55 | "id": "CdtTrfTxInf.IntrBkSttlmAmt.ChrgsInf.Amt.ActiveOrHistoricCurrencyAndAmount", 56 | "pattern": "3" 57 | }, 58 | { 59 | "id": "TxInfAndSts.TxSts", 60 | "pattern": "600[1-9]" 61 | }, 62 | { 63 | "id": "TxInfAndSts.StsRsnInf.AddtInf", 64 | "pattern": "This is a mock error description" 65 | } 66 | ] 67 | -------------------------------------------------------------------------------- /spec_files/api_definitions/fx-api_2.0/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "party.personalInfo.complexName.firstName", 4 | "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" 5 | }, 6 | { 7 | "id": "party.personalInfo.complexName.middleName", 8 | "pattern": "G|P|N|S" 9 | }, 10 | { 11 | "id": "party.personalInfo.complexName.lastName", 12 | "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" 13 | }, 14 | { 15 | "id": "party.personalInfo.dateOfBirth", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "transferId", 20 | "faker": "internet.email" 21 | }, 22 | { 23 | "id": "transferState", 24 | "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" 25 | }, 26 | { 27 | "id": "conversionState", 28 | "pattern": "RECEIVED|PENDING|COMPLETED|REJECTED" 29 | }, 30 | { 31 | "id": "fulfilment", 32 | "pattern": "[A-Fa-f0-9]{64}" 33 | }, 34 | { 35 | "id": "condition", 36 | "pattern": "[A-Fa-f0-9]{64}" 37 | }, 38 | { 39 | "id": "ilpPacket", 40 | "pattern": "[A-Fa-f0-9]{256}" 41 | }, 42 | { 43 | "id": "transferAmount.currency", 44 | "pattern": "USD" 45 | }, 46 | { 47 | "id": "transferAmount.amount", 48 | "pattern": "123" 49 | }, 50 | { 51 | "id": "payeeReceiveAmount.currency", 52 | "pattern": "USD" 53 | }, 54 | { 55 | "id": "payeeReceiveAmount.amount", 56 | "pattern": "123" 57 | }, 58 | { 59 | "id": "payeeFspFee.currency", 60 | "pattern": "USD" 61 | }, 62 | { 63 | "id": "payeeFspFee.amount", 64 | "pattern": "2" 65 | }, 66 | { 67 | "id": "payeeFspCommission.currency", 68 | "pattern": "USD" 69 | }, 70 | { 71 | "id": "payeeFspCommission.amount", 72 | "pattern": "3" 73 | }, 74 | 75 | { 76 | "id": "errorInformation.errorCode", 77 | "pattern": "600[1-9]" 78 | }, 79 | { 80 | "id": "errorInformation.errorDescription", 81 | "pattern": "This is a mock error description" 82 | } 83 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "party.personalInfo.dateOfBirth", 4 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 5 | }, 6 | { 7 | "id": "party.name", 8 | "pattern": "Vijay Kumar Guthi" 9 | }, 10 | { 11 | "id": "party.personalInfo.complexName.firstName", 12 | "pattern": "Vijay" 13 | }, 14 | { 15 | "id": "party.personalInfo.complexName.lastName", 16 | "pattern": "Kumar" 17 | }, 18 | { 19 | "id": "party.personalInfo.complexName.middleName", 20 | "pattern": "Guthi" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "/parties/{Type}/{ID}": { 3 | "get": { 4 | "response": { 5 | "bodyOverride": { 6 | "party": { 7 | "partyIdInfo": { 8 | "partyIdType": "{$request.params.Type}", 9 | "partyIdentifier": "{$request.params.ID}", 10 | "fspId": "ttk", 11 | "partySubIdOrType": null, 12 | "extensionList": null 13 | }, 14 | "accounts": null, 15 | "merchantClassificationCode": null 16 | } 17 | } 18 | } 19 | } 20 | }, 21 | "/transfers": { 22 | "post": { 23 | "response": { 24 | "bodyOverride": {} 25 | } 26 | } 27 | }, 28 | "/transfers/{transferId}": { 29 | "put": { 30 | "response": { 31 | "bodyOverride": {} 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "firstName", 4 | "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" 5 | }, 6 | { 7 | "id": "middleName", 8 | "pattern": "G|P|N|S" 9 | }, 10 | { 11 | "id": "lastName", 12 | "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" 13 | }, 14 | { 15 | "id": "dateOfBirth", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "transferState", 20 | "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" 21 | }, 22 | { 23 | "id": "fulfilment", 24 | "pattern": "[A-Fa-f0-9]{64}" 25 | }, 26 | { 27 | "id": "condition", 28 | "pattern": "[A-Fa-f0-9]{64}" 29 | }, 30 | { 31 | "id": "ilpPacket", 32 | "pattern": "[A-Fa-f0-9]{256}" 33 | }, 34 | { 35 | "id": "transferAmount.currency", 36 | "pattern": "USD" 37 | }, 38 | { 39 | "id": "transferAmount.amount", 40 | "pattern": "123" 41 | }, 42 | { 43 | "id": "payeeReceiveAmountCurrency", 44 | "pattern": "USD" 45 | }, 46 | { 47 | "id": "payeeReceiveAmount", 48 | "pattern": "123" 49 | }, 50 | { 51 | "id": "payeeFspFeeAmountCurrency", 52 | "pattern": "USD" 53 | }, 54 | { 55 | "id": "payeeFspFeeAmount", 56 | "pattern": "2" 57 | }, 58 | { 59 | "id": "payeeFspCommissionAmountCurrency", 60 | "pattern": "USD" 61 | }, 62 | { 63 | "id": "payeeFspCommissionAmount", 64 | "pattern": "3" 65 | }, 66 | 67 | { 68 | "id": "errorInformation.errorCode", 69 | "pattern": "600[1-9]" 70 | }, 71 | { 72 | "id": "errorInformation.errorDescription", 73 | "pattern": "This is a mock error description" 74 | } 75 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "/parties/{idType}/{idValue}": { 3 | "get": { 4 | "response": { 5 | "bodyOverride": { 6 | "idType": "{$request.params.idType}", 7 | "idValue": "{$request.params.idValue}", 8 | "merchantClassificationCode": null 9 | } 10 | } 11 | } 12 | }, 13 | "/quoterequests": { 14 | "post": { 15 | "response": { 16 | "bodyOverride": { 17 | "quoteId": "{$request.body.quoteId}", 18 | "transactionId": "{$request.body.transactionId}", 19 | "transferAmount": "{$request.body.amount}", 20 | "transferAmountCurrency": "{$request.body.currency}", 21 | "expiration": "{$request.body.expiration}", 22 | "geoCode": null, 23 | "extensionList": null 24 | } 25 | } 26 | } 27 | }, 28 | "/transfers": { 29 | "post": { 30 | "response": { 31 | "bodyOverride": { 32 | "homeTransactionId": "{$request.body.transferId}" 33 | } 34 | } 35 | } 36 | }, 37 | "/bulkQuotes": { 38 | "post": { 39 | "response": { 40 | "bodyOverride": { 41 | "bulkQuoteId": "{$request.body.bulkQuoteId}" 42 | } 43 | } 44 | } 45 | }, 46 | "/bulkTransfers": { 47 | "post": { 48 | "response": { 49 | "bodyOverride": { 50 | "bulkTransferId": "{$request.body.bulkTransferId}" 51 | } 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /spec_files/api_definitions/settlements_1.0/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "changedDate", 4 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 5 | }, 6 | { 7 | "id": "createdDate", 8 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 9 | }, 10 | { 11 | "id": "state", 12 | "pattern": "OPEN|CLOSED" 13 | }, 14 | { 15 | "id": "settlementWindows.items.items.createdDate", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "settlementWindows.items.items.changedDate", 20 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 21 | }, 22 | { 23 | "id": "settlementWindows.items.items.state", 24 | "pattern": "OPEN|CLOSED" 25 | }, 26 | { 27 | "id": "participants.items.accounts.items.state", 28 | "pattern": "OPEN|CLOSED" 29 | }, 30 | { 31 | "id": "participants.items.accounts.items.netSettlementAmount.amount", 32 | "pattern": "123" 33 | }, 34 | { 35 | "id": "participants.items.accounts.items.netSettlementAmount.currency", 36 | "pattern": "USD" 37 | } 38 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/settlements_1.0/response_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "/settlementWindows/{id}": { 3 | "post": { 4 | "response": { 5 | "bodyOverride": { 6 | "id": "{$request.params.id}", 7 | "reason": "{$request.body.reason}" 8 | } 9 | } 10 | } 11 | }, 12 | "/settlementWindows": { 13 | "get": { 14 | "response": {} 15 | } 16 | }, 17 | "/settlements": { 18 | "post": { 19 | "response": { 20 | "bodyOverride": { 21 | } 22 | } 23 | } 24 | }, 25 | "/settlements/{id}": { 26 | "get": { 27 | "response": { 28 | "bodyOverride": { 29 | "id": "{$request.params.id}" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /spec_files/api_definitions/settlements_2.0/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "changedDate", 4 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 5 | }, 6 | { 7 | "id": "createdDate", 8 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 9 | }, 10 | { 11 | "id": "state", 12 | "pattern": "OPEN|CLOSED" 13 | }, 14 | { 15 | "id": "settlementWindows.items.items.createdDate", 16 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 17 | }, 18 | { 19 | "id": "settlementWindows.items.items.changedDate", 20 | "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" 21 | }, 22 | { 23 | "id": "settlementWindows.items.items.state", 24 | "pattern": "OPEN|CLOSED" 25 | }, 26 | { 27 | "id": "participants.items.accounts.items.state", 28 | "pattern": "OPEN|CLOSED" 29 | }, 30 | { 31 | "id": "participants.items.accounts.items.netSettlementAmount.amount", 32 | "pattern": "123" 33 | }, 34 | { 35 | "id": "participants.items.accounts.items.netSettlementAmount.currency", 36 | "pattern": "USD" 37 | } 38 | ] -------------------------------------------------------------------------------- /spec_files/api_definitions/settlements_2.0/response_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "/settlementWindows/{id}": { 3 | "post": { 4 | "response": { 5 | "bodyOverride": { 6 | "id": "{$request.params.id}", 7 | "reason": "{$request.body.reason}" 8 | } 9 | } 10 | } 11 | }, 12 | "/settlementWindows": { 13 | "get": { 14 | "response": {} 15 | } 16 | }, 17 | "/settlements": { 18 | "post": { 19 | "response": { 20 | "bodyOverride": { 21 | } 22 | } 23 | } 24 | }, 25 | "/settlements/{id}": { 26 | "get": { 27 | "response": { 28 | "bodyOverride": { 29 | "id": "{$request.params.id}" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /spec_files/rules_callback/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeRulesFile": "default.json" 3 | } -------------------------------------------------------------------------------- /spec_files/rules_forward/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeRulesFile": "default.json" 3 | } -------------------------------------------------------------------------------- /spec_files/rules_response/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeRulesFile": "default.json" 3 | } -------------------------------------------------------------------------------- /spec_files/rules_validation/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeRulesFile": "default.json" 3 | } -------------------------------------------------------------------------------- /spec_files/rules_validation/default.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /spec_files/rules_validation/p2p-limit.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ruleId": 1, 4 | "priority": 1, 5 | "description": "post /quotes", 6 | "apiVersion": { 7 | "minorVersion": 0, 8 | "majorVersion": 1, 9 | "type": "fspiop", 10 | "asynchronous": true 11 | }, 12 | "conditions": { 13 | "all": [ 14 | { 15 | "fact": "body", 16 | "operator": "numericGreaterThan", 17 | "value": "{$environment.ttkAllowedAmount}", 18 | "path": "amount.amount" 19 | }, 20 | { 21 | "fact": "body", 22 | "operator": "equal", 23 | "value": "testingtoolkitdfsp", 24 | "path": "payee.partyIdInfo.fspId" 25 | }, 26 | { 27 | "fact": "operationPath", 28 | "operator": "equal", 29 | "value": "/quotes" 30 | }, 31 | { 32 | "fact": "method", 33 | "operator": "equal", 34 | "value": "post" 35 | } 36 | ] 37 | }, 38 | "event": { 39 | "method": "put", 40 | "path": "/quotes/{ID}/error", 41 | "params": { 42 | "body": { 43 | "errorInformation": { 44 | "errorCode": "5100", 45 | "errorDescription": "The total allowed amount for the dfsp has been reached" 46 | } 47 | }, 48 | "scripts": {} 49 | }, 50 | "type": "MOCK_ERROR_CALLBACK" 51 | }, 52 | "type": "validation", 53 | "version": 1 54 | } 55 | ] -------------------------------------------------------------------------------- /src/lib/MyEventEmitter.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const EventEmitter = require('events') 31 | class MyEmitter extends EventEmitter {} 32 | const emitters = { 33 | data: { 34 | testOutbound: null, 35 | assertionRequest: null, 36 | assertionCallback: null, 37 | inboundRequest: null 38 | } 39 | } 40 | 41 | const getEmitter = (emitter, user) => { 42 | const context = user ? user.dfspId : 'data' 43 | if (!emitters[context]) { 44 | emitters[context] = {} 45 | } 46 | if (!emitters[context][emitter]) { 47 | emitters[context][emitter] = new MyEmitter() 48 | } 49 | return emitters[context][emitter] 50 | } 51 | 52 | module.exports = { 53 | getEmitter 54 | } 55 | -------------------------------------------------------------------------------- /src/lib/api-routes/keycloak.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki 27 | * Vijaya Kumar Guthi (Original Author) 28 | -------------- 29 | ******/ 30 | 31 | const express = require('express') 32 | const router = new express.Router() 33 | const KeycloakHelper = require('../oauth/KeycloakHelper') 34 | 35 | router.get('/clientinfo', async (req, res, next) => { 36 | try { 37 | const response = await KeycloakHelper.getClientAuthInfo(req.user) 38 | res.status(200).json(response) 39 | } catch (err) { 40 | console.log(err) 41 | res.status(500).json({ error: err && err.message }) 42 | } 43 | }) 44 | 45 | router.post('/tokeninfo', async (req, res, next) => { 46 | try { 47 | const response = await KeycloakHelper.getTokenInfo(req.body) 48 | res.status(200).json(response) 49 | } catch (err) { 50 | res.status(500).json({ error: err && err.message }) 51 | } 52 | }) 53 | 54 | module.exports = router 55 | -------------------------------------------------------------------------------- /src/lib/api-routes/objectstore.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const express = require('express') 31 | const router = new express.Router() 32 | const objectStore = require('../objectStore') 33 | 34 | // Get runtime and stored user config 35 | router.get('/:object', async (req, res, next) => { 36 | try { 37 | const object = objectStore.get(req.params.object, undefined, req.user) 38 | res.status(200).json(object) 39 | } catch (err) { 40 | res.status(500).json({ error: err && err.message }) 41 | } 42 | }) 43 | 44 | router.delete('/:object', async (req, res, next) => { 45 | try { 46 | objectStore.set(req.params.object, {}, req.user) 47 | res.status(200).json({}) 48 | } catch (err) { 49 | res.status(500).json({ error: err && err.message }) 50 | } 51 | }) 52 | 53 | module.exports = router 54 | -------------------------------------------------------------------------------- /src/lib/api-routes/server-logs.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Steven Oderayi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const express = require('express') 31 | const router = new express.Router() 32 | const serverLogs = require('../server-logs') 33 | 34 | router.get('/search', async (req, res, next) => { 35 | try { 36 | let results = [] 37 | if (Object.keys(req.query).length) results = await serverLogs.search({ query: req.query }) 38 | res.status(200).send(results) 39 | } catch (err) { 40 | res.status(500).json({ error: err && err.message }) 41 | } 42 | }) 43 | 44 | module.exports = router 45 | -------------------------------------------------------------------------------- /src/lib/db/dfspMockUsers.js: -------------------------------------------------------------------------------- 1 | const Config = require('../config') 2 | const { keycloakAuth, getKeyCloakUsers } = require('../oauth/KeycloakHelper') 3 | 4 | const tempDfspList = [ 5 | { 6 | id: 'userdfsp', 7 | name: 'User DFSP' 8 | }, 9 | { 10 | id: 'userdfsp1', 11 | name: 'User DFSP 1' 12 | }, 13 | { 14 | id: 'userdfsp2', 15 | name: 'User DFSP 2' 16 | } 17 | ] 18 | 19 | const getDFSPList = async (defaultTestingToolkitFspId) => { 20 | const userConfig = await Config.getUserConfig({ 21 | dfspId: defaultTestingToolkitFspId 22 | }) 23 | const systemConfig = Config.getSystemConfig() 24 | let users = [] 25 | if (systemConfig.HOSTING_ENABLED) { 26 | if (systemConfig.KEYCLOAK.ENABLED) { 27 | const keycloakToken = await keycloakAuth() 28 | users = await getKeyCloakUsers(keycloakToken) 29 | } else { 30 | users = tempDfspList 31 | } 32 | } else if (userConfig.HUB_ONLY_MODE) { 33 | const dfsps = Object.keys(userConfig.ENDPOINTS_DFSP_WISE.dfsps || {}) 34 | if (dfsps.length > 0) { 35 | dfsps.forEach(dfspId => { 36 | users.push({ 37 | id: dfspId, 38 | name: dfspId 39 | }) 40 | }) 41 | } 42 | } 43 | if (users.length === 0) { 44 | users.push({ 45 | id: userConfig.DEFAULT_USER_FSPID, 46 | name: 'User DFSP' 47 | }) 48 | } 49 | return users 50 | } 51 | 52 | const checkDFSP = async (dfspId) => { 53 | const dfspFound = (await getDFSPList()).find(item => item.id === dfspId) 54 | if (dfspFound) { 55 | return true 56 | } else { 57 | return false 58 | } 59 | } 60 | 61 | module.exports = { 62 | getDFSPList, 63 | checkDFSP 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/db/models/mongoDBWrapper.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | 'use strict' 31 | 32 | const mongoose = require('mongoose') 33 | 34 | const Schema = mongoose.Schema 35 | 36 | const models = { 37 | common: new Schema({ 38 | _id: String, 39 | data: { type: Schema.Types.Mixed } 40 | }), 41 | logs: new Schema({ 42 | _id: mongoose.Types.ObjectId, 43 | uniqueId: { 44 | type: String, 45 | required: false 46 | }, 47 | traceID: { 48 | type: String, 49 | required: false 50 | }, 51 | resource: Object, 52 | messageType: String, 53 | notificationType: String, 54 | verbosity: String, 55 | message: String, 56 | additionalData: Schema.Types.Mixed, 57 | logTime: Date 58 | }, { _id: false }), 59 | reports: new Schema({ 60 | _id: String, 61 | name: String, 62 | inputValues: Object, 63 | test_cases: [], 64 | runtimeInformation: Object 65 | }).index({ 'runtimeInformation.completedTime': -1, 'runtimeInformation.isPassed': 1 }) 66 | } 67 | 68 | /* istanbul ignore next */ 69 | process.on('SIGINT', async () => { 70 | await mongoose.connection.close() 71 | process.exit(0) 72 | }) 73 | 74 | module.exports = { 75 | models, 76 | connect: mongoose.connect, 77 | Types: mongoose.Types 78 | } 79 | -------------------------------------------------------------------------------- /src/lib/fileAdapter.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | 'use strict' 31 | 32 | const utils = require('./utils') 33 | 34 | const read = async (filename) => { 35 | const data = await utils.readFileAsync(filename) 36 | return JSON.parse(data) 37 | } 38 | 39 | const readDir = async (filename) => { 40 | const data = await utils.readDirAsync(filename) 41 | return data 42 | } 43 | 44 | const upsert = async (filename, data) => { 45 | await utils.writeFileAsync(filename, JSON.stringify(data, null, 2)) 46 | } 47 | 48 | const remove = async (filename) => { 49 | await utils.deleteFileAsync(filename) 50 | } 51 | 52 | module.exports = { 53 | read, 54 | readDir, 55 | upsert, 56 | remove 57 | } 58 | -------------------------------------------------------------------------------- /src/lib/logger.js: -------------------------------------------------------------------------------- 1 | const { loggerFactory, LOG_LEVELS } = require('@mojaloop/sdk-standard-components').Logger 2 | const { hostname } = require('node:os') 3 | 4 | const createLogger = (conf = {}) => { 5 | const { 6 | context = { 7 | hostname: hostname() 8 | }, 9 | isJsonOutput = false 10 | } = conf 11 | 12 | return loggerFactory({ context, isJsonOutput }) 13 | } 14 | 15 | const logger = createLogger() // global logger 16 | 17 | module.exports = { 18 | logger, 19 | LOG_LEVELS 20 | } 21 | -------------------------------------------------------------------------------- /src/lib/longpollingEmitter.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const MyEventEmitter = require('./MyEventEmitter') 31 | const objectStore = require('./objectStore') 32 | 33 | const LONGPOLLING_TIMEOUT = 5000 34 | 35 | const setAssertionStoreEmitter = (storedObject, eventPath, res, user) => { 36 | let emitterType 37 | switch (storedObject) { 38 | case 'requests': emitterType = 'assertionRequest'; break 39 | case 'callbacks': emitterType = 'assertionCallback'; break 40 | } 41 | const emitter = MyEventEmitter.getEmitter(emitterType, user) 42 | const timer = setTimeout(() => { 43 | emitter.removeAllListeners(eventPath) 44 | res.status(500).json({ error: 'Timed out' }) 45 | }, LONGPOLLING_TIMEOUT) 46 | 47 | emitter.once(eventPath, (data) => { 48 | clearTimeout(timer) 49 | objectStore.popObject(storedObject, eventPath, user) 50 | res.status(200).json(data) 51 | }) 52 | } 53 | 54 | module.exports = { 55 | setAssertionStoreEmitter 56 | } 57 | -------------------------------------------------------------------------------- /src/lib/metrics.js: -------------------------------------------------------------------------------- 1 | const Metrics = require('@mojaloop/central-services-metrics') 2 | 3 | module.exports = function metricsMiddleware (config = {}) { 4 | Metrics.getDefaultRegister().clear() 5 | Metrics.setup({ 6 | timeout: 5000, 7 | defaultLabels: {}, 8 | ...config 9 | }) 10 | 11 | const client = Metrics.getClient() 12 | const assertSuccess = new client.Counter({ 13 | name: 'assert_success_total', 14 | help: 'Successful assertions', 15 | labelNames: ['request', 'test'] 16 | }) 17 | const assertFail = new client.Counter({ 18 | name: 'assert_fail_total', 19 | help: 'Failed assertions', 20 | labelNames: ['request', 'test'] 21 | }) 22 | const testSuccess = new client.Counter({ 23 | name: 'test_success_total', 24 | help: 'Successful tests', 25 | labelNames: ['template'] 26 | }) 27 | const testFail = new client.Counter({ 28 | name: 'test_fail_total', 29 | help: 'Failed tests', 30 | labelNames: ['template'] 31 | }) 32 | 33 | const metrics = { 34 | assertSuccess: { add (value, labels) { assertSuccess.inc(labels, value) } }, 35 | assertFail: { add (value, labels) { assertFail.inc(labels, value) } }, 36 | testSuccess: { add (value, labels) { testSuccess.inc(labels, value) } }, 37 | testFail: { add (value, labels) { testFail.inc(labels, value) } } 38 | } 39 | 40 | return (req, res, next) => { 41 | if (req.url === '/metrics') { 42 | res.set('Content-Type', 'text/plain; version=0.0.4') 43 | Metrics.getMetricsForPrometheus().then(metrics => { 44 | res.send(metrics) 45 | }) 46 | } else { 47 | req.metrics = metrics 48 | next() 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/lib/mocking/custom-functions/generic.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const { monotonicFactory } = require('ulidx') 31 | 32 | const generateUUID = () => { 33 | const uuid = require('uuid') 34 | return uuid.v4() 35 | } 36 | 37 | const curDate = () => { 38 | return (new Date()).toUTCString() 39 | } 40 | 41 | const curDateISO = () => { 42 | return (new Date()).toISOString() 43 | } 44 | 45 | const generateULID = monotonicFactory() 46 | 47 | const generateID = (options) => { 48 | return options.generateIDType === 'uuid' ? generateUUID() : generateULID() 49 | } 50 | 51 | module.exports = { 52 | generateUUID, 53 | generateULID, 54 | generateID, 55 | curDate, 56 | curDateISO 57 | } 58 | -------------------------------------------------------------------------------- /src/lib/mocking/openApiDefinitionsModel.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const Config = require('../config') 31 | let apiDefinitions = null 32 | const specFilePrefix = require('../utils').resolve('spec_files/api_definitions') + '/' 33 | 34 | const getApiDefinitions = async () => { 35 | if (!apiDefinitions) { 36 | refreshApiDefinitions() 37 | } 38 | return apiDefinitions 39 | } 40 | 41 | const refreshApiDefinitions = async () => { 42 | apiDefinitions = Config.getSystemConfig().API_DEFINITIONS.map(item => { 43 | return { 44 | minorVersion: +item.version.split('.')[1], 45 | majorVersion: +item.version.split('.')[0], 46 | type: item.type, 47 | caption: item.caption, 48 | asynchronous: item.asynchronous, 49 | prefix: item.prefix, 50 | hostnames: item.hostnames, 51 | additionalApi: item.additionalApi, 52 | specFile: specFilePrefix + item.folderPath + '/api_spec.yaml', 53 | callbackMapFile: specFilePrefix + item.folderPath + '/callback_map.json', 54 | responseMapFile: specFilePrefix + item.folderPath + '/response_map.json', 55 | jsfRefFile: specFilePrefix + item.folderPath + '/mockRef.json', 56 | triggerTemplatesFolder: specFilePrefix + item.folderPath + '/trigger_templates' 57 | } 58 | }) 59 | } 60 | 61 | module.exports = { 62 | getApiDefinitions, 63 | refreshApiDefinitions 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/mocking/transformers/index.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * Infitx 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const getTransformer = (transformerName) => { 31 | if (transformerName === 'none' || transformerName === 'NONE' || transformerName === 'no' || transformerName === 'NO') { 32 | return null 33 | } else { 34 | const transformerModule = require(`./${transformerName}`) 35 | return transformerModule 36 | } 37 | } 38 | 39 | module.exports = { 40 | getTransformer 41 | } 42 | -------------------------------------------------------------------------------- /src/lib/notificationEmitter.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const SocketServer = require('./socket-server') 31 | 32 | const broadcast = (log, sessionID = null, type) => { 33 | const io = SocketServer.getIO() 34 | if (io) { 35 | io.emit(type, log) 36 | if (sessionID) { 37 | io.emit(`${type}/` + sessionID, log) 38 | } 39 | } 40 | } 41 | 42 | const broadcastLog = (log, sessionID = null) => { 43 | broadcast(log, sessionID, 'newLog') 44 | } 45 | 46 | const sendMessage = (message, sessionID = null) => { 47 | broadcast(message, sessionID, 'pushMessage') 48 | } 49 | 50 | const broadcastOutboundLog = (log, sessionID = null) => { 51 | broadcast(log, sessionID, 'newOutboundLog') 52 | } 53 | 54 | const broadcastOutboundProgress = (status, sessionID = null) => { 55 | status.reportTime = new Date() 56 | broadcast(status, sessionID, 'outboundProgress') 57 | } 58 | 59 | module.exports = { 60 | broadcastLog, 61 | broadcastOutboundLog, 62 | broadcastOutboundProgress, 63 | sendMessage 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/oauth/Wso2Client.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | 'use strict' 31 | const Config = require('../config') 32 | const axios = require('axios') 33 | const customLogger = require('../requestLogger') 34 | 35 | exports.getToken = async (username, password) => { 36 | const form = new URLSearchParams({ 37 | username, 38 | password, 39 | scope: 'openid', 40 | grant_type: 'password' 41 | }) 42 | 43 | try { 44 | const Constants = Config.getSystemConfig() 45 | const url = Constants.OAUTH.OAUTH2_ISSUER 46 | const response = await axios.post(url, form.toString(), { 47 | headers: { 48 | 'Content-Type': 'application/x-www-form-urlencoded' 49 | }, 50 | auth: { 51 | username: Constants.OAUTH.APP_OAUTH_CLIENT_KEY, 52 | password: Constants.OAUTH.APP_OAUTH_CLIENT_SECRET 53 | } 54 | }) 55 | 56 | customLogger.logMessage('info', `Wso2Client.getToken received ${JSON.stringify(response.data)}`, { notification: false }) 57 | return response.data 58 | } catch (error) { 59 | if (error.response?.status === 400 && error.response?.data?.message.includes('Authentication failed')) { 60 | throw new Error(`Authentication failed for user ${username}`) 61 | } 62 | throw error 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/objectStore/inMemoryImpl.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const storedObject = { 31 | transactions: {} 32 | } 33 | 34 | const set = async (key, value) => { 35 | storedObject[key] = { ...value } 36 | } 37 | 38 | const get = async (key) => { 39 | return { ...storedObject[key] } 40 | } 41 | 42 | const init = async () => { 43 | return null 44 | } 45 | 46 | module.exports = { 47 | set, 48 | get, 49 | init 50 | } 51 | -------------------------------------------------------------------------------- /src/lib/objectStore/objectStoreInterface.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const objectStoreImpl = require('./inMemoryImpl') 31 | 32 | const set = async (key, value) => { 33 | // console.log('### OBJECT_STORE #### Setting key', key, 'Value', value ) 34 | await objectStoreImpl.set(key, value) 35 | } 36 | 37 | const get = async (key) => { 38 | const value = await objectStoreImpl.get(key) 39 | // console.log('### OBJECT_STORE #### Getting key', key, 'Value', value ) 40 | return value 41 | } 42 | 43 | const init = async () => { 44 | await objectStoreImpl.init() 45 | } 46 | 47 | module.exports = { 48 | set, 49 | get, 50 | init 51 | } 52 | -------------------------------------------------------------------------------- /src/lib/resources/wso2carbon-publickey.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDSTCCAjGgAwIBAgIEAoLQ/TANBgkqhkiG9w0BA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nPBt/liX1qfyXM7xEotWoxmm6HZx8oWQ8 19 | U5aiXjZ5RKDWCCq4ZuXl6wVsUz1iE61suO5yWi8= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /src/lib/server-logs/adapters/grafana.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/src/lib/server-logs/adapters/grafana.js -------------------------------------------------------------------------------- /src/lib/socket-server.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const socketIO = require('socket.io') 31 | const Config = require('./config') 32 | let socketIOObj = null 33 | 34 | const initServer = (http) => { 35 | socketIOObj = socketIO(http, { 36 | cors: { 37 | allowedHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization'], 38 | exposedHeaders: ['Content-Disposition'], 39 | methods: ['GET', 'POST', 'PATCH', 'PUT', 'DELETE', 'OPTIONS'], 40 | origin: true, 41 | credentials: true 42 | }, 43 | // https://socket.io/docs/v4/server-options/#low-level-engine-options 44 | ...Config.getSystemConfig().SOCKET_IO_ENGINE_OPTIONS 45 | }) 46 | } 47 | 48 | const getIO = () => { 49 | return socketIOObj 50 | } 51 | 52 | module.exports = { 53 | initServer, 54 | getIO 55 | } 56 | -------------------------------------------------------------------------------- /src/lib/test-outbound/getTracing.js: -------------------------------------------------------------------------------- 1 | const { TraceHeaderUtils } = require('@mojaloop/ml-testing-toolkit-shared-lib') 2 | const Config = require('../config') 3 | 4 | const getTracing = (traceID, dfspId) => { 5 | const tracing = { 6 | outboundID: traceID, 7 | sessionID: null 8 | } 9 | if (traceID && TraceHeaderUtils.isCustomTraceID(traceID)) { 10 | tracing.outboundID = TraceHeaderUtils.getEndToEndID(traceID) 11 | tracing.sessionID = TraceHeaderUtils.getSessionID(traceID) 12 | } 13 | if (Config.getSystemConfig().HOSTING_ENABLED) { 14 | tracing.sessionID = dfspId 15 | } 16 | return tracing 17 | } 18 | 19 | module.exports = getTracing 20 | -------------------------------------------------------------------------------- /src/lib/uniqueIdGenerator.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const generateUniqueId = (request) => { 31 | const r = Math.random().toString(36).substring(7) 32 | return Date.now() + r 33 | } 34 | 35 | module.exports.generateUniqueId = generateUniqueId 36 | -------------------------------------------------------------------------------- /src/lib/utilsInternal.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | const customLogger = require('./requestLogger') 30 | 31 | const getFunctionResult = (param, fromObject, request, user) => { 32 | const temp = param.replace(/{\$function\.(.*)}/, '$1').split('.') 33 | if (temp.length === 2) { 34 | const fileName = temp[0] 35 | const functionName = temp[1] 36 | let fn 37 | try { 38 | fn = require('./mocking/custom-functions/' + fileName)[functionName] 39 | } catch (e) { 40 | customLogger.logMessage('error', 'The specified module does not exist', { additionalData: param, notification: false, user }) 41 | return param 42 | } 43 | if (!fn) { 44 | customLogger.logMessage('error', 'The specified custom function does not exist', { additionalData: param, notification: false, user }) 45 | return param 46 | } 47 | return fn(fromObject, request) 48 | } else { 49 | customLogger.logMessage('error', 'The specified custom function format is not correct', { additionalData: param, notification: false, user }) 50 | return param 51 | } 52 | } 53 | 54 | module.exports = { 55 | getFunctionResult 56 | } 57 | -------------------------------------------------------------------------------- /test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mojaloop/ml-testing-toolkit/0b9a0bac706799c610668faa5c1759f96eca25f0/test/.DS_Store -------------------------------------------------------------------------------- /test/api_spec_sync_empty.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: MOJALOOP Central Settlements 4 | description: Mojaloop API for Settlements. 5 | version: 1.1.0 6 | servers: 7 | - url: /v1 -------------------------------------------------------------------------------- /test/docker-compose.integration.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | mojaloop-testing-toolkit-int: 5 | image: mojaloop-testing-toolkit:local 6 | build: 7 | context: . 8 | target: builder 9 | container_name: mojaloop-testing-toolkit-int 10 | command: 11 | - sh 12 | - -c 13 | - "tail -f /dev/null" 14 | volumes: 15 | - ./src:/opt/app/src 16 | - ./test:/opt/app/test 17 | - ./package.json:/opt/app/package.json 18 | - ./test/integration-config.json:/opt/app/config/default.json 19 | - ./docker/wait-for:/opt/wait-for -------------------------------------------------------------------------------- /test/func/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | mojaloop-testing-toolkit: 5 | image: mojaloop/ml-testing-toolkit:local 6 | volumes: 7 | - "../../spec_files:/opt/app/spec_files" 8 | ports: 9 | - "4040:4040" 10 | - "5050:5050" 11 | command: 12 | - sh 13 | - -c 14 | - "npm start" 15 | healthcheck: 16 | test: ["CMD-SHELL", "nc localhost 4040"] 17 | interval: 5s 18 | timeout: 10s 19 | retries: 3 20 | 21 | test-service: 22 | image: postman/newman:5.3.1 23 | depends_on: 24 | mojaloop-testing-toolkit: 25 | condition: service_healthy 26 | volumes: 27 | - "./postman:/etc/newman" 28 | command: 29 | - run 30 | - ttk_func_collection.json 31 | - "--environment=ttk_func_environment.json" 32 | 33 | networks: 34 | default: 35 | name: mojaloop-testing-toolkit 36 | 37 | 38 | -------------------------------------------------------------------------------- /test/func/run_newman.sh: -------------------------------------------------------------------------------- 1 | newman run --delay-request=10 --environment='postman/ttk_func_environment.json' 'postman/ttk_func_collection.json' 2 | -------------------------------------------------------------------------------- /test/integration-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "TEST_TOOLKIT_HOST":"mojaloop-testing-toolkit", 3 | "API_PORT": 4040, 4 | "DISPLAY_ROUTES": true, 5 | "SWITCH_ENDPOINT": "http://localhost:3001" 6 | } 7 | -------------------------------------------------------------------------------- /test/integration-runner.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ### 4 | # integration-runner.sh 5 | # 6 | # A basic integration test runner using docker-compose 7 | ### 8 | 9 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 10 | 11 | ## 12 | # TEST_MODE 13 | # Options: 14 | # - default runs the tests as usual 15 | # - wait sets up the docker-compose environment, but don't do anything (this allows for repeat tests) 16 | # - rm same as default, but stops and removes docker-compose containers afterwards 17 | ### 18 | TEST_MODE="${TEST_MODE:-"rm"}" 19 | 20 | # Test output on host machine 21 | RESULTS_DIR="${RESULTS_DIR:-"/tmp"}" 22 | 23 | function startDocker() { 24 | docker-compose \ 25 | -f ${DIR}/../docker-compose.yml \ 26 | -f ${DIR}/../docker-compose.integration.yml \ 27 | up -d 28 | } 29 | 30 | function waitForDocker() { 31 | echo 'Waiting for docker services to be healthy' 32 | HEALTHY_COUNT=$(docker ps | grep "healthy" | wc -l) 33 | EXPECTED_HEALTHY_COUNT=2 34 | EXPECTED_SERVICE_COUNT=2 35 | while [ $(docker ps | grep "Up" | wc -l) -lt $EXPECTED_HEALTHY_COUNT ]; do 36 | TOTAL_SERVICES=$(docker ps | grep "mojaloop-testing-toolkit_*" | wc -l) 37 | # exit early if we don't have the required services 38 | if [ ${TOTAL_SERVICES} -lt ${EXPECTED_SERVICE_COUNT} ]; then 39 | echo 'Not all docker-compose services are running. Check the logs and try again.' 40 | exit 1 41 | fi 42 | 43 | echo "." 44 | sleep 5 45 | done 46 | } 47 | 48 | function runTests() { 49 | docker exec -it mojaloop-testing-toolkit-int sh -c "npm run test:int" 50 | } 51 | 52 | function tearDown() { 53 | docker-compose \ 54 | -f ${DIR}/../docker-compose.yml \ 55 | -f ${DIR}/../docker-compose.integration.yml \ 56 | stop 57 | docker-compose \ 58 | -f ${DIR}/../docker-compose.yml \ 59 | -f ${DIR}/../docker-compose.integration.yml \ 60 | rm -f 61 | } 62 | 63 | startDocker 64 | waitForDocker 65 | 66 | case ${TEST_MODE} in 67 | default) 68 | runTests 69 | ;; 70 | 71 | wait) 72 | echo 'Running tests in `wait` mode' 73 | ;; 74 | 75 | rm) 76 | runTests 77 | EXIT_RESULT=$? 78 | tearDown 79 | exit ${EXIT_RESULT} 80 | ;; 81 | 82 | *) 83 | echo "Unsupported TEST_MODE: ${TEST_MODE}" 84 | exit 1 85 | esac 86 | 87 | -------------------------------------------------------------------------------- /test/integration/sample.test.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | 'use strict' 31 | 32 | const axios = require('axios') 33 | 34 | const { 35 | TEST_TOOLKIT_HOST, 36 | API_PORT 37 | } = require('../util/testConfig') 38 | 39 | describe('plugins', () => { 40 | describe('hapi-swagger', () => { 41 | 42 | it('Checks the health endpoint', async () => { 43 | // Arrange 44 | const url = `http://${TEST_TOOLKIT_HOST}:${API_PORT}/health` 45 | 46 | // Act 47 | const response = await axios.get(url) 48 | 49 | // Assert 50 | expect(response.data.status).toBe('OK') 51 | }) 52 | }) 53 | }) 54 | -------------------------------------------------------------------------------- /test/lib/mockRequest.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const { stub } = require('sinon') 31 | 32 | const mockRequest = (options = {}) => ({ 33 | body: {}, 34 | cookies: {}, 35 | query: {}, 36 | params: {}, 37 | headers: {}, 38 | customInfo: {}, 39 | get: stub(), 40 | ...options 41 | }) 42 | 43 | module.exports = mockRequest 44 | -------------------------------------------------------------------------------- /test/lib/mockResponse.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const { spy, stub } = require('sinon') 31 | 32 | const mockResponse = (options = {}) => { 33 | const res = { 34 | cookie: spy(), 35 | clearCookie: spy(), 36 | download: spy(), 37 | format: spy(), 38 | getHeader: spy(), 39 | json: spy(), 40 | jsonp: spy(), 41 | send: spy(), 42 | sendFile: spy(), 43 | sendStatus: spy(), 44 | setHeader: spy(), 45 | redirect: spy(), 46 | render: spy(), 47 | end: spy(), 48 | set: spy(), 49 | type: spy(), 50 | get: stub(), 51 | ...options 52 | } 53 | res.status = stub().returns(res) 54 | res.vary = stub().returns(res) 55 | return res 56 | } 57 | 58 | module.exports = mockResponse 59 | -------------------------------------------------------------------------------- /test/mockRef.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "quoteId" 4 | }, 5 | { 6 | "id": "id" 7 | }, 8 | { 9 | "id": "state", 10 | "pattern": "Created|Closed" 11 | }, 12 | { 13 | "id": "reason", 14 | "pattern": "Created|Closed" 15 | } 16 | ] -------------------------------------------------------------------------------- /test/unit/lib/mocking/transformers/index.test.js: -------------------------------------------------------------------------------- 1 | const { getTransformer } = require('../../../../../src/lib/mocking/transformers'); 2 | 3 | describe('getTransformer', () => { 4 | it('should return null for "none"', () => { 5 | expect(getTransformer('none')).toBeNull(); 6 | }); 7 | 8 | it('should return null for "NONE"', () => { 9 | expect(getTransformer('NONE')).toBeNull(); 10 | }); 11 | 12 | it('should return null for "no"', () => { 13 | expect(getTransformer('no')).toBeNull(); 14 | }); 15 | 16 | it('should return null for "NO"', () => { 17 | expect(getTransformer('NO')).toBeNull(); 18 | }); 19 | 20 | it('should return the transformer module for a valid transformer name', () => { 21 | const transformerName = 'fspiopToISO20022'; 22 | jest.mock(`../../../../../src/lib/mocking/transformers/fspiopToISO20022`, () => ({}), { virtual: true }); 23 | const transformerModule = getTransformer(transformerName); 24 | expect(transformerModule).toBeDefined(); 25 | }); 26 | 27 | it('should throw an error for an invalid transformer name', () => { 28 | const transformerName = 'invalidTransformer'; 29 | expect(() => getTransformer(transformerName)).toThrow(); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /test/unit/lib/mocking/transformers/requestTransform.test.js: -------------------------------------------------------------------------------- 1 | const { forwardTransform } = require('../../../../../src/lib/mocking/transformers/fspiopToISO20022') 2 | 3 | describe('forwardTransform Tests with real transformLib -->', () => { 4 | it('should transform real PUT /quotes request', async () => { 5 | const requestOptions = { 6 | method: 'put', 7 | path: '/quotes/01JBHNDR4S6TWQ0YVKZWCXMEDX', 8 | params: { 9 | ID: '01JBHNDR4S6TWQ0YVKZWCXMEDX' 10 | }, 11 | headers: { 12 | 'Content-Type': 'application/vnd.interoperability.quotes+json;version=2.0', 13 | Date: 'Thu, 31 Oct 2024 16:09:34 GMT', 14 | 'FSPIOP-Source': 'noresponsepayeefsp', 15 | 'FSPIOP-Destination': 'testingtoolkitdfsp', 16 | traceparent: '00-aabbf2d633e333ccb93af62ec4c02d00-0123456789abcdef0-00' 17 | }, 18 | body: { 19 | transferAmount: { 20 | currency: 'XXX', 21 | amount: '1' 22 | }, 23 | payeeReceiveAmount: { 24 | currency: 'XXX', 25 | amount: '1' 26 | }, 27 | payeeFspFee: { 28 | currency: 'XXX', 29 | amount: '0' 30 | }, 31 | payeeFspCommission: { 32 | currency: 'XXX', 33 | amount: '0' 34 | }, 35 | expiration: '2024-11-01T16:09:34.713Z', 36 | ilpPacket: 'DIICYwAAAAAAAABkMjAyNDEwMjkxMTE0MTQzNTIv1lSZPk0mP5Io_nXbsO9zUmQXinvjJbhGwsqc53pARgpnLm1vamFsb29wggIcZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTURGS1FqbEVRVk5PTURGRVdUUlhTME5hV1RoWVVrVTBXa01pTENKeGRXOTBaVWxrSWpvaU1ERktRamxFUVZOWk5EZFNUVVEwUzFOS1MwZElVMW8wTUVvaUxDSndZWGxsWlNJNmV5SndZWEowZVVsa1NXNW1ieUk2ZXlKd1lYSjBlVWxrVkhsd1pTSTZJalUwTXpJeE1EQXhJaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pVFZOSlUwUk9JaXdpWm5Od1NXUWlPaUowZEd0d1lYbGxaV1p6Y0NKOWZTd2ljR0Y1WlhJaU9uc2ljR0Z5ZEhsSlpFbHVabThpT25zaWNHRnlkSGxKWkZSNWNHVWlPaUkwTkRFeU16UTFOamM0T1NJc0luQmhjblI1U1dSbGJuUnBabWxsY2lJNklrMVRTVk5FVGlJc0ltWnpjRWxrSWpvaWRIUnJabmh3WVhsbGNpSjlmU3dpWVcxdmRXNTBJanA3SW1OMWNuSmxibU41SWpvaVdGUlRJaXdpWVcxdmRXNTBJam9pTVRBd0luMHNJblJ5WVc1ellXTjBhVzl1Vkhsd1pTSTZiblZzYkN3aVpYaHdhWEpoZEdsdmJpSTZJakl3TWpRdE1UQXRNamxVTVRFNk1UUTZNVFF1TXpVeVdpSXNJbTV2ZEdVaU9tNTFiR3g5', 37 | condition: 'L9ZUmT5NJj-SKP5127Dvc1JkF4p74yW4RsLKnOd6QEY' 38 | } 39 | }; 40 | 41 | const transformedRequest = await forwardTransform(requestOptions); 42 | 43 | expect(transformedRequest.headers['Content-Type']).toBe('application/vnd.interoperability.iso20022.quotes+json;version=2.0'); 44 | expect(transformedRequest.body.GrpHdr).toBeTruthy(); 45 | expect(transformedRequest.body.CdtTrfTxInf).toBeTruthy(); 46 | }); 47 | }) 48 | -------------------------------------------------------------------------------- /test/unit/lib/myEventEmitter.test.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Georgi Logodazhki (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const MyEventEmitter = require('../../../src/lib/MyEventEmitter') 31 | 32 | describe('MyEventEmitter', () => { 33 | describe('when getEmitter(testOutbound) is called', () => { 34 | it('testOutbound should be created', async () => { 35 | expect(() => MyEventEmitter.getEmitter('testOutbound')).not.toThrowError() 36 | }) 37 | it('testOutbound should be not created if exists', async () => { 38 | expect(() => MyEventEmitter.getEmitter('testOutbound')).not.toThrowError() 39 | }) 40 | }) 41 | describe('when getEmitter is called', () => { 42 | it('assertionRequest should be created', async () => { 43 | expect(() => MyEventEmitter.getEmitter('assertionRequest')).not.toThrowError() 44 | }) 45 | it('assertionRequest should be not created if exists', async () => { 46 | expect(() => MyEventEmitter.getEmitter('assertionRequest')).not.toThrowError() 47 | }) 48 | }) 49 | describe('when getEmitter is called', () => { 50 | it('assertionCallback should be created', async () => { 51 | expect(() => MyEventEmitter.getEmitter('assertionCallback')).not.toThrowError() 52 | }) 53 | it('assertionCallback should be not created if exists', async () => { 54 | expect(() => MyEventEmitter.getEmitter('assertionCallback')).not.toThrowError() 55 | }) 56 | }) 57 | }) 58 | -------------------------------------------------------------------------------- /test/unit/lib/socket-server.test.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Kevin Leyow 27 | -------------- 28 | ******/ 29 | 30 | 'use strict' 31 | 32 | const socketIO = require('socket.io') 33 | const SocketServer = require('../../../src/lib/socket-server') 34 | const Config = require('../../../src/lib/config') 35 | const storageAdapter = require('../../../src/lib/storageAdapter') 36 | 37 | jest.mock('socket.io') 38 | jest.mock('../../../src/lib/storageAdapter') 39 | 40 | describe('Socket Server', () => { 41 | describe('Init server', () => { 42 | it('Passes config options to library', async () => { 43 | storageAdapter.read.mockResolvedValueOnce({ 44 | data: { 45 | SOCKET_IO_ENGINE_OPTIONS: { 46 | pingInterval: 1, 47 | } 48 | } 49 | }) 50 | Config.loadSystemConfig() 51 | await expect(Config.getObjectStoreInitConfig()).resolves.toBeTruthy() 52 | await Config.getObjectStoreInitConfig() 53 | const httpMock = jest.mock() 54 | SocketServer.initServer(httpMock) 55 | expect(socketIO).toBeCalledWith( 56 | httpMock, { 57 | cors: expect.any(Object), 58 | pingInterval: 1, 59 | } 60 | ) 61 | }) 62 | }) 63 | }) 64 | -------------------------------------------------------------------------------- /test/unit/lib/uniqueIdGenerator.test.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | 'use strict' 31 | 32 | const UniqueIdGenerator = require('../../../src/lib/uniqueIdGenerator') 33 | 34 | describe('UniqueIdGenerator', () => { 35 | describe('generateUniqueId', () => { 36 | it('Result must be a string with length greater than 0', async () => { 37 | const result = await UniqueIdGenerator.generateUniqueId() 38 | expect((typeof result) === 'string').toBe(true) 39 | expect(result.length).toBeGreaterThan(0) 40 | }) 41 | it('Result must be unique', async () => { 42 | const result1 = await UniqueIdGenerator.generateUniqueId() 43 | const result2 = await UniqueIdGenerator.generateUniqueId() 44 | const result3 = await UniqueIdGenerator.generateUniqueId() 45 | expect(result1).not.toEqual(result2) 46 | expect(result2).not.toEqual(result3) 47 | expect(result1).not.toEqual(result3) 48 | }) 49 | }) 50 | }) 51 | -------------------------------------------------------------------------------- /test/util/testConfig.js: -------------------------------------------------------------------------------- 1 | /***** 2 | License 3 | -------------- 4 | Copyright © 2020-2025 Mojaloop Foundation 5 | The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | Contributors 12 | -------------- 13 | This is the official list of the Mojaloop project contributors for this file. 14 | Names of the original copyright holders (individuals or organizations) 15 | should be listed with a '*' in the first column. People who have 16 | contributed from an organization can be listed under the organization 17 | that actually holds the copyright for their contributions (see the 18 | Mojaloop Foundation for an example). Those individuals should have 19 | their names indented and be marked with a '-'. Email address can be added 20 | optionally within square brackets . 21 | 22 | * Mojaloop Foundation 23 | - Name Surname 24 | 25 | * ModusBox 26 | * Vijaya Kumar Guthi (Original Author) 27 | -------------- 28 | ******/ 29 | 30 | const RC = require('parse-strings-in-object')(require('rc')('TOOLKIT', require('../../config/default.json'))) 31 | const defaultConfig = require('../../src/lib/config') 32 | 33 | /** 34 | * testConfig extends ./src/lib/config.js with test-specific 35 | * environment variable config 36 | */ 37 | 38 | module.exports = { 39 | /* Test Config */ 40 | TEST_TOOLKIT_HOST: RC.TEST_TOOLKIT_HOST, 41 | 42 | ...defaultConfig 43 | } --------------------------------------------------------------------------------