Access control
Before we delve into the implementation of contract
functions, we need to first define our access control mechanism.
A key feature of a secure and permissioned blockchain is access control. The access control mechanism is typically implemented within the contract and thus enforced during transaction processing on multiple endorsing peers, and the result validated through transaction consensus. Additional access control mechanisms can be inbuilt into application layers interacting with the contract.
In Fabric, the membership services provider (MSP) plays a pivotal role in enabling access control. Each organization of a Fabric network can have one or more MSP providers. The MSP is implemented as a Fabric certificate authority (CA). More information on Fabric CA, including its documentation, is available at https://hyperledger-fabric-ca.readthedocs.io/.
Fabric CA issues enrollment certificates (ECerts) for network users. The ECert represents the identity of...