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.
- Dependencies
- Configure PostgreSQL database
- Usage
- Server module structure
- PassID client repositories
- License
-
Python 3.7 or higher.
Check this website for installation guidelines. -
PIP3 (sudo apt-get install python3-pip)
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
-
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> ;
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.
This project is licensed under the MIT License - see the LICENSE.md file for details