micro-service to support save and resume. The main purposes of this service are to support online HTML application process for PIP2 questionnaire.
the API stores and queries user's application details from a Mongo database. To be able to successfully start the application, the application must be able to connect to a Mongo instance at start up.
the api is built from the openapi-spec.yaml
this is a standard SpringBoot application with all the configuration items held in src/main/resources/application.yml
and bundled into the project at build.
mvn clean verify
to build and vulnerability check
sh run-local.sh #this includes some sample environment variable values to get the app running
or
mvn spring-boot:run
or
java -jar target/ms-application-manager-<artifactId>.jar
Run the following shell script to spin up the service in a docker environment
sh ./ms-application-manager.sh
Open another terminal window and run the following maven command to execute the tests locally
mvn clean verify -Papi-component-tests
All configuration listed in src/main/resources/application.yml
and follows the standard spring convention for yml file
notation.
The custom setup configured with the following section and can be overridden (either on the command line or by
environment variables).
app:
application:
active-duration: 93
encryption:
kms-override: http://localhost:4549
data-key: arn:address
feature:
encryption:
data:
enabled: true
app.application.active-duration
= the number of days a application is valid forencryption.kms-override
= override kms url e.g. http://localhost:4599encryption.data-key
= aws KMS arnfeature.encryption.data.enabled
= enable data encryption/decryption onBeforeSave and onAfterLoad event.pip.bank.validation.consumerId
= consumer ID for using bank validation servicepip.bank.validation.baseUrl
= base url of bank validation service
data plugin captures mongo change from a specific database triggered by a micro-service instance
<dependency>
<groupId>uk.gov.dwp.health</groupId>
<artifactId>mongo-changestream-data-stater</artifactId>
<version>${dwp-mongo-change-stream-starter.version}</version>
</dependency>
message broker publishes change to a designated queue
<dependency>
<groupId>uk.gov.dwp.health.integration</groupId>
<artifactId>message-broker-integration-autoconfigure</artifactId>
<version>${dwp.message-broker.version}</version>
</dependency>
- FEATURE_DATA_CHANGESTREAM_ENABLED=true
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_COLLECTION=application
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_ROUTING_KEY=pip.application.mgr.stream
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_DATABASE=pip-apply-application-mgr
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_SKIP_DECRYPTION=true
- UK_GOV_DWP_HEALTH_INTEGRATION_OUTBOUND_TOPIC_EXCHANGE=stream-topic
- UK_GOV_DWP_HEALTH_INTEGRATION_SNS_ENDPOINT_OVERRIDE=http://localstack:4566
- UK_GOV_DWP_HEALTH_INTEGRATION_SQS_ENDPOINT_OVERRIDE=http://localstack:4566
- UK_GOV_DWP_HEALTH_INTEGRATION_AWS_REGION=us-east-1
- UK_GOV_DWP_HEALTH_INTEGRATION_MESSAGING_TYPE=aws
The docker image built on the distroless base image
PUBLISHED(0),// published waiting for pipcs-gw rely on response back SUBMITTED(1),// response received - pipcs accepted REJECTED(-1), // response received - situation where validation failed no retry DECISION_MADE(-1), // response received - final state rejected DISALLOW(-1); // response received - final state rejected