Coder Social home page Coder Social logo

keria's Introduction

KERIA

GitHub Actions codecov Documentation Status

KERI Agent in the cloud

Split from KERI Core

KERIA Service Architecture

Here we detail the components of a single KERIA instance. This architecture protects the host and the holder private keys. All client tasks/calls are signed 'at the edge', not in the hosted KERIA instance. Therefore, KERIA relies on the Signify protocol for all calls. The Architecture provides three endpoints for Signify clients to create their KERIA agents. The Agency (boot) endpoint establishes an agent. The API Handler and Message Router endpoints would be exposed to the internet for creating identifiers, receiving credentials, etc. KERIA

Message Router

The Message Router receives external KERI protocol messages. These are KERI protocol messages for instance coordinating multi-sig, revoking credentials, etc. It routes these messages to the appropriate Agent(s). For instance a multisig message requires asynchronous waiting (for signature responses from other participants) and the message router would route those incoming KERI protocol responses to the appropriate agents. From Signify client calls, this service endpoint corresponds to the http port (default is 3902). This enpoint allows all KERI clients (not just Signify) to interact in a seamless way.

The Agency

The Agency receives API requests (/boot requests) to provision agents. It is the central repository for initializing agents. The Agency database persists all of the information to track the existing agents, allowing recovery on restart. From Signify clients calls, this service endpoint corresponds to the boot port (default is 3903). A common entry in the agency is the mapping between a managed AID and the agency that handles that managed AID.

API Handler

The API Handler receives agent API requests (/agent requests) including for Signify clients to create identifiers, receiving credentials, etc. All API calls are signed by the Signify client headers so that all calls are secure. This API interacts with agents and those interactions are stored in the agent databases. From Signify clients calls, this service endpoint corresponds to the admin port (default is 3901).

Agents

Agents act on behalf of their Signify clients. They don't have the secrets of the client. Instead, they handle all actions for the clients, other than secret/encryption/signing. However, Agents do have their own keys and do sign all of their messages BACK to the Signify client, so the client can verify that all messages received are from their agent. Agents use KERI HIO to handle all of the different asynchronous actions that are occuring. HIO is an efficient and scalable orchestration/processing mechanism that leverages queues, handlers, coroutines, etc. All Agent db access is through the associated Agent.

Development

Setup

Build from source

  • Setup virtual environment:
    python3 -m venv venv
  • Activate virtual environment:
    source venv/bin/activate
  • Install dependencies:
    pip install -r requirements.txt
  • Run agent:
    keria start --config-dir scripts --config-file demo-witness-oobis

Build with docker

  • Build KERIA docker image:
    make build-keria

Running Tests

  • Install pytest:

      pip install pytest
  • Run the test suites:

      pytest tests/

keria's People

Contributors

pfeairheller avatar smithsamuelm avatar m00sey avatar 2byrds avatar rodolfomiranda avatar kentbull avatar psteniusubi avatar lenkan avatar alexandrei98 avatar arsh-sandhu avatar ifergal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.