OpenBankingToolkit / openbanking-reference-implementation

ForgeRock OpenBanking Reference Implementation is an example of how you can bundle all the micro-services together to create an Open Banking eco-system
Apache License 2.0
7 stars 4 forks source link

Docker-compose: Be able run all services with simulated default forgerock credentials #410

Closed jsanhc closed 3 years ago

jsanhc commented 3 years ago

Story

As a customer of the OB Toolkit I want to be able to run all services in a local environment using docker-compose without worrying about setting credentials protected and managed by forgerock So that I am able to test the platform in a local environment

Acceptance criteria

Feature History

To protect the statement resources we store these resources on a bucket in GCP and now the aspsp - StatementPDFService implements the access to the GCP bucket to get the statement resource. This feature makes mandatory set the gcp credentials in local when the customer or team member want run the services on local environment.

Tasks

Functional Test that will return 404 - Not found when using simulated default values

Release Notes

Affected App: rs-store

jsanhc commented 3 years ago

Problem

In the docker-compose file the service rs-store currently use a volume to access the GCP credentials set in the environment:

rs-store:
...
...
volumes:
    - ${GCP_CREDENTIALS}:/opt/ob/config/gcp-credentials.json:ro

When this variable is unset in the environment the docker compose set the value to empty string and will get the error docker Cannot create container for service rs-store create volume name is too short, names should be at least two alphanumeric characters. The credentials are only accessible for forgerock team members and this will created some limitations for customers when they want run all services on a local environment.

Solution

Set a simulated default credentials value when the variable GCP_CREDENTIALS is unset in the environment like below:

rs-store:
...
...
volumes:
    - ${GCP_CREDENTIALS:-./gcp-credentials.json}:/opt/ob/config/gcp-credentials.json:ro