Coder Social home page Coder Social logo

elifraha / security-bc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mojaloop/security-bc

0.0 0.0 0.0 1.64 MB

**EXPERIMENTAL** vNext Security Mono Repository

License: Other

Shell 4.12% JavaScript 3.70% TypeScript 91.09% Dockerfile 1.09%

security-bc's Introduction

security-bc

EXPERIMENTAL vNext Security Bounded Context Mono Repository

See the Reference Architecture documentation security section for context on this vNext implementation guidelines

Modules

Authentication service link

Authentication client lib link

Usage

Install Node version

More information on how to install NVM: https://github.com/nvm-sh/nvm

nvm install
nvm use

Install Dependencies

npm install

Build

npm run build

Unit Tests

npm run test:unit

Run the services

Startup supporting services

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/):

  1. Create a sub-directory called exec inside the docker-compose-infra (this) directory, and navigate to that directory.
mkdir exec 
cd exec
  1. Create the following directories as sub-directories of the docker-compose/exec directory:
  • certs
  • esdata01
  • kibanadata
  • logs
mkdir {certs,esdata01,kibanadata,logs}
  1. Copy the .env.sample to the exec dir:
cp ../.env.sample ./.env
  1. Review the contents of the .env file

  2. Ensure vm.max_map_count is set to at least 262144: Example to apply property on live system:

sysctl -w vm.max_map_count=262144 # might require sudo

Start Infrastructure Containers

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

Integration Tests

npm run test:integration

Troubleshoot

Unable to load dlfcn_load

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

security-bc's People

Contributors

pedrosousabarreto avatar nikhilbabup avatar koekiebox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.