## 4 Case Study Implementation Using Hyperledger Fabric
Then, the provider can define the SLA, and the format of the SLA needs to be confirmed by the validator before the consumer can view the document. The issuer issues tokens to consumers as the further steps require tokens. The consumer subscribes the SLA and rents the notebook. In this step, the consumer transfers a certain number of tokens to the provider according to the cost of service level. The consumer can get the login password that is randomly generated by the network and use the obtained password to access the notebook. During the contract period, the consumer can submit an issue to the network if a fault occurs; for instance, the wireless network is disconnected. The network delivers this issue to the provider who can perform the task to resolve the issue. The provider can modify the status of the submitted issue

Figure 10: Interaction with the blockchain file system and off-chain data lake in the case study. in terms of the actual condition. The monitor continually monitors the status and makes decisions accordingly. In the case of that, the issue is not resolved according to the task time defined in the SLA, this can be considered as the violation, and the consumer can get the compensation. If no validation is detected during the contract and the lease is expired, the consumer can terminate the SLA, in turn, cancels the login password and returns the notebook. In this case study, we configure the REST Server to authenticate clients using the Github authentication provider. As shown in Figure 12, the client must authenticate to the REST Server before it is permitted to access to business network resources, which are protected by the OAuth2.0 scheme. The service owner (Github account) can grant consent to the client application. The Github authorization server requests consent of the service owner and issues access tokens to clients. The issued access token is stored in the local storage of the web browser. When the user initiates a subsequent request, the client validates the access token retrieved from the local storage instead of reauthenticating the user. Moreover, the REST Server itself is configured to persist the business network cards that are required to connect to the blockchain network. These business network cards are identities issued by using the Fabric-CA server to register enrollment certificates. Each identity has a standard structure

Figure 11: The simplified workflow of the notebook sharing case study. comprising a descriptive label, an X.509 certificate containing a public key, a private key, and some Fabric-specific metadata. As shown in Figure 13, the sample certificate contains a digital certificate describing a participant called [PERSON]. This certificate includes identifying information such as the PKI that issued the certificate, the creation date of the certificate, and the certificate validity period. The highlighted subject text provides key facts about [PERSON], and it also holds many pieces of information. It is noteworthy that [PERSON]'s public key is distributed within his certificate. However, his private signing key is kept private. Figure 12: Github OAuth2.0 REST authentication overview. Figure 13: Sample participant certificate issued by Fabric-CA using X.509. ## 5 Implementation Results of the Case Study

This section presents the implementation results of the case study in the Hyperledger Composer Playground [45] with various snapshots. It is a web user interface to test the business logic of the smart contract that executes on the Hyperledger Fabric runtime. As shown in Figure 14, the playground wallet holds a set of identities, each issued by the Fabric CA. Figure 15 presents the Composer REST Server explorer, which is used to inspect and test the generated REST API. The smart contract model for a business network is converted into an Open API definition, and at runtime the create, read, update and delete operation are implemented for allowing transactions to be submitted for processing or retrieved.