Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 3.13 KB

File metadata and controls

90 lines (62 loc) · 3.13 KB

Security BC - Authorization Service

Git Commit Git Releases Npm Version NPM Vulnerabilities CircleCI

Mojaloop vNext Authorization Service

#Notes

How to create RSA private and public keys without password

These keys should be injected to the authorization-svc, or at this early stage put in the test_keys directory

Create an RSA certificate

openssl genrsa -out private.pem 2048

Extract public certificate from private certificate

openssl rsa -pubout -in private.pem -out public.pem


Install

See nodes in root dir of this repository

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

Build

npm run build

Auto build (watch)

npm run watch

Unit Tests

npm run test:unit

Run

npm run start

Docker build

npm run docker:build

Docker run (dev env)

# example using a local authZ_TempStorageFile a custom KAFKA_URL
docker run -ti --rm -p 3202:3202 \
  --name mojaloop_security-bc-authorization-svc \
  -v $(pwd)/packages/authorization-svc/dist/authZ_TempStorageFile:/app/data/authZ_TempStorageFile \
  -e KAFKA_URL=192.168.1.103:9092 mojaloop/security-bc-authorization-svc

#to run as daemon replace "-ti --rm" with "-d"

Configuration

Environment variables

Environment Variable Description Example Values
PRODUCTION_MODE Flag indicating production mode FALSE
LOG_LEVEL Logging level for the application LogLevel.DEBUG
AUTH_N_SVC_BASEURL Authentication service base URL http://localhost:3201
AUTH_N_TOKEN_ISSUER_NAME Authentication service token issuer name mojaloop.vnext.dev.default_issuer
AUTH_N_TOKEN_AUDIENCE Authentication service token audience mojaloop.vnext.dev.default_audience
AUTH_N_SVC_JWKS_URL Authentication service base URL ${AUTH_N_SVC_BASEURL}/.well-known/jwks.json
AUTH_Z_SVC_BASEURL Authorization service base URL http://authorization-svc:3202
KAFKA_URL Kafka broker URL localhost:9092
MONGO_URL MongoDB connection URL mongodb://root:mongoDbPas42@localhost:27017/
KAFKA_LOGS_TOPIC Kafka topic for logs logs
SVC_DEFAULT_HTTP_PORT Default HTTP port for the service 3202