Reader small image

You're reading from  Blockchain with Hyperledger Fabric - Second Edition

Product typeBook
Published inNov 2020
PublisherPackt
ISBN-139781839218750
Edition2nd Edition
Concepts
Right arrow
Authors (6):
Nitin Gaur
Nitin Gaur
author image
Nitin Gaur

Nitin Gaur, is the director of IBM's Blockchain Labs, and an IBM Distinguished Engineer.
Read more about Nitin Gaur

Anthony O'Dowd
Anthony O'Dowd
author image
Anthony O'Dowd

Anthony O'Dowd is a Distinguished Engineer at IBM, focusing on Blockchain. He led IBM's contribution to the design and development of the new smart contract and application SDKs found in Hyperledger Fabric v2. Anthony has also made significant contributions to Hyperledger Fabric documentation and samples.
Read more about Anthony O'Dowd

Petr Novotny
Petr Novotny
author image
Petr Novotny

Petr Novotny is a research scientist at IBM Research, with an MSc from University College London and PhD from Imperial College London, where he was also a post-doctoral research associate.
Read more about Petr Novotny

Luc Desrosiers
Luc Desrosiers
author image
Luc Desrosiers

Luc Desrosiers is an IBM-certified IT architect with 20+ years of experience.
Read more about Luc Desrosiers

Venkatraman Ramakrishna
Venkatraman Ramakrishna
author image
Venkatraman Ramakrishna

Venkatraman Ramakrishna is an IBM researcher, with a BTech from IIT Kharagpur and PhD from UCLA.
Read more about Venkatraman Ramakrishna

Salman A. Baset
Salman A. Baset
author image
Salman A. Baset

Dr. Salman A. Baset is the CTO of security in IBM Blockchain Solutions.
Read more about Salman A. Baset

View More author details
Right arrow

Hyperledger Fabric Security

Hyperledger Fabric has a modular architecture. It has been designed to allow a known set of actors to participate and perform actions in a blockchain network (the so-called permissioned blockchain). Due to its modular nature, it can be deployed in many different configurations. The different deployment configurations of Hyperledger Fabric have varying security implications for the operator of the network, as well as its users.

At its core, Hyperledger Fabric is a public key infrastructure (PKI) system, and thus it inherits the security (and complexity) associated with such systems. At the time of writing this book, Hyperledger Fabric 2.1.1 has been released.

The security aspects of designing and implementing a blockchain network have been discussed in earlier application chapters; here, we intend to give a broader as well as a more in-depth view of security.

We will be covering the following topics in this chapter:

  • Design goals impacting...

Hyperledger Fabric design goals impacting security

To understand the security of Hyperledger Fabric, it is important to state the key design goals that impact security:

  • Existing members should determine how to add new members to the network: The admission of new entities (members or organizations) to a Hyperledger Fabric-based network must be agreed upon by existing entities in the network. This principle is at the foundation of creating a permissioned blockchain. Instead of allowing any entity to download software and connect to a blockchain network without any verification, the current members in a Hyperledger Fabric-based blockchain network must agree upon a policy to admit new members (such as by majority vote). This policy is then enforced by the underlying mechanisms of Hyperledger Fabric. Upon the successful verification of such an admission policy, the digital credentials of a new member can be added to an existing network.
  • Existing members should determine...

Hyperledger Fabric architecture

The Hyperledger Fabric architecture for N participating organizations is illustrated in the following screenshot. An organization is a business entity that participates in a Hyperledger Fabric-based permissioned blockchain network and deploys the Hyperledger Fabric infrastructure such as peers, ordering nodes, smart contracts, and membership service providers.

In this section, we will describe this architecture in more detail from a security viewpoint:

Figure 14.1: Hyperledger Fabric architecture

Fabric CA or membership service provider

The membership service provider (MSP) is responsible for creating digital identities for peers and users of a participating organization, validating identities, and is configured based on the root certificates and CRLs of one or more X.509 CAs. Fabric Certificate Authority (Fabric CA) is the recommended CA server for Fabric deployments, but it is possible to use other CA architectures, or even public...

Network bootstrap and data governance: the first step toward security

When organizations decide to form a permissioned private blockchain network using Hyperledger Fabric, they need to consider several governance aspects that will ultimately determine the overall security posture of the Hyperledger Fabric-based network. These governance aspects include, but are not limited to, the items discussed in this section.

Bootstrapping the network with known members

Bootstrapping the network is the first step in creating a Hyperledger Fabric-based blockchain network. The network typically represents the existing or new business relationships between the participating organizations. The organizations responsible for creating the network are typically known to each other through existing business relationships and have a lot of say in the purpose of the network, such as:

  • Sharing data
  • Defining the data schema to be shared among participants
  • Establishing governance...

Strong identities: the key to the security of the Hyperledger Fabric network

Strong identities are at the heart of Hyperledger Fabric security. Creating, managing, and revoking these identities is critical to the operational security of Hyperledger Fabric-based deployment. The identities are issued and validated by an MSP. As shown in the previous Hyperledger Fabric architecture diagram, one logical MSP is typically associated with one peer. An MSP can validate any appropriate cryptographically signed identities. Hyperledger Fabric ships with a default MSP (Fabric CA), which issues X.509 certificates to the authenticated entities.

