Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

rsksmart/rif-identity-services

Repository files navigation

logo

rif-identity-services

Services enabling RIF Self-sovereign.

npm alerts

The project has different modules that run together form the RIF Identity main flow:

  1. Holder sets and stores declarative details in their Data Vault
  2. Holder requests a credential using credential requests service
  3. Issuer issues that credential using credential requests backoffice
  4. Holder retrieves the credential
  5. Holder stores it in the Data Vault
  6. Holder presents a QR code using the convey service
  7. Verifier validates presentation retrieving it from the convey service

Available servers

  • Issuer: can receive credential requests with an open HTTPS service and grant/deny them using a backoffice
  • Data vault: a user centric cloud like service. It allows users to pin files in IPFS, and memoize the content stored in a private dicitonary
  • Convey: enables to transport arbitrary data via HTTPS. It is used to present credentials via QR code

Setup

First install the dependencies

npm i
npm run setup

If you are willing to run only one service you can install only its dependencies browsing into packages/

Compile typescript modules

npm run build

Run tests

First, start an IPFS node

ipfs daemon

Note that tests expect IPFS to run in port 5001

Run the tests

npm test

Run package-specific tests

npm test:package --package rif-id-core

Start services

The services are found in ./services folder. To run the services please follow package specific instructions to set up .env files. You can opt for running each service individually or run the whole suite with Dockcer compose. To run each service individaully please reffer to service specific README

Using docker compose:

Setup

To use docker compose option, first you need to setup tha variable DOCKER_TAG. This will be the tag when creating the docker image. If no one is set, by default will take the TAG latest. For instance:

export DOCKER_TAG=latest

Setup the following .env variables. Look into each service section of this README to know how to complete them:

./data-vault/.env
./issuer/.env
./issuer/app/.env

Execute

First, build the image:

docker-compose build 

Execute as daemon

docker-compose up -d

Identity service will start using it's own network

docker network ls
1d8ec230c51e        rif-identity-services_default   bridge              local