adorsys / didcomm-mediator-rs

Simple mediator for DIDComm Messaging v2
Apache License 2.0
3 stars 0 forks source link

didcomm-mediator

A DIDComm mediator is a cloud agent that facilitate secure, decentralized communication between mobile agents in the self-sovereign identity (SSI) ecosystem. This mediator acts as a cloud-based intermediary, enabling mobile agents to communicate without reliance on centralized infrastructures like Facebook, Signal, or Telegram.

Overview

Why a DIDComm Mediator?

Mobile phones are not naturally suited for web-based interactions. To overcome this limitation, messages sent between mobile agents are routed through a DIDComm mediator, a cloud agent that ensures reliable delivery by always being available for web interactions.

How It Works

A DIDComm mediator stores the Decentralized Identifiers (DIDs) of mobile agents. When one mobile agent sends a message to another, it first sends the message to a DIDComm mediator. This mediator routes the message to the recipient’s mediator, which then delivers the message to the intended recipient.

The following diagram displays some cloud services that can be provided by a DIDComm mediator. In particular, services that take care of routing and relaying messages among mobile agents.

sample cloud services

Key Services Provided:

Data Service: Although not part of the core DIDComm specifications, it’s a vital service that ensures mobile agents have the necessary support for comprehensive functionality.

Subscriptions: Ensures trusted relationships between mobile agents and cloud services, and thereby serve as the foundation of the economic model on top of which cloud services are built.

The Importance of Standardization

Standardizing these cloud agents is essential for the decentralized web's success, much like the standardization of email protocols.

Self-Sovereign Identity (SSI)

DIDComm Messaging

DIDComm is a messaging protocol that works with DIDs to provide secure, private communication between parties. The full specification is available here.

Functional Aspects

Technical Aspects

Building and testing

To build and test the project, ensure that libssl-dev and pkg-config are installed on your system.

Ubuntu Setup

Install the necessary packages with:

sudo apt update
sudo apt install -y libssl-dev pkg-config

Prerequisites

Ensure you have Rust & Cargo installed.

Setup

  1. Optionally, create a working directory and navigate into it.

  2. Clone the repository:

git clone git@github.com:adorsys/didcomm-mediator-rs.git

Running the Project

To build and run the project:

cargo build
cargo run

The output should look like this:

image

Testing

The tests can be run with:

cargo test --workspace

or optionally with cargo nextest (you may want to install it first) if you want to speed-up the tests:

cargo nextest run --workspace

Troubleshooting

cargo check

License

This project is licensed under the MIT License. See the LICENSE file for details.