@mojaloop/central-ledger 9.2.2 → 15.1.3-snapshot.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +625 -204
- package/.env +3 -2
- package/.ncurc.yaml +9 -0
- package/.nvmrc +1 -1
- package/.versionrc +15 -0
- package/CHANGELOG.md +353 -0
- package/CODEOWNERS +31 -0
- package/Dockerfile +20 -14
- package/LICENSE.md +4 -4
- package/Onboarding.md +0 -7
- package/README.md +99 -22
- package/audit-resolve.json +136 -1
- package/config/default.json +82 -27
- package/docker/central-ledger/default.json +68 -21
- package/docker/ml-api-adapter/default.json +10 -1
- package/docker/wait-for/wait-for-objstore.sh +1 -6
- package/docker/wait-for/wait-for.env +1 -1
- package/docker-compose.integration.yml +8 -5
- package/docker-compose.yml +73 -16
- package/migrations/310203_transferParticipant-indexes.js +38 -0
- package/migrations/310503_participantLimit-indexes-composite.js +38 -0
- package/migrations/{400401_settlementWindowStateChange-indexes.js → 400401_settlmentWindowStateChange-indexes.js} +0 -0
- package/migrations/401301_settlementModel-indexes.js +2 -0
- package/migrations/500401_quote-hotfix-2719.js +58 -0
- package/migrations/500501_feature-fixSubIdRef.js +53 -0
- package/migrations/500601_party-2480.js +63 -0
- package/migrations/501001_quoteExtension-quote-service-174.js +46 -0
- package/migrations/501002_quoteExtension-2522.js +61 -0
- package/migrations/800101_feature-fixSubIdRef.js +90 -0
- package/migrations/910102_hotfix954.js +4 -1
- package/migrations/940100_quotePartyIdInfoExtension.js +52 -0
- package/migrations/940101_quotePartyIdInfoExtension-2522.js +64 -0
- package/migrations/950100_settlementContentAggregation-decimal184.js +40 -0
- package/migrations/950101_transferParticipantStateChange.js +46 -0
- package/migrations/950102_settlementModel-adjustPosition.js +42 -0
- package/migrations/950103_dropTransferParticipantStateChange.js +47 -0
- package/migrations/950104_settlementModel-settlementAccountTypeId.js +79 -0
- package/migrations/950106_unique_settlement_model_ledger_account_currency.js +38 -0
- package/migrations/950107_settlementWindowContent_foreign_settlementModel.js +60 -0
- package/package.json +99 -81
- package/scripts/_wait4_all.js +146 -0
- package/seeds/amountType.js +4 -6
- package/seeds/balanceOfPayments.js +4 -6
- package/seeds/bulkProcessingState.js +4 -6
- package/seeds/bulkTransferState.js +4 -6
- package/seeds/currency.js +4 -6
- package/seeds/endpointType.js +128 -7
- package/seeds/ledgerAccountType.js +11 -10
- package/seeds/ledgerEntryType.js +5 -7
- package/seeds/participant.js +4 -6
- package/seeds/participantLimitType.js +4 -6
- package/seeds/partyIdentifierType.js +4 -6
- package/seeds/partyType.js +4 -6
- package/seeds/settlementDelay.js +4 -6
- package/seeds/settlementGranularity.js +4 -6
- package/seeds/settlementInterchange.js +4 -6
- package/seeds/settlementState.js +4 -6
- package/seeds/settlementWindow1State.js +4 -6
- package/seeds/transactionInitiator.js +4 -6
- package/seeds/transactionInitiatorType.js +4 -6
- package/seeds/transactionScenario.js +4 -6
- package/seeds/transferParticipantRoleType.js +4 -6
- package/seeds/transferState.js +9 -6
- package/src/api/interface/swagger.json +728 -948
- package/src/api/ledgerAccountTypes/handler.js +55 -0
- package/src/api/ledgerAccountTypes/routes.js +63 -0
- package/src/api/metrics/handler.js +2 -2
- package/src/api/metrics/routes.js +1 -1
- package/src/api/participants/handler.js +43 -35
- package/src/api/participants/routes.js +13 -13
- package/src/api/root/routes.js +2 -2
- package/src/api/settlementModels/handler.js +9 -26
- package/src/api/settlementModels/routes.js +4 -4
- package/src/api/transactions/handler.js +46 -0
- package/src/api/transactions/routes.js +45 -0
- package/src/domain/bulkTransfer/index.js +6 -5
- package/src/domain/ledgerAccountTypes/index.js +58 -0
- package/src/domain/participant/index.js +55 -4
- package/src/domain/position/index.js +18 -2
- package/src/domain/settlement/index.js +39 -6
- package/src/domain/transactions/index.js +61 -0
- package/src/domain/transfer/index.js +22 -2
- package/src/domain/transfer/transform.js +3 -3
- package/src/handlers/admin/handler.js +24 -32
- package/src/handlers/bulk/fulfil/handler.js +89 -56
- package/src/handlers/bulk/get/handler.js +203 -0
- package/src/handlers/bulk/index.js +4 -1
- package/src/handlers/bulk/prepare/handler.js +30 -29
- package/src/handlers/bulk/processing/handler.js +61 -32
- package/src/handlers/bulk/shared/validator.js +13 -1
- package/src/handlers/index.js +18 -9
- package/src/handlers/positions/handler.js +67 -46
- package/src/handlers/register.js +7 -7
- package/src/handlers/timeouts/handler.js +9 -4
- package/src/handlers/transfers/handler.js +408 -182
- package/src/handlers/transfers/validator.js +41 -11
- package/src/lib/cache.js +8 -34
- package/src/lib/config.js +5 -7
- package/src/lib/enum.js +22 -22
- package/src/lib/enumCached.js +76 -0
- package/src/lib/healthCheck/subServiceHealth.js +2 -2
- package/src/lib/requestLogger.js +9 -9
- package/src/lib/urlParser.js +1 -1
- package/src/models/bulkTransfer/bulkTransfer.js +6 -6
- package/src/models/bulkTransfer/bulkTransferAssociation.js +3 -3
- package/src/models/bulkTransfer/bulkTransferDuplicateCheck.js +4 -4
- package/src/models/bulkTransfer/bulkTransferExtension.js +2 -2
- package/src/models/bulkTransfer/bulkTransferFulfilmentDuplicateCheck.js +4 -4
- package/src/models/bulkTransfer/bulkTransferStateChange.js +7 -7
- package/src/models/bulkTransfer/facade.js +54 -3
- package/src/models/bulkTransfer/individualTransfer.js +2 -2
- package/src/models/ilpPackets/ilpPacket.js +36 -0
- package/src/models/ledgerAccountType/ledgerAccountType.js +139 -3
- package/src/models/misc/migrationLock.js +1 -1
- package/src/models/misc/segment.js +1 -1
- package/src/models/participant/facade.js +226 -76
- package/src/models/participant/participant.js +6 -5
- package/src/models/participant/participantCached.js +8 -0
- package/src/models/participant/participantCurrency.js +7 -7
- package/src/models/participant/participantCurrencyCached.js +11 -1
- package/src/models/participant/participantLimit.js +13 -13
- package/src/models/participant/participantLimitCached.js +124 -0
- package/src/models/participant/participantPosition.js +34 -5
- package/src/models/participant/participantPositionChange.js +10 -2
- package/src/models/position/facade.js +112 -18
- package/src/models/position/participantPosition.js +6 -6
- package/src/models/settlement/settlementModel.js +92 -17
- package/src/models/settlement/settlementModelCached.js +139 -0
- package/src/models/transfer/facade.js +97 -32
- package/src/models/transfer/ilpPacket.js +4 -4
- package/src/models/transfer/transfer.js +7 -7
- package/src/models/transfer/transferDuplicateCheck.js +21 -5
- package/src/models/transfer/transferError.js +5 -5
- package/src/models/transfer/transferErrorDuplicateCheck.js +4 -4
- package/src/models/transfer/transferExtension.js +4 -4
- package/src/models/transfer/transferFulfilment.js +5 -5
- package/src/models/transfer/transferFulfilmentDuplicateCheck.js +4 -4
- package/src/models/transfer/transferParticipant.js +3 -3
- package/src/models/transfer/transferStateChange.js +11 -11
- package/src/models/transfer/transferTimeout.js +5 -5
- package/src/schema/bulkTransfer.js +4 -4
- package/src/shared/plugins.js +10 -9
- package/src/shared/setup.js +69 -46
- package/test/integration/domain/participant/index.test.js +2 -0
- package/test/integration/handlers/handlers.test.js +605 -166
- package/test/integration/handlers/root.test.js +1 -1
- package/test/integration/helpers/hubAccounts.js +62 -0
- package/test/integration/helpers/ilpPacket.js +1 -1
- package/test/integration/helpers/participantFundsInOut.js +80 -0
- package/test/integration/helpers/participantLimit.js +6 -1
- package/test/integration/helpers/settlementModels.js +88 -0
- package/test/integration/helpers/testConsumer.js +163 -0
- package/test/integration/helpers/testProducer.js +0 -1
- package/test/integration/helpers/transferDuplicateCheck.js +1 -1
- package/test/integration/helpers/transferStateChange.js +1 -1
- package/test/integration/helpers/transferTestHelper.js +3 -5
- package/test/integration/models/transfer/transferStateChange.test.js +6 -0
- package/test/unit/api/ledgerAccountTypes/handler.test.js +126 -0
- package/test/unit/api/ledgerAccountTypes/routes.test.js +52 -0
- package/test/unit/api/participants/handler.test.js +75 -33
- package/test/unit/api/root/handler.test.js +1 -1
- package/test/unit/api/root/routes.test.js +2 -2
- package/test/unit/api/settlementModels/handler.test.js +21 -57
- package/test/unit/api/transactions/handler.test.js +108 -0
- package/test/unit/api/transactions/routes.test.js +38 -0
- package/test/unit/domain/ledgerAccountTypes/index.test.js +197 -0
- package/test/unit/domain/participant/index.test.js +115 -2
- package/test/unit/domain/settlement/index.test.js +199 -29
- package/test/unit/domain/transactions/index.test.js +128 -0
- package/test/unit/domain/transfer/index.test.js +1 -0
- package/test/unit/domain/transfer/transform.test.js +2 -0
- package/test/unit/handlers/admin/handler.test.js +5 -5
- package/test/unit/handlers/bulk/get/handler.test.js +401 -0
- package/test/unit/handlers/index.test.js +6 -0
- package/test/unit/handlers/positions/handler.test.js +26 -0
- package/test/unit/handlers/register.test.js +2 -0
- package/test/unit/handlers/transfers/handler.test.js +491 -36
- package/test/unit/handlers/transfers/validator.test.js +31 -31
- package/test/unit/lib/cache.test.js +0 -64
- package/test/unit/lib/cachingOfEnums.test.js +121 -0
- package/test/unit/lib/config.test.js +34 -0
- package/test/unit/lib/enum.test.js +6 -1
- package/test/unit/lib/enumCached.test.js +82 -0
- package/test/unit/lib/healthCheck/subServiceHealth.test.js +2 -0
- package/test/unit/lib/requestLogger.test.js +14 -12
- package/test/unit/models/ilpPackets/ilpPacket.test.js +89 -0
- package/test/unit/models/ledgerAccountType/ledgerAccountType.test.js +255 -6
- package/test/unit/models/misc/migrationLock.test.js +4 -0
- package/test/unit/models/misc/segment.test.js +5 -0
- package/test/unit/models/participant/facade.test.js +493 -54
- package/test/unit/models/participant/participant.test.js +4 -0
- package/test/unit/models/participant/participantCurrency.test.js +22 -9
- package/test/unit/models/participant/participantCurrencyCached.test.js +1 -1
- package/test/unit/models/participant/participantLimit.test.js +97 -0
- package/test/unit/models/participant/participantLimitCached.test.js +232 -0
- package/test/unit/models/participant/participantPosition.test.js +217 -0
- package/test/unit/models/participant/participantPositionChange.test.js +3 -0
- package/test/unit/models/position/facade.test.js +318 -29
- package/test/unit/models/position/participantPosition.test.js +22 -7
- package/test/unit/models/settlement/settlementModel.test.js +18 -37
- package/test/unit/models/settlement/settlementModelCached.test.js +171 -0
- package/test/unit/models/transfer/facade.test.js +115 -0
- package/test/unit/models/transfer/ilpPacket.test.js +28 -11
- package/test/unit/models/transfer/transfer.test.js +13 -4
- package/test/unit/models/transfer/transferDuplicateCheck.test.js +4 -0
- package/test/unit/models/transfer/transferError.test.js +5 -1
- package/test/unit/models/transfer/transferErrorDuplicateCheck.test.js +4 -0
- package/test/unit/models/transfer/transferExtension.test.js +26 -9
- package/test/unit/models/transfer/transferFulfilment.test.js +14 -5
- package/test/unit/models/transfer/transferFulfilmentDuplicateCheck.test.js +4 -0
- package/test/unit/models/transfer/transferParticipant.test.js +14 -5
- package/test/unit/models/transfer/transferStateChange.test.js +3 -0
- package/test/unit/models/transfer/transferTimeout.test.js +6 -0
- package/test/unit/seeds/amountType.test.js +6 -22
- package/test/unit/seeds/balanceOfPayments.test.js +6 -22
- package/test/unit/seeds/bulkProcessingState.test.js +84 -0
- package/test/unit/{lib/sidecar/nullClient.test.js → seeds/bulkTransferState.test.js} +36 -39
- package/test/unit/seeds/currency.test.js +6 -22
- package/test/unit/seeds/endpointType.test.js +6 -22
- package/test/unit/seeds/ledgerAccountType.test.js +5 -22
- package/test/unit/seeds/ledgerEntryType.test.js +6 -22
- package/test/unit/seeds/participant.test.js +5 -22
- package/test/unit/seeds/participantLimitType.test.js +6 -22
- package/test/unit/seeds/partyIdentifierType.test.js +6 -22
- package/test/unit/seeds/partyType.test.js +6 -22
- package/test/unit/seeds/settlementState.test.js +5 -22
- package/test/unit/seeds/settlementWindow1State.test.js +5 -22
- package/test/unit/seeds/transactionInitiator.test.js +6 -22
- package/test/unit/seeds/transactionInitiatorType.test.js +6 -22
- package/test/unit/seeds/transactionScenario.test.js +6 -22
- package/test/unit/seeds/transferParticipantRoleType.test.js +6 -22
- package/test/unit/seeds/transferState.test.js +6 -22
- package/test/unit/shared/plugins.test.js +31 -1
- package/test/unit/shared/setup.test.js +25 -36
- package/test/util/helpers.js +37 -2
- package/test/util/randomTransfers.js +1 -1
- package/test/util/scripts/env.sh +6 -5
- package/test/util/scripts/populateTestData.sh +204 -181
- package/test/util/scripts/populateTestDataForLegacySimulator.sh +261 -0
- package/test/util/scripts/restartObjStore.sh +1 -1
- package/test-integration.Dockerfile +15 -15
- package/test.Dockerfile +12 -12
- package/.circleci/_set_up_deploy_envs.sh +0 -47
- package/.dockerignore +0 -17
- package/.ncurc.json +0 -3
- package/server.sh +0 -4
- package/sonar-project.properties +0 -17
- package/src/lib/sidecar/index.js +0 -47
- package/src/lib/sidecar/nullClient.js +0 -18
- package/test/.env +0 -8
- package/test/integration-config.json +0 -367
- package/test/integration-runner.env +0 -31
- package/test/integration-runner.sh +0 -264
- package/test/spec-runner.sh +0 -132
- package/test/unit/lib/sidecar/index.test.js +0 -148
- package/test/unit/models/position/participantLimit.test.js +0 -135
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# central-ledger
|
|
2
|
+
|
|
2
3
|
[](https://github.com/mojaloop/central-ledger/commits/master)
|
|
3
4
|
[](https://github.com/mojaloop/central-ledger/releases)
|
|
4
5
|
[](https://hub.docker.com/r/mojaloop/central-ledger)
|
|
5
|
-
[](https://circleci.com/
|
|
6
|
+
[](https://app.circleci.com/pipelines/github/mojaloop/central-ledger)
|
|
6
7
|
|
|
7
8
|
The central ledger is a series of services that facilitate clearing and settlement of transfers between DFSPs, including the following functions:
|
|
8
9
|
|
|
@@ -12,21 +13,29 @@ The central ledger is a series of services that facilitate clearing and settleme
|
|
|
12
13
|
|
|
13
14
|
The following documentation represents the services, APIs and endpoints responsible for various ledger functions.
|
|
14
15
|
|
|
15
|
-
Contents
|
|
16
|
+
## Contents
|
|
16
17
|
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
20
|
-
- [
|
|
21
|
-
- [
|
|
18
|
+
- [central-ledger](#central-ledger)
|
|
19
|
+
- [Contents](#contents)
|
|
20
|
+
- [Running Locally](#running-locally)
|
|
21
|
+
- [Configuration](#configuration)
|
|
22
|
+
- [Environment variables](#environment-variables)
|
|
23
|
+
- [API](#api)
|
|
24
|
+
- [Logging](#logging)
|
|
25
|
+
- [Tests](#tests)
|
|
26
|
+
- [Running Integration Tests interactively](#running-integration-tests-interactively)
|
|
27
|
+
- [Container Scans](#container-scans)
|
|
28
|
+
- [Automated Releases](#automated-releases)
|
|
29
|
+
- [Potential problems](#potential-problems)
|
|
22
30
|
|
|
23
|
-
##
|
|
31
|
+
## Running Locally
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
Please follow the instruction in [Onboarding Document](Onboarding.md) to setup and run the service locally.
|
|
26
34
|
|
|
27
35
|
## Configuration
|
|
28
36
|
|
|
29
37
|
### Environment variables
|
|
38
|
+
|
|
30
39
|
The Central Ledger has many options that can be configured through environment variables.
|
|
31
40
|
|
|
32
41
|
| Environment variable | Description | Example values |
|
|
@@ -46,7 +55,6 @@ The Central Ledger has many options that can be configured through environment v
|
|
|
46
55
|
| CLEDG\_AMOUNT__PRECISION | Numeric value used to determine precision recorded for transfer amounts on this ledger. | 10 |
|
|
47
56
|
| CLEDG\_AMOUNT__SCALE | Numeric value used to determine scale recorded for transfer amounts on this ledger. | 2 |
|
|
48
57
|
|
|
49
|
-
|
|
50
58
|
## API
|
|
51
59
|
|
|
52
60
|
For endpoint documentation, see the [API documentation](API.md).
|
|
@@ -59,7 +67,7 @@ Logs are sent to standard output by default.
|
|
|
59
67
|
|
|
60
68
|
## Tests
|
|
61
69
|
|
|
62
|
-
Tests include unit, functional, and integration.
|
|
70
|
+
Tests include unit, functional, and integration.
|
|
63
71
|
|
|
64
72
|
Running the tests:
|
|
65
73
|
|
|
@@ -69,31 +77,100 @@ Running the tests:
|
|
|
69
77
|
|
|
70
78
|
Tests include code coverage via istanbul. See the test/ folder for testing scripts.
|
|
71
79
|
|
|
72
|
-
### Running Integration Tests interactively
|
|
80
|
+
### Running Integration Tests interactively
|
|
73
81
|
|
|
74
|
-
If you want to run integration tests in a repetitive manner, you can startup the test containers using `docker-compose
|
|
82
|
+
If you want to run integration tests in a repetitive manner, you can startup the test containers using `docker-compose` via one of the following methods:
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
docker-compose -f docker-compose.yml -f docker-compose.integration.yml up kafka mysql central-ledger
|
|
84
|
+
- Running locally
|
|
78
85
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```
|
|
86
|
+
Start containers required for Integration Tests
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
docker-compose -f docker-compose.yml up -d kafka mysql
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Run wait script which will report once all required containers are up and running
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm run wait-4-docker
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Run the Integration Tests
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm run test:int
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- Running inside docker
|
|
105
|
+
|
|
106
|
+
Start containers required for Integration Tests, including a `central-ledger` container which will be used as a proxy shell.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
docker-compose -f docker-compose.yml -f docker-compose.integration.yml up -d kafka mysql central-ledger
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Run the Integration Tests from the `central-ledger` container
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
docker exec -it cl_central-ledger sh
|
|
116
|
+
export CL_DATABASE_HOST=mysql
|
|
117
|
+
npm run test:int
|
|
118
|
+
```
|
|
84
119
|
|
|
85
120
|
## Auditing Dependencies
|
|
86
121
|
|
|
87
|
-
We use `npm-audit-resolver` along with `npm audit` to check dependencies for vulnerabilities, and keep track of resolved dependencies with an `audit-
|
|
122
|
+
We use `npm-audit-resolver` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-resolve.json` file.
|
|
88
123
|
|
|
89
124
|
To start a new resolution process, run:
|
|
125
|
+
|
|
90
126
|
```bash
|
|
91
127
|
npm run audit:resolve
|
|
92
128
|
```
|
|
93
129
|
|
|
94
130
|
You can then check to see if the CI will pass based on the current dependencies with:
|
|
131
|
+
|
|
95
132
|
```bash
|
|
96
133
|
npm run audit:check
|
|
97
134
|
```
|
|
98
135
|
|
|
99
|
-
And commit the changed `audit-
|
|
136
|
+
And commit the changed `audit-resolve.json` to ensure that CircleCI will build correctly.
|
|
137
|
+
|
|
138
|
+
## Container Scans
|
|
139
|
+
|
|
140
|
+
As part of our CI/CD process, we use anchore-cli to scan our built docker container for vulnerabilities upon release.
|
|
141
|
+
|
|
142
|
+
If you find your release builds are failing, refer to the [container scanning](https://github.com/mojaloop/ci-config#container-scanning) in our shared Mojaloop CI config repo. There is a good chance you simply need to update the `mojaloop-policy-generator.js` file and re-run the circleci workflow.
|
|
143
|
+
|
|
144
|
+
For more information on anchore and anchore-cli, refer to:
|
|
145
|
+
- [Anchore CLI](https://github.com/anchore/anchore-cli)
|
|
146
|
+
- [Circle Orb Registry](https://circleci.com/orbs/registry/orb/anchore/anchore-engine)
|
|
147
|
+
|
|
148
|
+
## Automated Releases
|
|
149
|
+
|
|
150
|
+
As part of our CI/CD process, we use a combination of CircleCI, standard-version
|
|
151
|
+
npm package and github-release CircleCI orb to automatically trigger our releases
|
|
152
|
+
and image builds. This process essentially mimics a manual tag and release.
|
|
153
|
+
|
|
154
|
+
On a merge to master, CircleCI is configured to use the mojaloopci github account
|
|
155
|
+
to push the latest generated CHANGELOG and package version number.
|
|
156
|
+
|
|
157
|
+
Once those changes are pushed, CircleCI will pull the updated master, tag and
|
|
158
|
+
push a release triggering another subsequent build that also publishes a docker image.
|
|
159
|
+
|
|
160
|
+
### Potential problems
|
|
161
|
+
|
|
162
|
+
- There is a case where the merge to master workflow will resolve successfully, triggering
|
|
163
|
+
a release. Then that tagged release workflow subsequently failing due to the image scan,
|
|
164
|
+
audit check, vulnerability check or other "live" checks.
|
|
165
|
+
|
|
166
|
+
This will leave master without an associated published build. Fixes that require
|
|
167
|
+
a new merge will essentially cause a skip in version number or require a clean up
|
|
168
|
+
of the master branch to the commit before the CHANGELOG and bump.
|
|
169
|
+
|
|
170
|
+
This may be resolved by relying solely on the previous checks of the
|
|
171
|
+
merge to master workflow to assume that our tagged release is of sound quality.
|
|
172
|
+
We are still mulling over this solution since catching bugs/vulnerabilities/etc earlier
|
|
173
|
+
is a boon.
|
|
174
|
+
|
|
175
|
+
- It is unknown if a race condition might occur with multiple merges with master in
|
|
176
|
+
quick succession, but this is a suspected edge case.
|
package/audit-resolve.json
CHANGED
|
@@ -1 +1,136 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
|
+
"decisions": {
|
|
3
|
+
"1075703|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
|
|
4
|
+
"decision": "ignore",
|
|
5
|
+
"madeAt": 1657029291345,
|
|
6
|
+
"expiresAt": 1659621287320
|
|
7
|
+
},
|
|
8
|
+
"1075703|@mojaloop/event-sdk>grpc>protobufjs": {
|
|
9
|
+
"decision": "ignore",
|
|
10
|
+
"madeAt": 1657029291345,
|
|
11
|
+
"expiresAt": 1659621287320
|
|
12
|
+
},
|
|
13
|
+
"1075704|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
|
|
14
|
+
"decision": "ignore",
|
|
15
|
+
"madeAt": 1657029292596,
|
|
16
|
+
"expiresAt": 1659621287320
|
|
17
|
+
},
|
|
18
|
+
"1075704|@mojaloop/event-sdk>grpc>protobufjs": {
|
|
19
|
+
"decision": "ignore",
|
|
20
|
+
"madeAt": 1657029292596,
|
|
21
|
+
"expiresAt": 1659621287320
|
|
22
|
+
},
|
|
23
|
+
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>shins>markdown-it": {
|
|
24
|
+
"decision": "ignore",
|
|
25
|
+
"madeAt": 1657029293742,
|
|
26
|
+
"expiresAt": 1659621287320
|
|
27
|
+
},
|
|
28
|
+
"1070030|widdershins>markdown-it": {
|
|
29
|
+
"decision": "ignore",
|
|
30
|
+
"madeAt": 1657547585781,
|
|
31
|
+
"expiresAt": 1660139581210
|
|
32
|
+
},
|
|
33
|
+
"1068155|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>shins>markdown-it>sanitize-html": {
|
|
34
|
+
"decision": "ignore",
|
|
35
|
+
"madeAt": 1657029294926,
|
|
36
|
+
"expiresAt": 1659621287320
|
|
37
|
+
},
|
|
38
|
+
"1070260|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>shins>markdown-it>sanitize-html": {
|
|
39
|
+
"decision": "ignore",
|
|
40
|
+
"madeAt": 1657029296035,
|
|
41
|
+
"expiresAt": 1659621287320
|
|
42
|
+
},
|
|
43
|
+
"1070412|ejs": {
|
|
44
|
+
"decision": "ignore",
|
|
45
|
+
"madeAt": 1657029299037,
|
|
46
|
+
"expiresAt": 1659621287320
|
|
47
|
+
},
|
|
48
|
+
"1068386|hapi-auth-basic>hapi": {
|
|
49
|
+
"decision": "ignore",
|
|
50
|
+
"madeAt": 1657029300211,
|
|
51
|
+
"expiresAt": 1659621287320
|
|
52
|
+
},
|
|
53
|
+
"1068399|hapi-auth-basic>hapi>ammo": {
|
|
54
|
+
"decision": "ignore",
|
|
55
|
+
"madeAt": 1657029301421,
|
|
56
|
+
"expiresAt": 1659621287320
|
|
57
|
+
},
|
|
58
|
+
"1068389|hapi-auth-basic>hapi>ammo>subtext": {
|
|
59
|
+
"decision": "ignore",
|
|
60
|
+
"madeAt": 1657029302848,
|
|
61
|
+
"expiresAt": 1659621287320
|
|
62
|
+
},
|
|
63
|
+
"1068390|hapi-auth-basic>hapi>ammo>subtext": {
|
|
64
|
+
"decision": "ignore",
|
|
65
|
+
"madeAt": 1657029304128,
|
|
66
|
+
"expiresAt": 1659621287320
|
|
67
|
+
},
|
|
68
|
+
"1067553|swagger2openapi>better-ajv-errors>jsonpointer": {
|
|
69
|
+
"decision": "ignore",
|
|
70
|
+
"madeAt": 1657029305419,
|
|
71
|
+
"expiresAt": 1659621287320
|
|
72
|
+
},
|
|
73
|
+
"1067946|swagger2openapi>better-ajv-errors>jsonpointer>oas-validator>ajv": {
|
|
74
|
+
"decision": "ignore",
|
|
75
|
+
"madeAt": 1657029307042,
|
|
76
|
+
"expiresAt": 1659621287320
|
|
77
|
+
},
|
|
78
|
+
"1068310|widdershins>markdown-it>yargs>yargs-parser": {
|
|
79
|
+
"decision": "ignore",
|
|
80
|
+
"madeAt": 1657029308195,
|
|
81
|
+
"expiresAt": 1659621287320
|
|
82
|
+
},
|
|
83
|
+
"1080969|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment": {
|
|
84
|
+
"decision": "ignore",
|
|
85
|
+
"madeAt": 1657547584804,
|
|
86
|
+
"expiresAt": 1660139581210
|
|
87
|
+
},
|
|
88
|
+
"1080969|@mojaloop/event-sdk>grpc>protobufjs>moment": {
|
|
89
|
+
"decision": "ignore",
|
|
90
|
+
"madeAt": 1657547584804,
|
|
91
|
+
"expiresAt": 1660139581210
|
|
92
|
+
},
|
|
93
|
+
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>shins>markdown-it": {
|
|
94
|
+
"decision": "ignore",
|
|
95
|
+
"madeAt": 1657547585781,
|
|
96
|
+
"expiresAt": 1660139581210
|
|
97
|
+
},
|
|
98
|
+
"1068155|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>shins>markdown-it>sanitize-html": {
|
|
99
|
+
"decision": "ignore",
|
|
100
|
+
"madeAt": 1657547586612,
|
|
101
|
+
"expiresAt": 1660139581210
|
|
102
|
+
},
|
|
103
|
+
"1070260|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>shins>markdown-it>sanitize-html": {
|
|
104
|
+
"decision": "ignore",
|
|
105
|
+
"madeAt": 1657547587381,
|
|
106
|
+
"expiresAt": 1660139581210
|
|
107
|
+
},
|
|
108
|
+
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>widdershins>markdown-it": {
|
|
109
|
+
"decision": "ignore",
|
|
110
|
+
"madeAt": 1657548277077,
|
|
111
|
+
"expiresAt": 1660140273753
|
|
112
|
+
},
|
|
113
|
+
"1070030|shins>markdown-it": {
|
|
114
|
+
"decision": "ignore",
|
|
115
|
+
"madeAt": 1657548277077,
|
|
116
|
+
"expiresAt": 1660140273753
|
|
117
|
+
},
|
|
118
|
+
"1068310|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>widdershins>markdown-it>yargs>yargs-parser": {
|
|
119
|
+
"decision": "ignore",
|
|
120
|
+
"madeAt": 1657548277911,
|
|
121
|
+
"expiresAt": 1660140273753
|
|
122
|
+
},
|
|
123
|
+
"1068155|shins>markdown-it>sanitize-html": {
|
|
124
|
+
"decision": "ignore",
|
|
125
|
+
"madeAt": 1657548278663,
|
|
126
|
+
"expiresAt": 1660140273753
|
|
127
|
+
},
|
|
128
|
+
"1070260|shins>markdown-it>sanitize-html": {
|
|
129
|
+
"decision": "ignore",
|
|
130
|
+
"madeAt": 1657548279466,
|
|
131
|
+
"expiresAt": 1660140273753
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"rules": {},
|
|
135
|
+
"version": 1
|
|
136
|
+
}
|
package/config/default.json
CHANGED
|
@@ -26,15 +26,9 @@
|
|
|
26
26
|
"PRECISION": 18,
|
|
27
27
|
"SCALE": 4
|
|
28
28
|
},
|
|
29
|
-
"SIDECAR": {
|
|
30
|
-
"DISABLED": true,
|
|
31
|
-
"HOST": "localhost",
|
|
32
|
-
"PORT": 5678,
|
|
33
|
-
"CONNECT_TIMEOUT": 45000,
|
|
34
|
-
"RECONNECT_INTERVAL": 5000
|
|
35
|
-
},
|
|
36
29
|
"MONGODB": {
|
|
37
|
-
"DISABLED":
|
|
30
|
+
"DISABLED": true,
|
|
31
|
+
"DEBUG": false,
|
|
38
32
|
"URI": "mongodb://localhost:27017/mlos"
|
|
39
33
|
},
|
|
40
34
|
"ERROR_HANDLING": {
|
|
@@ -46,11 +40,6 @@
|
|
|
46
40
|
"API": {
|
|
47
41
|
"DISABLED": false
|
|
48
42
|
},
|
|
49
|
-
"CRON": {
|
|
50
|
-
"DISABLED": false,
|
|
51
|
-
"TIMEXP": "*/10 * * * * *",
|
|
52
|
-
"TIMEZONE": "UTC"
|
|
53
|
-
},
|
|
54
43
|
"TIMEOUT": {
|
|
55
44
|
"DISABLED": false,
|
|
56
45
|
"TIMEXP": "*/15 * * * * *",
|
|
@@ -83,11 +72,13 @@
|
|
|
83
72
|
]
|
|
84
73
|
},
|
|
85
74
|
"INTERNAL_TRANSFER_VALIDITY_SECONDS": "432000",
|
|
75
|
+
"ENABLE_ON_US_TRANSFERS": false,
|
|
86
76
|
"CACHE": {
|
|
87
77
|
"CACHE_ENABLED": false,
|
|
88
78
|
"MAX_BYTE_SIZE": 10000000,
|
|
89
79
|
"EXPIRES_IN_MS": 1000
|
|
90
80
|
},
|
|
81
|
+
"API_DOC_ENDPOINTS_ENABLED": true,
|
|
91
82
|
"KAFKA": {
|
|
92
83
|
"TOPIC_TEMPLATES": {
|
|
93
84
|
"PARTICIPANT_TOPIC_TEMPLATE": {
|
|
@@ -117,7 +108,8 @@
|
|
|
117
108
|
"client.id": "cl-con-bulk-prepare",
|
|
118
109
|
"group.id": "cl-group-bulk-prepare",
|
|
119
110
|
"metadata.broker.list": "localhost:9092",
|
|
120
|
-
"socket.keepalive.enable": true
|
|
111
|
+
"socket.keepalive.enable": true,
|
|
112
|
+
"allow.auto.create.topics": true
|
|
121
113
|
},
|
|
122
114
|
"topicConf": {
|
|
123
115
|
"auto.offset.reset": "earliest"
|
|
@@ -140,7 +132,8 @@
|
|
|
140
132
|
"client.id": "cl-con-bulk-processing",
|
|
141
133
|
"group.id": "cl-group-bulk-processing",
|
|
142
134
|
"metadata.broker.list": "localhost:9092",
|
|
143
|
-
"socket.keepalive.enable": true
|
|
135
|
+
"socket.keepalive.enable": true,
|
|
136
|
+
"allow.auto.create.topics": true
|
|
144
137
|
},
|
|
145
138
|
"topicConf": {
|
|
146
139
|
"auto.offset.reset": "earliest"
|
|
@@ -163,7 +156,32 @@
|
|
|
163
156
|
"client.id": "cl-con-bulk-fulfil",
|
|
164
157
|
"group.id": "cl-group-bulk-fulfil",
|
|
165
158
|
"metadata.broker.list": "localhost:9092",
|
|
166
|
-
"socket.keepalive.enable": true
|
|
159
|
+
"socket.keepalive.enable": true,
|
|
160
|
+
"allow.auto.create.topics": true
|
|
161
|
+
},
|
|
162
|
+
"topicConf": {
|
|
163
|
+
"auto.offset.reset": "earliest"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"GET": {
|
|
168
|
+
"config": {
|
|
169
|
+
"options": {
|
|
170
|
+
"mode": 2,
|
|
171
|
+
"batchSize": 1,
|
|
172
|
+
"pollFrequency": 10,
|
|
173
|
+
"recursiveTimeout": 100,
|
|
174
|
+
"messageCharset": "utf8",
|
|
175
|
+
"messageAsJSON": true,
|
|
176
|
+
"sync": true,
|
|
177
|
+
"consumeTimeout": 1000
|
|
178
|
+
},
|
|
179
|
+
"rdkafkaConf": {
|
|
180
|
+
"client.id": "cl-con-bulk-get",
|
|
181
|
+
"group.id": "cl-group-bulk-get",
|
|
182
|
+
"metadata.broker.list": "localhost:9092",
|
|
183
|
+
"socket.keepalive.enable": true,
|
|
184
|
+
"allow.auto.create.topics": true
|
|
167
185
|
},
|
|
168
186
|
"topicConf": {
|
|
169
187
|
"auto.offset.reset": "earliest"
|
|
@@ -188,7 +206,8 @@
|
|
|
188
206
|
"client.id": "cl-con-transfer-prepare",
|
|
189
207
|
"group.id": "cl-group-transfer-prepare",
|
|
190
208
|
"metadata.broker.list": "localhost:9092",
|
|
191
|
-
"socket.keepalive.enable": true
|
|
209
|
+
"socket.keepalive.enable": true,
|
|
210
|
+
"allow.auto.create.topics": true
|
|
192
211
|
},
|
|
193
212
|
"topicConf": {
|
|
194
213
|
"auto.offset.reset": "earliest"
|
|
@@ -211,7 +230,8 @@
|
|
|
211
230
|
"client.id": "cl-con-transfer-get",
|
|
212
231
|
"group.id": "cl-group-transfer-get",
|
|
213
232
|
"metadata.broker.list": "localhost:9092",
|
|
214
|
-
"socket.keepalive.enable": true
|
|
233
|
+
"socket.keepalive.enable": true,
|
|
234
|
+
"allow.auto.create.topics": true
|
|
215
235
|
},
|
|
216
236
|
"topicConf": {
|
|
217
237
|
"auto.offset.reset": "earliest"
|
|
@@ -234,7 +254,8 @@
|
|
|
234
254
|
"client.id": "cl-con-transfer-fulfil",
|
|
235
255
|
"group.id": "cl-group-transfer-fulfil",
|
|
236
256
|
"metadata.broker.list": "localhost:9092",
|
|
237
|
-
"socket.keepalive.enable": true
|
|
257
|
+
"socket.keepalive.enable": true,
|
|
258
|
+
"allow.auto.create.topics": true
|
|
238
259
|
},
|
|
239
260
|
"topicConf": {
|
|
240
261
|
"auto.offset.reset": "earliest"
|
|
@@ -257,7 +278,8 @@
|
|
|
257
278
|
"client.id": "cl-con-transfer-position",
|
|
258
279
|
"group.id": "cl-group-transfer-position",
|
|
259
280
|
"metadata.broker.list": "localhost:9092",
|
|
260
|
-
"socket.keepalive.enable": true
|
|
281
|
+
"socket.keepalive.enable": true,
|
|
282
|
+
"allow.auto.create.topics": true
|
|
261
283
|
},
|
|
262
284
|
"topicConf": {
|
|
263
285
|
"auto.offset.reset": "earliest"
|
|
@@ -282,7 +304,34 @@
|
|
|
282
304
|
"client.id": "cl-con-transfer-admin",
|
|
283
305
|
"group.id": "cl-group-transfer-admin",
|
|
284
306
|
"metadata.broker.list": "localhost:9092",
|
|
285
|
-
"socket.keepalive.enable": true
|
|
307
|
+
"socket.keepalive.enable": true,
|
|
308
|
+
"allow.auto.create.topics": true
|
|
309
|
+
},
|
|
310
|
+
"topicConf": {
|
|
311
|
+
"auto.offset.reset": "earliest"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"NOTIFICATION": {
|
|
317
|
+
"EVENT": {
|
|
318
|
+
"config": {
|
|
319
|
+
"options": {
|
|
320
|
+
"mode": 2,
|
|
321
|
+
"batchSize": 1,
|
|
322
|
+
"pollFrequency": 10,
|
|
323
|
+
"recursiveTimeout": 100,
|
|
324
|
+
"messageCharset": "utf8",
|
|
325
|
+
"messageAsJSON": true,
|
|
326
|
+
"sync": true,
|
|
327
|
+
"consumeTimeout": 1000
|
|
328
|
+
},
|
|
329
|
+
"rdkafkaConf": {
|
|
330
|
+
"client.id": "TESTONLY",
|
|
331
|
+
"group.id": "TESTONLY",
|
|
332
|
+
"metadata.broker.list": "localhost:9092",
|
|
333
|
+
"socket.keepalive.enable": true,
|
|
334
|
+
"allow.auto.create.topics": true
|
|
286
335
|
},
|
|
287
336
|
"topicConf": {
|
|
288
337
|
"auto.offset.reset": "earliest"
|
|
@@ -307,7 +356,8 @@
|
|
|
307
356
|
"queue.buffering.max.messages": 10000000
|
|
308
357
|
},
|
|
309
358
|
"topicConf": {
|
|
310
|
-
"request.required.acks": "all"
|
|
359
|
+
"request.required.acks": "all",
|
|
360
|
+
"partitioner": "murmur2_random"
|
|
311
361
|
}
|
|
312
362
|
}
|
|
313
363
|
}
|
|
@@ -327,7 +377,8 @@
|
|
|
327
377
|
"queue.buffering.max.messages": 10000000
|
|
328
378
|
},
|
|
329
379
|
"topicConf": {
|
|
330
|
-
"request.required.acks": "all"
|
|
380
|
+
"request.required.acks": "all",
|
|
381
|
+
"partitioner": "murmur2_random"
|
|
331
382
|
}
|
|
332
383
|
}
|
|
333
384
|
},
|
|
@@ -345,7 +396,8 @@
|
|
|
345
396
|
"queue.buffering.max.messages": 10000000
|
|
346
397
|
},
|
|
347
398
|
"topicConf": {
|
|
348
|
-
"request.required.acks": "all"
|
|
399
|
+
"request.required.acks": "all",
|
|
400
|
+
"partitioner": "murmur2_random"
|
|
349
401
|
}
|
|
350
402
|
}
|
|
351
403
|
},
|
|
@@ -363,7 +415,8 @@
|
|
|
363
415
|
"queue.buffering.max.messages": 10000000
|
|
364
416
|
},
|
|
365
417
|
"topicConf": {
|
|
366
|
-
"request.required.acks": "all"
|
|
418
|
+
"request.required.acks": "all",
|
|
419
|
+
"partitioner": "murmur2_random"
|
|
367
420
|
}
|
|
368
421
|
}
|
|
369
422
|
}
|
|
@@ -383,7 +436,8 @@
|
|
|
383
436
|
"queue.buffering.max.messages": 10000000
|
|
384
437
|
},
|
|
385
438
|
"topicConf": {
|
|
386
|
-
"request.required.acks": "all"
|
|
439
|
+
"request.required.acks": "all",
|
|
440
|
+
"partitioner": "murmur2_random"
|
|
387
441
|
}
|
|
388
442
|
}
|
|
389
443
|
}
|
|
@@ -403,7 +457,8 @@
|
|
|
403
457
|
"queue.buffering.max.messages": 10000000
|
|
404
458
|
},
|
|
405
459
|
"topicConf": {
|
|
406
|
-
"request.required.acks": "all"
|
|
460
|
+
"request.required.acks": "all",
|
|
461
|
+
"partitioner": "murmur2_random"
|
|
407
462
|
}
|
|
408
463
|
}
|
|
409
464
|
}
|