ministero-salute / it-dgc-gateway-client

EU Digital COVID Certificate Gateway Client is part of the national backends and periodically downloads the public keys that are distributed through the DGCG.
GNU Affero General Public License v3.0
6 stars 2 forks source link
backend-service covid-19 digital-covid-certificate java

EU Digital COVID Certificate Gateway Client


java11 security: bandit

Table of contents

Context

This repository contains the source code of the EU Digital COVID Certificate Gateway Client.

The Gateway Client is part of the national backends and periodically downloads the public keys that are distributed through the DGCG. It is the only point of communication of the national backends with the European Gateway, also allowing the Member State to upload its national DSC (Document Signer Certificate) with which the digital certificates are signed.

Installation

Prerequisites

Maven based build

This is the recommended way for taking part in the development. Please check, whether following prerequisites are installed on your machine:

Build Docker Image

This project also supports building a Docker image. First ensure you have a MongoDB instance running locally on mongodb://127.0.0.1:27017, otherwise change the connection url in the test file: ./src/test/resources/application.properties.

To build the Docker image you first need to build the project from the root:

git clone git@github.com:ministero-salute/it-dgc-gateway-client.git
cd it-dgc-gateway-client
mvn clean package

Then, copy the file application.properties contained in the path ./src/main/resources into the ./it-dgc-gateway-client/config folder:

mkdir -p it-dgc-gateway-client/config
cp ./src/main/resources/application.properties ./it-dgc-gateway-client/config

You need also a security folder which must contain both an sslclient and a truststore directory:

mkdir -p security/sslclient
mkdir -p security/truststore

By default the docker image uses a local mongodb instance running on mongodb://127.0.0.1:27017, you can always change the connection url by editing the envar in the enviroment section of the docker-compose.yml:

environment:
    MONGO_DB_URI=mongodb://user:password@mongodb:27017/DGC-dev

Also you need the DGCG (Digital Green Certificate Gateway) server running locally, you can install it from the public repo Digital Green Certificate Gateway.

To properly work the client needs also:

Once the requirements above shown are satisfied open a shell with working directory and execute

docker-compose up --build

Dependencies

The project has been implemented in Java 11.

Maven is used for dependency management. Maven is a build manager tool and mostly used in java projects. Maven was built on a central concept of project object model (POM).

The pom.xml contains all necessary information about the project, as well as configurations of plugins to be used during the build process.

The backend services follow a micro-service architecture, where each critical functionality is deployed as its own component. Components are distributed in dedicated Docker images, Docker being an industry standard platform for the containerization and virtualization of software.

The following dependencies are used to implement the business logic:

Contributing

Contributions are most welcome. Before proceeding, please read the Code of Conduct for guidance on how to approach the community and create a positive environment. Additionally, please read our CONTRIBUTING file, which contains guidance on ensuring a smooth contribution process.

Contributors

Here is a list of repository contributors. Thank you to everyone involved for improving this project, day by day.

<img src="https://contributors-img.web.app/image?repo=ministero-salute/it-dgc-gateway-client" />

Licence

Authors and Copyright

Copyright 2021 (c) Ministero della Salute.

Please check the AUTHORS file for extended reference.

Third-party component licences

Licence details

The licence for this repository is a GNU Affero General Public Licence version 3 (SPDX: AGPL-3.0). Please see the LICENSE file for full reference.