EXPERIMENTAL vNext Security Bounded Context Mono Repository
See the Reference Architecture documentation security section for context on this vNext implementation guidelines
Authentication service link
Authentication client lib link
More information on how to install NVM: https://github.com/nvm-sh/nvm
nvm install
nvm use
npm install
npm run build
npm run test:unit
Use https://github.com/mojaloop/platform-shared-tools/tree/main/packages/deployment/docker-compose-infra
To startup Kafka, MongoDB, Elasticsearch and Kibana, follow the steps below(executed in docker-compose-infra/):
- Create a sub-directory called
exec
inside thedocker-compose-infra
(this) directory, and navigate to that directory.
mkdir exec
cd exec
- Create the following directories as sub-directories of the
docker-compose/exec
directory:
certs
esdata01
kibanadata
logs
mkdir {certs,esdata01,kibanadata,logs}
- Copy the
.env.sample
to the exec dir:
cp ../.env.sample ./.env
-
Review the contents of the
.env
file -
Ensure
vm.max_map_count
is set to at least262144
: Example to apply property on live system:
sysctl -w vm.max_map_count=262144 # might require sudo
Start the docker containers using docker-compose up (in the exec dir)
docker-compose -f ../docker-compose-infra.yml --env-file ./.env up -d
To view the logs of the infrastructure containers, run:
docker-compose -f ../docker-compose-infra.yml --env-file ./.env logs -f
To stop the infrastructure containers, run:
docker-compose -f ../docker-compose-infra.yml --env-file ./.env stop
After running the docker-compose-infra we can start authentication and authorization services:
# start the authentication service
npm run start:authentication-svc
# start the authorization service
npm run start:authorization-svc
To run those services locally, you need to pass 2 env vars like this (executed in modules/authentication-svc):
export PRIVATE_CERT_PEM_FILE_PATH=test_keys/private.pem
export IAM_STORAGE_FILE_PATH=dist/authN_TempStorageFile
npm run test:integration
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