This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 296
Documentation for Iroha installation security tips #2129
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ Guides and how-tos | |
libraries.rst | ||
dependencies.rst | ||
k8s-deployment.rst | ||
sec-install.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Iroha installation security tips | ||
================================ | ||
This guide is intended to secure Iroha installation. Most of the steps from this guide may seem obvious but it helps to avoid possible security problems in the future. | ||
|
||
Physical security | ||
^^^^^^^^^^^^^^^^^ | ||
In case the servers are located locally (physically accessible), a number of security measures have to be applied. Skip these steps if cloud hosting is used. | ||
|
||
Establish organisational policy and/or access control system such that only authorized personnel has access to the server room. | ||
Next, set BIOS/firmware password and configure boot order to prevent unauthorized booting from alternate media. | ||
Make sure the bootloader is password protected if there is such a functionality. Also, it is good to have a CCTV monitoring in place. | ||
|
||
Deployment | ||
^^^^^^^^^^ | ||
First, verify that official repository is used for downloading `source code <https://github.com/hyperledger/iroha>`__ and `Docker images <https://hub.docker.com/r/hyperledger/iroha>`__. | ||
Change any default passwords that are used during installation, e.g., password for connecting to postgres. | ||
Iroha repository contains examples of private and public keys - never use it in production. | ||
Moreover, verify that new keypairs are generated in a safe environment and only administrator has access to those keypairs (or at least minimise the number of people). | ||
After deploying keys to Iroha peers delete private keys from the host that was used to perform deployment, i.e. private keys should reside only inside Iroha peers. | ||
Create an encrypted backup of private keys before deleting them and limit the access to it. | ||
|
||
Network configuration | ||
^^^^^^^^^^^^^^^^^^^^^ | ||
Iroha listens on ports 50051 and 10001. | ||
Firewall settings must allow incoming/outgoing connections to/from these ports. | ||
If possible, disable or remove any other network services with listening ports (FTP, DNS, LDAP, SMB, DHCP, NFS, SNMP, etc). | ||
Ideally, Iroha should be as much isolated as possible in terms of networking. | ||
|
||
Currently, there is no traffic encryption in Iroha, we strongly recommend using VPN or Calico for setting up Docker overlay network, i.e. any mechanism that allows encrypting communication between peers. | ||
Docker swarm encrypts communications by default, but remember to open necessary ports in the firewall configuration. | ||
In case VPN is used, verify that VPN key is unavailable to other users. | ||
|
||
If SSH is used, disable root login. | ||
Apart from that, disable password authentication and use only keys. | ||
It might be helpful to set up SSH log level to INFO as well. | ||
|
||
If IPv6 is not used, it might be a good idea to disable it. | ||
|
||
Updates | ||
^^^^^^^ | ||
Install latest operating system security patches and update it regularly. | ||
If Iroha is running in Docker containers, update Docker regularly. | ||
While being optional, it is considered a good practice to test updates on a separate server before installing to production. | ||
|
||
Logging and monitoring | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
- Collect and ship logs to a dedicated machine using an agent (e.g., Filebeat). | ||
- Collect logs from all Iroha peers in a central point (e.g., Logstash). | ||
- Transfer logging and monitoring information via an encrypted channel (e.g., https). | ||
- Set up an authentication mechanism to prevent third parties from accessing logs. | ||
- Set up an authentication mechanism to prevent third parties from submitting logs. | ||
- Log all administrator access. | ||
|
||
OS hardening | ||
^^^^^^^^^^^^ | ||
The following steps assume Docker is used for running Iroha. | ||
|
||
- Enable and configure Docker Content Trust. | ||
- Allow only trusted users to control Docker daemon. | ||
- Set up a limit for Docker container resources. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the latest