View on GitHub

distort-server

A reference-implementation homeserver for the research anonymity protocol, DistoRt, with broadcasting over IPFS

DistoRt Homeserver

(main page)

These technical docs are meant for homeserver administrators to be able to properly configure their server, as well as developers wishing to write DistoRt clients and homeservers

Table of Contents

  1. Server Overview
    1. Configuration
    2. Launch Actions
    3. Runtime Actions
  2. REST API
    1. Response Codes
    2. Returned JSON Objects
    3. Unauthenticated Requests
    4. Authenticated Requests

Server Overview

Configuration

The server is configurable by the top-level JSON file config.json. It features several configurables:

Launch Actions

  1. Connect to the configured MongoDB to use for node storage. Retry every 5 seconds until successful connection
  2. Attempt to successfully perform the following actions without failure. Retry every 5 seconds until completion without having to abort
    1. Connect to the configured IPFS node that will be used as the node’s broadcasting identity and gateway
    2. Force the connected IPFS node to verify pubsub signatures so that trust of IPFS identities implies trust of the certificates they publish
    3. (Optional) Connect to configured bootstrap IPFS nodes. Failure to connect to bootstrap nodes does not affect success of launch
    4. Determine if there already exists a root account for the given IPFS identity.
      • If so… First, determine which local accounts are enabled and have the IPFS identity of the connected node. For each account, subscribe the IPFS node to the pubsub channels they have added
      • Otherwise… Create a root account for the in-use IPFS identity. The administrator is prompted to enter their own password or allow for the creation of a random one. The random password mechanism is to generate a 128-bit string and encode it in Base64. Neither generated nor user-entered passwords are stored in the database. The PBKDF2 hash of the password is used as the authentication token. It is not stored in the database. The SHA256 hash of this token is stored in the database for later comparison when REST API calls are made using said token. Finally, create a new certificate and save the newly created account and certificate details to the database
    5. (Optional) Begin to stream on supported social-media platforms that any host account belongs to
    6. Initialize REST paths and launch server on configured port

Runtime Actions

REST API

Response Codes

Returned JSON Objects


Unauthenticated Requests

Request paths:

Authenticated Requests

Note: Authenticated requests require the following headers:

Request paths: