Skip to content

A proof-of-concept blockchain-based identity management system for KYC.

License

Notifications You must be signed in to change notification settings

sn1f3rt/IDenSafe

Repository files navigation

IDenSafe - Decentralized Identity Management Application

ci/gh-actions/ruff License

Table of Contents

About

IDenSafe is a proof-of-concept blockchain-based identity management system for KYC. It is built on the Ethereum blockchain. It implements the Sign-In with Ethereum authentication protocol, natively in Python using the siwe-py library. On the core, it is built using the Flask web framework. Database management is done using SQLAlchemy.

It supports Ethereum based user authentication, setting username, verifying KYC and enabling attributes which can be requested.

Prerequisites

  • Git
  • Python 3.10 or higher
  • MariaDB/MySQL database
  • Ganache or any other Ethereum testnet

Installation

  1. Install uv > https://docs.astral.sh/uv/getting-started/installation/

  2. Clone the repository

     git clone https://github.com/Sn1F3rt/IDenSafe.git
  3. Switch to the project directory

     cd IDenSafe
  4. Create a virtual environment

    uv venv

    or if you have make installed

    make env
  5. Install dependencies

     uv sync --no-dev --extra prod

    or if you have make installed

    make install

Configuration

Copy the config.example.py file to config.py and:

  • update the SECRET_KEY variable with a 32-bit hexadecimal string.
  • update the DB_* variables with your database credentials.
  • update the WEB3_PROVIDER variable with the URL of your Ethereum node.

Running

Development

uv run launcher.py # or make debug

or if you have make installed

make activate
make debug

The API server will be running at http://localhost:5000.

Production

source .venv/bin/activate # or make activate
gunicorn --bind 0.0.0.0:5000 launcher:app # or make prod

or if you want to enable SSL support

source .venv/bin/activate # or make activate
gunicorn --bind 0.0.0.0:5000 launcher:app --certfile cert.pem --keyfile key.pem # or make prods --certfile cert.pem --keyfile key.pem

The API server will be running at http://localhost:5000. The certificate and key files are required for SSL support.

License

GNU General Public License v3.0

Copyright © 2024 Sayan "Sn1F3rt" Bhattacharyya