All Projects → admin-ch → CovidCode-Service

admin-ch / CovidCode-Service

Licence: MIT license
CovidCode service is an authorization code generation service for the CovidCode-UI.

Programming Languages

java
68154 projects - #9 most used programming language
PLpgSQL
1095 projects

Projects that are alternatives of or similar to CovidCode-Service

HRMS
░▒▓█ 𝑯𝒖𝒎𝒂𝒏 𝑹𝒆𝒔𝒐𝒖𝒓𝒄𝒆𝒔 𝑴𝒂𝒏𝒂𝒈𝒆𝒎𝒆𝒏𝒕 𝑺𝒚𝒔𝒕𝒆𝒎 𝑷𝒓𝒐𝒋𝒆𝒄𝒕 █▓▒░
Stars: ✭ 33 (+175%)
Mutual labels:  lombok, postgresql-database
mySequelWeb
MySequel Web is an open source web based GUI tool to access your MySql database. It is similar to PHP My Admin of WAMP. Here you can access any MySQL database with proper connection strings. We do not save or store any of your connection strings or data. Every thing related to your connection strings are volatile. You can host this as a simple n…
Stars: ✭ 26 (+116.67%)
Mutual labels:  postgresql-database
embedded-postgres-binaries
Lightweight bundles of PostgreSQL binaries with reduced size intended for testing purposes.
Stars: ✭ 67 (+458.33%)
Mutual labels:  postgresql-database
vo2dto
💱 IDEA 插件,解决对象转换问题。选定对象批量织入“x.set(y.get)”代码,帮助开发者自动生成vo2dto转换代码。
Stars: ✭ 74 (+516.67%)
Mutual labels:  lombok
symbok-bundle
Symfony annotations bundle
Stars: ✭ 50 (+316.67%)
Mutual labels:  lombok
djprojman
A project management tool in django. Intents to be a simple quick tool for manaing projects, tasks and team, most suitable for small companies.
Stars: ✭ 40 (+233.33%)
Mutual labels:  postgresql-database
apt
Java Annotation Processor Tool,动态生成getter/setter方法(像Lombok一样)。
Stars: ✭ 28 (+133.33%)
Mutual labels:  lombok
aspnet-core-vuejs-template
ASP.NET Core / Vue.js SPA Template App
Stars: ✭ 75 (+525%)
Mutual labels:  postgresql-database
spotifyApiSpring
Spring-boot MVC application consuming Spotify's REST API
Stars: ✭ 28 (+133.33%)
Mutual labels:  lombok
kanban-board
Single-click full-stack application (Postgres, Spring Boot & Angular) using Docker Compose
Stars: ✭ 138 (+1050%)
Mutual labels:  postgresql-database
Pisces
Pisces is a time series database, desktop application, command line tool, and webapp. Pisces is designed to organize, graph, and analyze natural resource data that varies with time: gauge height, river flow, water temperature, etc.
Stars: ✭ 35 (+191.67%)
Mutual labels:  postgresql-database
mytek
Django e-commerce web application with advanced features
Stars: ✭ 27 (+125%)
Mutual labels:  postgresql-database
ercole-agent
Proactive Software Asset Management. Agent component
Stars: ✭ 24 (+100%)
Mutual labels:  postgresql-database
hrisey
Hrisey - boilerplate code suppressor tool for Android platform
Stars: ✭ 148 (+1133.33%)
Mutual labels:  lombok
simplehstore
🏪 Easy way to use a PostgreSQL database (and the HSTORE feature) from Go
Stars: ✭ 54 (+350%)
Mutual labels:  postgresql-database
Library-Spring
The library web application where you can borrow books. It's Spring MVC and Hibernate project.
Stars: ✭ 73 (+508.33%)
Mutual labels:  lombok
mock-data
Mock data in PostgreSQL/Greenplum databases
Stars: ✭ 115 (+858.33%)
Mutual labels:  postgresql-database
smpe-admin
SMPE-ADMIN后端通用开发框架
Stars: ✭ 42 (+250%)
Mutual labels:  lombok
lombok-rs
Lombok port for Rust
Stars: ✭ 31 (+158.33%)
Mutual labels:  lombok
rpostgis
rpostgis: R Interface to a 'PostGIS' Database
Stars: ✭ 60 (+400%)
Mutual labels:  postgresql-database

HA-AuthCode-Generation-Service (CovidCode-Service)

HA-AuthCode-Generation-Service is an authorization code generation service for the CovidCode-UI and the proximity tracing app.

Reproducible Builds

In order to have reproducible builds the io.github.zlika maven plugin is used. It replaces all timestamp with the timestamp of the last commit, and orders the entries in the JAR alphabetically. The github action then computes the sha256sum of the resulting JAR and adds the output as an build artifact.

Developer Instructions

Initial setup

Do this once:

  1. Install a JDK (tested with Oracle JDK v11 and OpenjDK 1.8.0)
  2. Install Maven
  3. Install Docker and docker-compose
  4. Check out CovidCode-UI in another directory

Development Cycle

Do this at the beginning of your session:

  1. Run
    docker-compose up -d
    docker-compose logs -f
    and wait for the logs to become quiescent
  2. Run CovidCode-UI in another window (ng serve)

To run manual tests, you can run CovidCode-Service with the local and keycloak-local Spring profiles using the following command:

mvn compile exec:java

(or the equivalent using your IDE's Maven functionality, if you require access to a debugger)

To run the test suite:

mvn verify

To perform a clean build, and run the test suite with full code coverage and upload the data to a locally-running SonarQube:

mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar

SonarQube results are thereafter visible at http://localhost:9000/

To tear down the development support environment (but retain its state on-disk):

docker-compose down

To wipe everything:

docker-compose down
docker volume rm covidcode_dbdata
mvn clean

Swagger-UI

Swagger-UI is running on http://localhost:8113/swagger-ui.html.

Local KeyCloak instance

If CovidCode-Service is being run as suggested above, it will perform authentication and access control against an OIDC / OAuth server running on http://localhost:8180/ (and so will CovidCode-UI in its default development configuration).

The credentials for the KeyCloak administrator are visible in docker-compose.yml in section keycloak:. Additionally, KeyCloak is automatically pre-populated with a bag-pts realm, containing a doctor account (password doctor) that enjoys access to both CovidCode-UI and CovidCode-Service.

PostgreSQL database

docker-compose runs a new PostgreSQL database on port 3113 and takes care of setting it up. The superuser credentials are in docker-compose.yml.

The "local" Spring profile should be used to run the application (see above). The other profiles run the script afterMigrate to reassign the owner of the objects.

Dockerfile

The docker file is provided only to run the application locally without DB. This configuration starts a PostgreSQL 11 on port 3113.
Docker Official Image from https://hub.docker.com/_/postgres.

JWT Generation

JWT generation uses a custom generator with library JJWT.

Lombok

Project uses Lombok. Configure your IDE with lombok plugin.

Security

The API is secured and a valid JWT should be provided. Note that these 2 values are needed

  • ctx:USER
  • the audience must be set to ha-authcodegeneration

Configuration

These parameters can be configured. You can find example values in application-local.yml.

The validity of the generated JWT:
authcodegeneration.jwt.token-validity

The issuer to set in the generated JWT:
authcodegeneration.jwt.issuer

The private key to sign the generated JWT:
authcodegeneration.jwt.privateKey

The Prometheus actuator endpoint is secured with username and password:
authcodegeneration.monitor.prometheus.user
authcodegeneration.monitor.prometheus.password

The allowed origin configuration for the authcode generation:
ha-authcode-generation-service.allowed-origin

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].