Bootstrapping Fabric CA

Fabric CA can be configured with an Lightweight Directory Access Protocol (LDAP) server or run in standalone mode. When running in standalone mode, it must be configured with a bootstrap identity that gets stored in its backend database. By default, a SQLite database is used, but for production usages, a PostgreSQL or MySQL...

Smart contract security

In Hyperledger Fabric, as indicated previously, smart contracts (chaincodes) can be written in Go, Java, or JavaScript. The smart contract must be installed on a peer and then explicitly instantiated.

When instantiated using the docker builder command, each smart contract is built and then launched in its own Docker container. Starting with version 2.0, external builders can be utilized to build and run smart contracts without requiring a Docker daemon.

When running the smart contract inside a Docker container, it is important to understand what access this container may have to the network. If care is not taken in carefully reviewing the smart contract before it gets installed on the peer, and in isolating the network access for that smart contract, it could result in a malicious or misconfigured node probing or attacking the peer attached to the same virtual network.

How is a smart contract shared with other endorsing peers?

Starting in Fabric...

Common threats and how Hyperledger Fabric mitigates them

Hyperledger Fabric provides protection against some of the most common security threats and assumes that a participating organization (node operator) will manage the threats inherent in running such a system, while at the same time introducing new attack vectors inherent in data sharing and governance. In the following table, we will summarize the most common security threats, whether Hyperledger Fabric addresses them and how, or whether it is the responsibility of a node/network operator to address them:

Hyperledger Fabric and quantum computing

Hyperledger Fabric uses elliptic curve cryptography for digitally signing transactions. Elliptic curve cryptography relies on mathematical techniques that can be sped up using quantum computing (https://en.wikipedia.org/wiki/Post-quantum_cryptography). However, Hyperledger Fabric provides a pluggable cryptographic provider, which allows us to replace these algorithms for digital signatures with others. Moreover, according to the director of Information Technology Lab at NIST, the impact of quantum computing on the security of blockchain systems is at least 15 to 30 years from becoming a reality (https://www.coindesk.com/dc-blockchain-hearing-sees-call-for-congressional-commission/).

GDPR considerations

General data protection regulation (GDPR) (https://gdpr-info.eu/) is an EU law that defines how personal data is acquired, processed, and ultimately erased from a computing system. The definition of personal data in GDPR is quite broad—examples include names, email addresses, and IP addresses.

Blockchain, by design, creates an immutable, permanent, and replicated record of data. A blockchain network based on Hyperledger Fabric will obviously encompass these three properties. Thus, storing personal data on a blockchain network that cannot be deleted or modified can be challenging from the perspective of GDPR. Similarly, it is important to know with whom that personal data is shared.

The channel private data feature of Hyperledger Fabric provides a mechanism for determining the entities with which data is shared. In the case of channel private data, the data is never stored on a blockchain, but its cryptographic hashes are stored on the chain. Through...

Summary

In this chapter, we first covered design goals of Hyperledger Fabric that are tied to security. We then described key concepts that impact the security of Hyperledger Fabric-based networks, such as network bootstrap, data governance, strong identities, and smart contract security. We then dove into the common Hyperledger security threats and how Fabric mitigates them.

We also briefly looked at the impact of quantum computing on Hyperledger Fabric.

We ended our discussion with GDPR considerations. In the final chapter, we will be looking at the next steps in Hyperledger and where it is heading in the future.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Blockchain with Hyperledger Fabric - Second Edition
Published in: Nov 2020Publisher: PacktISBN-13: 9781839218750
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (6)

author image
Nitin Gaur

Nitin Gaur, is the director of IBM's Blockchain Labs, and an IBM Distinguished Engineer.
Read more about Nitin Gaur

author image
Anthony O'Dowd

Anthony O'Dowd is a Distinguished Engineer at IBM, focusing on Blockchain. He led IBM's contribution to the design and development of the new smart contract and application SDKs found in Hyperledger Fabric v2. Anthony has also made significant contributions to Hyperledger Fabric documentation and samples.
Read more about Anthony O'Dowd

author image
Petr Novotny

Petr Novotny is a research scientist at IBM Research, with an MSc from University College London and PhD from Imperial College London, where he was also a post-doctoral research associate.
Read more about Petr Novotny

author image
Luc Desrosiers

Luc Desrosiers is an IBM-certified IT architect with 20+ years of experience.
Read more about Luc Desrosiers

author image
Venkatraman Ramakrishna

Venkatraman Ramakrishna is an IBM researcher, with a BTech from IIT Kharagpur and PhD from UCLA.
Read more about Venkatraman Ramakrishna

author image
Salman A. Baset

Dr. Salman A. Baset is the CTO of security in IBM Blockchain Solutions.
Read more about Salman A. Baset

Threat

Description

Hyperledger Fabric

Network/Node Operator

Spoofing

Use of a token or other credential to pretend to be an authorized user, or to...