Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to support story #1059 #16

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
version: '3'
services:
redis:
image: "redis:5.0.4-alpine"
sim:
image: "mojaloop-simulator-backend"
build: ../
env_file: ./sim-backend.env
ports:
- "3000:3000"
- "3001:3001"
- "3003:3003"
depends_on:
- scheme-adapter
scheme-adapter:
image: "mojaloop/sdk-scheme-adapter:latest"
env_file: ./scheme-adapter.env
ports:
- "3500:3000"
- "3501:4000"
depends_on:
- redis
redis:
container_name: redis
image: "redis:5.0.4-alpine"
sim:
container_name: sim
image: "mojaloop-simulator-backend"
build: ../
env_file: ./sim-backend.env
ports:
- "3000:3000"
- "3001:3001"
- "3003:3003"
depends_on:
- scheme-adapter
scheme-adapter:
container_name: scheme-adapter
image: "mojaloop/sdk-scheme-adapter:latest"
env_file: ./scheme-adapter.env
ports:
- "3500:3000"
- "3501:4000"
depends_on:
- redis
68 changes: 62 additions & 6 deletions src/scheme-adapter.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,23 @@ OUTBOUND_LISTEN_PORT=4001
# environment, i.e. when you're running it locally against your own implementation.
MUTUAL_TLS_ENABLED=false

# Enable verification or incoming JWS signatures
# Note that signatures will be required on incoming messages
# and will be validated against a public key.
VALIDATE_INBOUND_JWS=false

# applicable only if VALIDATE_INBOUND_JWS is "true"
# allows disabling of validation on incoming PUT /parties/{idType}/{idValue} requests
VALIDATE_INBOUND_PUT_PARTIES_JWS=false

# Enable JWS verification and signing
VALIDATE_INBOUND_JWS=false
JWS_SIGN=true

# applicable only if JWS_SIGN is "true"
# allows disabling of signing on outgoing PUT /parties/{idType}/{idValue} requests
JWS_SIGN_PUT_PARTIES=false

# Path to JWS signing key (private key of THIS DFSP)
JWS_SIGNING_KEY_PATH=/jwsSigningKey.key
JWS_VERIFICATION_KEYS_DIRECTORY=/jwsVerificationKeys
Expand All @@ -31,20 +44,26 @@ OUT_CLIENT_KEY_PATH=./secrets/serverkey.pem
# will each be printed on a single line.
LOG_INDENT=0

# The DFSPID of this simulator. The simulator will accept any requests routed to
# FSPIOP-Destination: $DFSP_ID. Other requests will be rejected.
DFSP_ID=payeefsp

# REDIS cache connection
CACHE_HOST=redis
CACHE_PORT=6379

# Switch or DFSP system under test Mojaloop API endpoint
PEER_ENDPOINT=172.21.0.5:4000
# SWITCH ENDPOINT - Switch or DFSP system under test Mojaloop API endpoint
# The option 'PEER_ENDPOINT' has no effect if the remaining three options 'ALS_ENDPOINT', 'QUOTES_ENDPOINT', 'TRANSFERS_ENDPOINT' are specified.
PEER_ENDPOINT=api-gateway.local:4000

# Common Account Lookup System (ALS)
# ALS_ENDPOINT=account-lookup-service.local
# QUOTES_ENDPOINT=quoting-service.local
# TRANSFERS_ENDPOINT=ml-api-adapter.local

# Simulator backend container endpoint
BACKEND_ENDPOINT=sim:3000

# The DFSPID of this simulator. The simulator will accept any requests routed to
# FSPIOP-Destination: $DFSP_ID. Other requests will be rejected.
DFSP_ID=payeefsp

# Secret used for generation and verification of secure ILP
ILP_SECRET=Quaixohyaesahju3thivuiChai5cahng

Expand All @@ -56,8 +75,45 @@ EXPIRY_SECONDS=60
# confirmation call will be required to complete the final transfer stage.
AUTO_ACCEPT_QUOTES=false

# if set to false the SDK will not automatically accept a resolved party
# but will halt the transer after a party lookup response is received. A further
# cnofirmation call will be required to progress the transfer to quotes state.
AUTO_ACCEPT_PARTY=false

# when set to true, when sending money via the outbound API, the SDK will use the value
# of FSPIOP-Source header from the received quote response as the payeeFsp value in the
# transfer prepare request body instead of the value received in the payee party lookup.
# This behaviour should be enabled when the SDK user DFSP is in a forex enabled switch
# ecosystem and expects quotes and transfers to be rerouted by the switch to forex
# entities i.e. forex providing DFSPs. Please see the SDK documentation and switch
# operator documentation for more information on forex use cases.
USE_QUOTE_SOURCE_FSP_AS_TRANSFER_PAYEE_FSP=false

# set to true to validate ILP, otherwise false to ignore ILP
CHECK_ILP=true

# set to true to enable test features such as request cacheing and retrieval endpoints
ENABLE_TEST_FEATURES=true

# set to true to mock WSO2 oauth2 token endpoint
ENABLE_OAUTH_TOKEN_ENDPOINT=false
OAUTH_TOKEN_ENDPOINT_CLIENT_KEY=test-client-key
OAUTH_TOKEN_ENDPOINT_CLIENT_SECRET=test-client-secret
OAUTH_TOKEN_ENDPOINT_LISTEN_PORT=6000

# WS02 Bearer Token specific to golden-fsp instance and environment
WS02_BEARER_TOKEN=7718fa9b-be13-3fe7-87f0-a12cf1628168

# OAuth2 data used to obtain WSO2 bearer token
OAUTH_TOKEN_ENDPOINT=
OAUTH_CLIENT_KEY=
OAUTH_CLIENT_SECRET=
OAUTH_REFRESH_SECONDS=3600

# Set to true to respect expirity timestamps
REJECT_EXPIRED_QUOTE_RESPONSES=false
REJECT_TRANSFERS_ON_EXPIRED_QUOTES=false
REJECT_EXPIRED_TRANSFER_FULFILS=false

# Timeout for GET/POST/DELETE - PUT flow processing
REQUEST_PROCESSING_TIMEOUT_SECONDS=30
2 changes: 1 addition & 1 deletion src/sim-backend.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DFSP_ID=golden
MODEL_DATABASE=./model.sqlite

# Outbound API endpoint (It might be a container in the compose file so remember the networking IP)
OUTBOUND_ENDPOINT=http://scheme-adapter-sim:4001
OUTBOUND_ENDPOINT=http://scheme-adapter:4001

# The simulator can automatically add fees when generating quote responses. Use this
# variable to control the fee amounts added. e.g. for a transfer of 100 USD a FEE_MULTIPLIER of 0.1
Expand Down