From 0e8280e3d6a8492b81f8fda42ae1e5b8942011fe Mon Sep 17 00:00:00 2001 From: Alexander Schwarz Date: Mon, 27 Sep 2021 11:13:00 +0200 Subject: [PATCH] update readme --- README.md | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7d81b43..7fbfcc7 100644 --- a/README.md +++ b/README.md @@ -30,23 +30,55 @@ This repository contains the source code of the EU Digital COVID Certificate Validation Decorator. -The Validation Decorator is a template. To make your own adjustments, the three interfaces `KeyProvider`, `BackendRepository` and `AccessTokenPayloadBuilder` should be implemented. +The Validation Decorator is an interface between the [validation service](https://github.com/eu-digital-green-certificates/dgca-validation-service) and an internal [backend system](https://github.com/eu-digital-green-certificates/dgca-booking-demo-backend) (demo) for the exchange of digital covid certificate information. + +The validation has complex work flow that involves -- [ ] TODO: Describe Component +- [dgca-validation-service](https://github.com/eu-digital-green-certificates/dgca-validation-service) - additional service on travel system +- [dgca-booking-demo](https://github.com/eu-digital-green-certificates/dgca-booking-demo) - travel system mock +- [dgca-booking-demo-frontend](https://github.com/eu-digital-green-certificates/dgca-booking-demo-frontend) +- [dgca-verifier-app-android](https://github.com/eu-digital-green-certificates/dgca-verifier-app-android) - provide dcc +- [dgca-booking-demo-backend](https://github.com/eu-digital-green-certificates/dgca-booking-demo-backend) ## Development ### Prerequisites -- [ ] TODO: Prerequisites +- [Open JDK 11](https://openjdk.java.net) +- [Maven](https://maven.apache.org) +- [Docker](https://www.docker.com) +- Authenticate to [Github Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry) + +#### Authenticating in to GitHub Packages + +As some of the required libraries (and/or versions are pinned/available only from GitHub Packages) You need to authenticate +to [GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry) +The following steps need to be followed + +- Create [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with scopes: + - `read:packages` for downloading packages + +#### GitHub Maven + +- Copy/Augment `~/.m2/settings.xml` with the contents of `settings.xml` present in this repository + - Replace `${app.packages.username}` with your github username + - Replace `${app.packages.password}` with the generated PAT ### Build -- [ ] TODO: Build +- Run `docker login docker.pkg.github.com/eu-digital-green-certificates` before running further docker commands. + - Use your GitHub username as username + - Use the generated PAT as password ## Documentation -- [ ] TODO: Documentation +The Validation Decorator is a template. To make your own adjustments, the three interfaces `KeyProvider`, `BackendRepository` and `AccessTokenPayloadBuilder` should be implemented. + +`KeyProvider` provides the necessary keys and certificates. Separate keys for JWT, certificates for Validation Service and others are provided. + +`BackendRepository` provides the interface to the internal service. In this example [dgca-booking-demo-backend](https://github.com/eu-digital-green-certificates/dgca-booking-demo-backend) is connected and should demonstrate an airline. + +`AccessTokenPayloadBuilder` basically serves as a converter to create the `AccessTokenPayload` from the given data. ## Support and feedback