Note: Before completing this guide, make sure you have completed the general onboarding guide in the base mojaloop repository.
If you have followed the general onboarding guide, you should already have the following cli tools installed:
brew
(macOS), [todo: windows package manager]curl
,wget
docker
+docker-compose
node
,npm
and (optionally)nvm
The Security BC consists of the following packages;
authentication-svc
Authentication Service.
README
authorization-svc
Authorization Service.
README
builtin-identity-svc
Builtin Identity Service.
README
client-lib
Client library types.
README
public-types-lib
Security BC Public Types.
README
Firstly, clone your fork of the security-bc
onto your local machine:
git clone https://github.com/<your_username>/security-bc.git
Then cd
into the directory and install the node modules:
cd security-bc
More information on how to install NVM: https://github.com/nvm-sh/nvm
nvm install
nvm use
npm install
npm run build
In this method, we will run all of the core dependencies inside of docker containers, while running the security-bc
server on your local machine.
Alternatively, you can run the
security-bc
inside ofdocker-compose
with the rest of the dependencies to make the setup a little easier: Running Inside Docker.
Use platform-shared-tools docker-compose files:
Follow instructions in the README.md
files to run the supporting services. Make sure you have the following services up and running:
- infra services : docker-compose-infra
- mongo
- kafka
- zoo
This will do the following:
docker pull
down any dependencies defined in eachdocker-compose.yml
file, and the services.- run all of the containers together
- ensure that all dependencies have started for each services.
# set the MONGO_URL* environment variable (required):
export MONGO_URL=mongodb://root:mongoDbPas42@localhost:27017/";
# set the AUDIT_KEY_FILE_PATH
export AUDIT_KEY_FILE_PATH=./dist/auditing_cert
See the README.md file on each services for more Environment Variable Configuration options.
We use npm
scripts as a common entrypoint for running the tests. Tests include unit, functional, and integration.
# unit tests:
npm run test:unit
# check test coverage
npm run test:coverage
# integration tests
npm run test:integration
Here you can find a complete Postman collection, in a json file, ready to be imported to Postman.
To run those services locally, you need to pass 2 env vars like this (executed in packages/authentication-svc):
export PRIVATE_CERT_PEM_FILE_PATH=test_keys/private.pem
export IAM_STORAGE_FILE_PATH=dist/authN_TempStorageFile
error:25066067:DSO support routines:dlfcn_load:could not load the shared library
Fix: https://github.com/mojaloop/security-bc.git export OPENSSL_CONF=/dev/null