Giter Club home page Giter Club logo

rains's Introduction

RAINS, Another Internet Naming Service

This repository contains a reference implementation of a RAINS server, supporting authority, intermediary, and query service, as well as associated tools for managing the server. It has the following executables:

  • rainsd: A configurable RAINS server
  • rdig: A command-line tool for querying RAINS servers
  • zonepub: A command-line tool for a naming authority to publish information about its zone(s) to its authoritative RAINS servers
  • keyManager: A command-line tool for a naming authority to manage its key pairs

In addition to this there is a resolver in libresolve which either forwards a query to a RAINS server to resolve it or performs a recursive lookup itself on the callers behalf before sending the received answer back to the caller.

Understanding RAINS

The RAINS implementation is based on the RAINS protocol specified in the Internet draft. The different components necessary to run a RAINS infrastructure are described here. The design of this RAINS server is explained here and the cache folder contains design decisions for all caches. The zonefile format, designed to be conveniently readable by a human, is defined in backus normal form here. Each command line tool has a help page which explains all commands and flags that are supported.

Installing and using RAINS

On your machine

  1. Make sure that you are using a clean and recently updated Ubuntu 16.04.
  2. Download the repo e.g. git clone https://github.com/netsec-ethz/rains
  3. Create the necessary binaries by calling make
  4. Use the binaries created in the cmd folder

In SCION lab

TODO

Issues and Test coverage

The RAINS server and tools are under active development. An up to date list of issues and bugs can be found here.

The server and all tools are tested using unit and integration tests. A description of the integration test can be found in this readme To inspect the test coverage of all unit tests together with the integration test, perform the following steps:

  1. go test -coverprofile=coverage.out -coverpkg=./internal/pkg/... ./...
  2. go tool cover -html=coverage.out -o coverage.html
  3. firefox coverage.html

rains's People

Contributors

britram avatar fehlmach avatar fr4nk-w avatar juagargi avatar klausman avatar kormat avatar marcfrei avatar martenwallewein avatar matzf avatar rayhaanj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rains's Issues

Implement handling of notifications

When the server or a tool receives a notification section, it logs it but does not further processing.
Implement logic there if needed, especially the capability case.
Capabilities sent in response do not need a notification type, they can be attached to a bare message.

optimize reverse section cache

Use #45 instead of the current binary trie implementation and make the number of children per node dependent on a server configuration.

Read config

Change the way how we read in the config file represented as json.
Do not directly read the input into the internal object.

  1. Read in values
  2. Copy/Cast them to the internal representation.

Support for SCION addresses and PKI

RAINS is designed to be address-family and architecture-independent, and initial work has focused on building out RAINS as an Internet naming service. The codebase and protocol need minor updates to be usable as a naming service for SCION:

Subtasks:

  • Add support for a :scionip4: assertion object type, carrying a SCION address as an octet array
  • Add support for a :scionip6: assertion object type, carrying a SCION address as an octet array
  • Design and build tooling to add RAINS root keys to a SCION TRC
  • Integrate verification of the RAINS root key against the SCION TRC into RAINS

example and test servers

Move examples and test servers to a different folder or repo.
There should be an interface where one can specify which kind of servers are wanted and then they get automatically started.

Sharding

Currently assertions are sorted and then split up in groups of a configurable size.
The size is currently per assertion instead of per assertion name. This must be changed. Otherwise if there are more assertions of a name than the configured size, they will always be rejected.

Design a Wire and Signing format

We want to remove the dependency between wire and signing format.
We use capnproto to binary encode a rains message before we send it over the wire. The capnproto schema must be refined and a library (which uses capnproto's encode and decode) to encode and decode must be implemented.

Allow contained assertions and shards

When a contained assertion or shard is validated it gets dropped in the verify step because it does not yet inherit the signature(s) from its outer section.

Support multiple Object Types per Assertion

Right now the system can only handle 1 (the first) object per assertion although one could add several. Make it work also for multiple objects per assertion. Be aware that the cache implementation must also be changed.

Consistency Checks

Decide which consistency checks MUST be done at run time by the server and which SHOULD be analyzed by a separate service (which then must be able to take appropriate actions, e.g. remove elements from the server's cache, blacklist an entity, etc.)
Implement/refactor consistency checks
Shard's and Zone's content are sorted. We do not have to sort them for consistency checks but only check that they are really sorted (if not drop the section and send a msgInconsistent notification back).

should section be cached policy

Design and implement a policy by which the server can decide if it wants to cache the section for
Assertion, Shard, Zone, AddressAssertion, AddressZone.

Default Configuration

Instead of loading a hard coded default config and then rewrite parts of it by parsing a json encoded config file, we should create a cmd line interface where these values are the flags' default value.

Design notes for all used caches

Write down which operations are necessary for which cache and how performance critical they are.
Which replacement strategy we choose for each.
Find data structures that fit our needs.

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.