Code Monkey home page Code Monkey logo

ministero-salute / it-dgc-verifier-service Goto Github PK

View Code? Open in Web Editor NEW
10.0 8.0 1.0 225 KB

The EU Digital COVID Certificate Verifier Service is part of the national backends and caches the public keys that are distributed through the DGCG. It is accessed by the Verifier Apps to update the key store periodically.

License: GNU Affero General Public License v3.0

Dockerfile 0.44% Java 99.56%
covid-19 java backend-service digital-covid-certificate

it-dgc-verifier-service's Introduction

EU Digital COVID Certificate Verifier Service


Table of contents

Context

This repository contains the source code of the EU Digital COVID Certificate Verifier Service.

The Verifier Service is part of the national backends and caches the public keys that are distributed through the DGCG. It is accessed by the Verifier Apps (Android, iOS) to update the key store periodically.

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 [email protected]:ministero-salute/it-dgc-verifier-service.git
cd it-dgc-verifier-service
mvn clean package 

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

mkdir -p it-dgc-verifier-service/config
cp ./src/main/resources/application.properties ./it-dgc-verifier-service/config

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

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:

  • spring data mongo. A libray which provides integration with the MongoDB document database. Key functional areas of Spring Data MongoDB are a POJO centric model for interacting with a MongoDB DBCollection and easily writing a Repository style data access layer. Released as an open-source project under the Apache 2.0 licence.
  • Lombok. A Java library tool that generates code for minimizing boilerplate code. The library replaces boilerplate code with easy-to-use annotations.For example, by adding a couple of annotations, you can get rid of code clutters, such as getters and setters methods, constructors, hashcode, equals, and toString methods, and so on. Lombok is an open-source project released under the MIT licence.
  • springdoc-openapi. A library that helps automating the generation of API documentation using spring boot projects. Springdoc-openapi works by examining an application at runtime to infer API semantics based on spring configurations, class structure and various annotations. Released as an open-source project under the Apache 2.0 licence.
  • JaCoCo. A Maven plug-in that provides the JaCoCo runtime agent to your tests and allows basic report creation. JaCoCo is released as an open-source project under the EPL 2.0 licence.
  • junit4. A simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. Junit4 is released as an open-source project under Eclipse Public License 1.0.

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.

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.

it-dgc-verifier-service's People

Contributors

alfo1995 avatar astagi avatar gnfrisicaro avatar grausof avatar it-eucert-team avatar matteobaccan avatar mnelli19 avatar sebbalex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lysz210

it-dgc-verifier-service's Issues

Aggiungere il server mongo-db nel docker-compose

Avere anche il server mongo-db all'interno del docker-compose semplificherebbe lo sviluppo in locale.
Nel caso non fosse possibile aggiungere direttamente nel docker-compose.yml se puo' preparne un'altro da usare insieme.
docker-compose -c docker-compose.yml -c docker-compose-mongodb.yml.
La gestione del host puo' essere fatto con un file .env che viene riconosciuto automaticamente dal comando link

[BUG] Newer UK kids are missing with data returned from `signercertificate/status`

Describe the bug

Calling https://get.dgc.gov.it/v1/dgc/signercertificate/status successfully returns kids but it does not include newer kids (4 certs as of 14 September) from the UK. Older kids correctly exist. [Please let me know if this issue should be reported elsewhere — I assume the latest data from https://covid-status.service.nhsx.nhs.uk/pubkeys/keys.json is not being populated]

To Reproduce

  1. Go to https://get.dgc.gov.it/v1/dgc/signercertificate/status
  2. Then go to https://covid-status.service.nhsx.nhs.uk/pubkeys/keys.json for latest UK certs
  3. Compare. The last 4 kids are missing (from c3ByZGtleTE=). Also checked against recently generated UK QR codes and confirmed that they aren't being validated.

Expected behaviour

The returned data from /status should include latest UK kids and newer UK QR codes should be correctly validated.

Screenshots

Nothing specific, the repro steps above should be clear. Happy to provide more information.

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.