Giter Site home page Giter Site logo

hu19891110 / laverna-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laverna/laverna-server

0.0 2.0 0.0 34 KB

Signaling Server for Laverna's P2P Differential Synchronization

Home Page: https://laverna.cc

License: Mozilla Public License 2.0

JavaScript 100.00%

laverna-server's Introduction

Signaling Server for Laverna's P2P Differential Synchronization

Wiki | IRC | Gitter Chat

Build Status Coverage Status Code Climate

Dependencies

  1. Git
  2. Node.js
  3. MongoDB

Installation


  1. Clone the repository
$ git clone [email protected]:Laverna/server.git
# navigate to the project directory
cd server
  1. Install dependencies
$ npm install
  1. Configure the signal server Copy .env.example to .env and change configs in the new file.

  2. Start the server

$ npm start

Security


Authentication

To authenticate a client on the server it uses token based authentication by using JSON Web Tokens and OpenPGP signatures.

The authentication method is based on public key authentication method where the possession of the private key serves as authentication.

How does it work?

  1. A client requests a session token by sending a GET request to /api/token/username/:username
  2. The server generates and sends a JWT token (HS256 algorithm) for the client which will expire after 8 minutes
  3. The client signs the session token with their private OpenPGP key and sends a POST request to /api/auth
  4. The server:
    1. Checks the authenticity of the signature
    2. Checks the signed JWT session token
    3. If there is no error, it generates an authentication token using JWT. The token will expire after 24 hours
  5. The authentication token is used to authenticate the client on the signaling socket server.

What Personal Information is Stored on the Server?

The server stores a minimum amount of information which includes your username and public OpenPGP key and fingerprint. Keep in mind if your OpenPGP key includes your email, it can be easily extracted.

Personal Information which is Publicly Available

Some of your personal information will be available to the public. It is necessary for our REST API.

The following data should be considered public:

  1. Your username
  2. Your public OpenPGP key
  3. Your OpenPGP key fingerprint

Security Audit


The authentication method used in this project was implemented by us and it hasn't been vetted nor audited by security experts. Use it at your own risk.

License


Published under MPL-2.0 License.

laverna-server's People

Contributors

wwebfor avatar

Watchers

hadi avatar  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.