The vLEI Verifier Router is a service that routes requests to multiple instances of the vLEI Verifier. It manages the distribution of requests across verifier instances and ensures efficient load balancing and failover handling.
-
Request Routing: Routes requests to appropriate vLEI Verifier instances based on AID or SAID.
-
Load Balancing: Distributes requests evenly across multiple verifier instances.
-
Failover Handling: Automatically reroutes requests if a verifier instance becomes unavailable.
-
Redis Integration: Stores all AID-to-verifier mappings in Redis for persistence and scalability.
-
Health Checks: Monitors the health of verifier instances and routes traffic only to healthy instances.
-
Clone the repository:
git clone https://github.com/GLEIF-IT/vlei-verifier-router.git cd vlei-verifier-router
-
Install dependencies:
pip install -r requirements.txt
-
Start the service locally:
python -m uvicorn main:app --reload --port 7676
-
Access the service at:
http://localhost:8000
The repository includes two docker-compose
files for different use cases:
-
docker-compose.yml
:-
This file is for a clean run with no pre-configured
vlei-verifier
instances. -
After starting the router, you need to add
vlei-verifier
instances one by one using the POST/add_verifier_instance
endpoint. -
To start the services:
bash
docker-compose up -d
-
-
docker-compose-test.yml
:-
This file is for testing and includes 3 pre-configured
vlei-verifier
instances. -
It also includes additional services like
vlei-server
andwitness-demo
for a complete testing environment. -
To start the services:
docker-compose -f docker-compose-test.yml up -d
-
-
POST
/presentation
: Handle presentation requests for a given SAID and vLEI. -
GET
/authorization
: Handle authorization requests for a given AID. -
POST
/signed-headers-verification
: Verify signed headers for a given AID, signature, and serialized data. -
POST
/signature-verification
: Verify signatures for a given AID, signature, and digest. -
POST
/add-root-of-trust
: Add a root of trust to all verifier instances for a given AID, vLEI, and OOBI.