GithubHelp home page GithubHelp logo

tokumori / exposure-notifications-verification-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/exposure-notifications-verification-server

0.0 0.0 0.0 7.45 MB

Verification component for COVID-19 Exposure Notifications.

License: Apache License 2.0

Go 71.58% HTML 15.08% Shell 2.04% Makefile 0.27% Dockerfile 0.22% HCL 10.80%

exposure-notifications-verification-server's Introduction

Exposure Notifications Verification Server

This is a reference implementation for an Exposure Notifications verification server, part of the broader Google Exposure Notifications system.

About the Server

This server follows the high level flow for a verification system:

  1. Authenticates and authorizes humans using Firebase authentication.

  2. Provides a web interface for epidemiologists (epi) to enter test parameters (e.g. status + test date) to issue a verification code.

    • Short verification codes are typically 6-10 numeric digits and can be read over the phone to a patient. They expire quickly, usually in less than one hour.

    • Longer verification codes can be sent directly to the patient via SMS. These codes generally last longer, like 24 hours.

  3. Provides a JSON-over-HTTP API for exchanging the verification code for a verification token. This API is called by the patient's device.

    • Verification tokens are signed JWTs with a configurable validity period.
  4. Provides a JSON-over-HTTP API for exchanging the verification token for a verification certificate. This API call also requires an HMAC of the Temporary Exposure Key (TEK) data+metatata. This HMAC value is signed by the verification server to be later accepted by an exposure notifications server. This same TEK data used to generate the HMAC here, must be passed to the exposure notifications server, otherwise the request will be rejected.

    • Please see the documentation for the HMAC Calculation

    • The Verification Certificate is also a JWT

Architecture diagram

Verification Flow

Architecture details

  • This application is comprised of the following services which are designed to be serverless and scale independently:

    • cmd/server - Web UI for creating verification codes

    • cmd/apiserver - Server for mobile device applications to do verification

    • cmd/adminapi - (optional) Server for connecting existing PHA applications to the verification system.

    • cmd/cleanup - Server for cleaning up old data. Required in order to recycle and reuse verification codes over a longer period of time.

  • PostgreSQL database for shared state. Other databases may work, but we only aim to support Postgres at this time.

  • Redis for caching and distributed rate limiting.

  • Firebase authentication for login.

More resources

exposure-notifications-verification-server's People

Contributors

chaodaig avatar crwilcox avatar icco avatar jeremyfaller avatar mikehelmick avatar sethvargo avatar sherifkozman avatar taddari avatar whaught avatar yegle avatar zssz avatar

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.