SatoshiPortal / cyphernode

Modular Bitcoin full-node microservices API server architecture and utilities toolkit to build scalable, secure and featureful apps and services without trusted third parties
MIT License
364 stars 68 forks source link

Security Roadmap (architecture change + new features) #13

Open FrancisPouliot opened 6 years ago

FrancisPouliot commented 6 years ago

Security roadmap

Currently, Cyphernode security is based on the premise that the application connecting to the cyphernode will be part of the docker network. Different components of Cyphernode can run on different machines, but it is important to note that if one of the machines has root access compromised, they can take over all other parts of the network. To provent this, they can be run on a single machine where security is increased.

We did it in this way originally because that was functional for our own apps, but then again this does place constraints on people that may not want to have the same setup.

We realised two problems with this:

A solution to this is simply to enable a public API with authentification system.

This has two main vulnerabilities:

There are solutions to this:

Security policy proposal: have all outbound transactions included in a batch by default. The option to send outside of a batch is disabled, re-enabled only with hardware auth. Set a maximum threshold per batch. All batches exceding a certain size must be approved by admin via offline signing. Under a certain size, they are simply signed withing Bitcoin Core. You can set a batching schedule for office hours, so that an admin is always expected to sign transactions a few times per day. If an attacker gets access to the Cyphernode, he will not be able to exceed the limit without having to wait between batches or forcing the admin to notice as he manually signs.

Infrastructure

Features

Spending policies

The danger in having an app connect to a secure Cyphernode is that controlling the app would give direct control to the funds in the cyphernode.

We have an idea for spending policies, which is the following (in combination)

What this prevents

FrancisPouliot commented 6 years ago

The Bitcoin core hot wallet would be only as secure as the app which controls it. It can be used as a hot wallet for service operators in their own dashboard.

Kexkey commented 5 years ago

features/authapi branch merged, containing: authentication and authorization on a HTTP API in front of the proxy.