OpenBankingToolkit / openbanking-toolkit

Root repository of the openbanking toolkit. Pointing to other repos and providing you the doc
Apache License 2.0
7 stars 0 forks source link

GetAccountStatementFile: Resource pdf statement file not found using the spring profile #28

Closed jsanhc closed 2 years ago

jsanhc commented 3 years ago

Description

References

Main issue: 23 ZD: 59248

Analysis

Tasks

jsanhc commented 3 years ago

Solution

Improvements on aspsp - StatementPDFService to consume the property value rs-store.statement.resource.file.path from config service that have set the path value where lives the statement resource file to avoid use the spring profiles.

The default value for the statement resource file is account/statements/default/fr-statement.pdf that lives in rs-store classpath, this file is a simple pdf with Forgerock logo and few text lines to identify it as a default sandbox statement pdf file.

To set a specific statement resource file for a customer will be necessary follow the below steps: - 1: Add the pdf file in reference-implementation/aspsp/aspsp-rs/rs-store/resources/unfiltered/account/statements/${customer-folder}/${statement-pdf-file} - 2: Override the default values in spring config properties for that customer: ~~rs-store:

the path to find the statement pdf file issue: https://github.com/OpenBankingToolkit/openbanking-toolkit/issues/28

  # default value in aspsp/rs-store/StatementPDFService -> account/statements/default/fr-statement.pdf
  statement:
    resource:
      file:
        path:  account/statements/${customer-folder}/${statement-pdf-file}~~
jsanhc commented 3 years ago

Solution

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.

To configure a new statement resource file, instead of use the default, follow the below steps: