/PassID-Server

PassID PoC server

Primary LanguagePythonMIT LicenseMIT

PassID Server - PoC

This repository contains server source code for PassID PoC. The server consists of two services:

  • API service which serves JSON-RPC PassID API endpoint
  • web app platform for users to upload eMRTD trustchain certificates (CSCA/DSC) and revocation list (CRL) to server

Part of source code is also pymrtd library which is used to parse eMRTD file structure, verify integrity of eMRTD files and validate trustchain.

Table of Contents

Dependencies

 pip3 install (or python3.8 -m pip install) asn1crypto
  pip3 install (or python3.8 -m pip install)cryptography
  pip3 install (or python3.8 -m pip install) ldif3
  pip3 install (or python3.8 -m pip install) paramiko
  pip3 install (or python3.8 -m pip install) sqlalchemy
  pip3 install (or python3.8 -m pip install) json-rpc
  pip3 install (or python3.8 -m pip install) werkzeug
  pip3 install (or python3.8 -m pip install) coloredlogs
  pip3 install (or python3.8 -m pip install) pycountry
  pip3 install (or python3.8 -m pip install) psycopg2
  
  On Unubuntu you need to run this to work: sudo apt install libpq-dev python3-dev

Configure PostgreSQL database

  • Install PostgreSQL

    sudo apt update

    sudo apt install libpq-dev postgresql postgresql-contrib

  • Login to PostgreSQL

sudo -i -u postgres

  • Create user

    createuser <username>

  • Create database

    createdb <dbname>

  • Set user password

    psql

    psql=# alter user <username> with encrypted password '<password>';

  • Set user privileges

    psql=# grant all privileges on database <dbname> to <username> ;

Usage

To extract eMRTD trustchain certificates (CSCA/DSC) from master list files (*.ml) and PKD LDAP files (*.ldif) use python tool pkdext. (Optional) If using SQL database you can use class Builder to load trustchain certificates into database via custom script.

Instructions for running server services:

Server module structure

PassID client repositories:

License

This project is licensed under the MIT License - see the LICENSE.md file for details