Giter Site home page Giter Site logo

brightid-node's Introduction

Unique Human Identity

BrightID allows you to prove to applications that you're only using one account.

Decentralized & Nonintrusive

The network consists of volunteers running nodes. Nodes host the social graph used for verification, but there's no personal information stored there.

Mobile App

ID creation and connections to people and apps are managed through the BrightID mobile app.

Contribute

Contributions to translations are welcome through weblate.

Integrating BrightID in your Project

brightid-node's People

Contributors

abramsymons avatar adamstallard avatar bakhshandeh avatar drewgregory avatar helmot avatar rnbwd avatar sentax avatar siftal avatar triplespeeder avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brightid-node's Issues

Catalog Known Attacks

Keep a catalog of known attacks with example graphs, so that those who want to evaluate the anti-sybil algorithm don't repeat past efforts.

Authorize other apps

Users should be able to authorize other apps using BrightID.

Lets say app A wants to use BrightID as its authentication method or just wants to allow its users to connect their BrightID to the app. We need to support 3 scenarios:

1- app A on an another device like PC and BrightID on phone
2- app A as a mobile app on same device as BrightID
3- app A as a web-based app on same device as BrightID

We can use a solution same as what we are doing for making connections now:

1- app A can send a message to BrightID using qr-code(scenario 1) or Deep Link(scenarios 2,3) and also upload data(avatar, name of the app, ...) as an encrypted message to a server same as what we have for connections now

More details about Deep Links:
https://en.wikipedia.org/wiki/Mobile_deep_linking

Deep link for BrightID could be something like this:

BrightID://authorize?data=encrypted_data

Both IOS and Android support Deep Links and we can use something like this to implement it on React:
https://reactnavigation.org/docs/en/deep-linking.html

2- BrightID will sign the message and upload data(avatar, name, score, ...) to the server

3- app A can use web sockets or retry again and again to get the data and check the signature to validate the user

whitepaper

Should include

  • Anti-sybil approach
  • P2P design
  • Short Mobile UI walkthrough

Assigning scores

The scores for each group in SybilGroupRank need to be converted into something that makes sense.

The sybilRank paper says this

an
OSN cannot simply identify a pivot in the ranked list below
which all nodes are fake, and it still has to rely on
manual inspection.

but they are considering graphs that already exist. If we look at how the graph changes between iterations--starting from a graph that is completely honest, we can assign probabilities to ranges, by assuming that honest users can improve their scores, while sybils can't.

New users can start with low scores, but they can improve. We can find good probability boundaries by making the assumption that sybils' scores won't improve.

Rather than storing scores twice, we can store just the raw ranks from sybilGroupRank, and then store a mapping that sets the probability boundaries (there could be 10 or 100 boundaries, for instance). These boundaries are adjusted after each iteration of sybilGroupRank. To get a group's score requires looking up the raw ranks, looking up the boundary map, and making the conversion at query time.

Check timestamps on more API calls to avoid replay attacks

As a working example, PUT and DELETE calls to /connections check the timestamp from the most recent PUT or DELETE operation and only update it if the timestamp is newer. It uses the 'removed' collection to record timestamps to DELETE /connections operations.

If we want the timestamps included in calls to
PUT /membership
DELETE /membership
POST /groups
DELETE /groups
POST /fetchUserInfo
to be useful, we need to store previous timestamps in the DB and do similar checks

Otherwise replay attacks are possible, e.g. I can repeatedly remove someone from a group if they left it at some point in the past and rejoined; I can fetchUserInfo for another user.

Make gap between scores configurable

Right now there is a gap between 10 and 90. Let's close the gap while still making it obvious.

@UBIpromoter suggested 70 and 30.

The idea is to make it possible to make more obvious progress without needing to cross the gap.

Downloadable application for simulating sybil attacks

I was thinking today about how other people can easily run simulations to help us improve our anti-sybil system.

I really like the web-based sybil attack simulator you built.

We are going to start taking regular backups (dumps) of the graph. What I would like is for any user to run the sybil attack simulator on a recent dump of the graph. If the graph starts getting too big, we can create a utility that dumps smaller subsets of the graph to make a simulation more manageable.

I think we could use the same stack: html, javascript, python, but create an installer (or docker solution) that runs everything locally on a user's machine. The application can know where to download graph dumps from a site where we host them.

This way a user can experiment with different graphs loaded from arangodb running on their own machine. Multiple users can operate on different graphs without bogging down our test machine with having to load multiple copies (dumps) of the graph in arangodb.

We can offer bounties to users that submit a simulation that leads to an improvement in the anti-sybil system.

Dockerfiles

We'll need dockerfiles for

  1. nginx (to act as a reverse proxy, limiting access to endpoints on the arangodb port)
  2. arangodb, including configuring foxx

Expose fewer ports to the host from docker

Right now, ports 8529 (arangodb) and 3000 (profile service) are exposed to the host network. These should be blocked by a firewall running on the host, but it's safer to not even expose them to the host, but only to other containers. This can be done by removing the network_mode: host directive and changing the use of ports in https://github.com/BrightID/BrightID-Node/blob/master/docker-compose.yml to expose so that only the other containers have access to those ports. Then use container names in urls as described in https://docs.docker.com/compose/networking/

For example, in

https://github.com/BrightID/BrightID-Node/blob/master/web_services/brightid-nginx.conf#L65

proxy_pass http://127.0.0.1:8529/_db/_system/brightid/;

could be changed to

proxy_pass http://db:8529/_db/_system/brightid/;

The web container (nginx) is the only container that needs its port (80) exposed to the host network, so network mode host is fine there.

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.