Closed jsanhc closed 2 years ago
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:
# default value in aspsp/rs-store/StatementPDFService -> account/statements/default/fr-statement.pdf
statement:
resource:
file:
path: account/statements/${customer-folder}/${statement-pdf-file}~~
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:
ob-sandbox-storage
, the file must be a pdf.application.yml
gcp-storage:
project-id: ${projectId}
statements:
bucket-name: ${bucket-name}
resource: ${resource-path-file}
ob-gcr.json
:
ob-gcr.json
from ob-ci-secrets
repository to your path.GCP_CREDENTIALS
in your local system pointed to ob-gcr.json
export GCP_CREDENTIALS=path/to/ob-gcr.json
Description
A PDF containing a statement file is file is loaded from the classpath and the path to find the pdf file is defined by the spring configuration profile name.
Currently the statement file is obtained based on the spring profile, which doesn't make sense.
References
Main issue: 23 ZD: 59248
Analysis
Tasks