Enabling Web 2.0 users to perform Web3 transactions without ownership of Fabric Wallet: Unveiling our compression approach to innovation
Layered architecture of blockchain from the Research Paper of IEEE Access. Designed by: Md. Ariful Islam Illustrated by Md. Amzad Hossain Jacky

Enabling Web 2.0 users to perform Web3 transactions without ownership of Fabric Wallet: Unveiling our compression approach to innovation

A tested implementation approach and published Q1 journal article.

Blockchain Evolution:

The debate between permissioned vs. permissionless blockchain has primarily evolved into a settled matter. A consensus has been established among most of the blockchain solution architects for endorsing the hybrid blockchain model. This approach not only ensures cost-effectiveness but also provides a delicate balance between data transparency and security control.

In most cases, a hybrid blockchain has a combination of Polygon Net or Ethereum and Hyperledger Fabric. A public blockchain is mainly used for initial token allocation, providing widespread accessibility and liquidity. On the other hand, Hyperledger Fabric is mainly used as an extranet system for managing internal business channels and B2B-level sterling data exchange.

As digital twin maturity levels based on NFT increase, digital twin facility management is becoming more prosperous in cross-border businesses for identifying physical assets.

The more these things are getting commercialized, the demand for authentic immutable enterprise data exchange is rising.

Unlocking Fabric Wallet's Unique Role in Web3 Transactions:

Wallet is a highly dependent concept for Web3 transactions. Be it a Public Blockchain or a Permissioned-Private Blockchain.

The above evolution-related section already shows how important it is to know about Permissioned-Private Blockchain for this continuously growing hybrid blockchain model, where transactions on this private network are impossible without a Fabric Wallet.

Popular Wallets like Meta Mask have plenty of integration resources. Comparatively, Fabric Wallet has fewer resources.

Whereas Fabric's Private Network is strictly controlled by its Certificate Authority (CA Fabric). The Membership Service Provider (MSP) of Hyperledger Fabric authenticate each user and authorize every transaction through the wallet. Without a wallet, no one can enter or perform any operation in this network.

What does Fabric Wallet Contain:

Fabric Wallet is generally a file which contains:

  • A Digital Certificate,
  • A Private Key,
  • The Membership ID (MSP-ID) of a dedicated Organization in the Fabric Network,
  • Type of the Certificate (Example: X.509), and
  • Version

These are the components stored inside a Fabric Wallet. A Sample of a Fabric Wallet is given below:

{
  "credentials": {
    "certificate": "-----BEGIN CERTIFICATE-----\nMIICgzCCAiqgAwIBAgIUM7fyBRI7wiMxvuIONUPPp5ZX8OMwCgYIKoZIzj0EAwIw\ncDELMAS/SdxYW2A4yRSWPoJ7/MnJOnAvw7WAIgUxu2k7g6jCre\np/byPF2x6lwk5PYjn0eUabE26Llg+Ew=\n-----END CERTIFICATE-----\n",
    "privateKey": "-----BEGIN PRIVATE KEY-----\r\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgyGqMbUFu2NjoPR9t\r\nl8IxxvJcs7LKO0/8B9NcLqY9lFg24Z+6pXjjTH50qanvojOKbp\r\n-----END PRIVATE KEY-----\r\n"
  },
  "mspId": "Org1MSP",
  "type": "X.509",
  "version": 1
}        
Here I will share the technical experience of how we have given a large number of users the ability to transact in the private blockchain environment within the conventional user credential system of Web 2.0 applications, where they don't need to adopt the concept of web3 wallet.

Integration of Fabric Wallet


The visual representation of this article where web users are accessing blockchain services with Digital Wallet
The visual representation of this article of where Fabric Wallet is represented as a Digital Health Card

To get connected with permission-private Web3 services I have used hyperledger fabric node sdk. This framework provides SDK support in multiple languages. But to be more specific I have used the Fabric SDK for NodeJS.

But first, make sure an Organization is Registered in the Fabric Network. Under that Organization, there will be an Admin who can enroll users in the Private network so that they can perform transactions on behalf of their organization.


An admin of an Organization node in Hyperledger Fabric enrolling an user with the Help of MSP and Generating Fabric Wallet
Figure 1: User registration/enrollment process in Hyperledger Fabric Network (Generating Fabric Wallet)

Here in Figure 1, I have shown the user enrollment flow where an Organization Admin is registering a new user where Fabric CA is providing the Membership Service Provider (MSP) service. After a successful user registration, a user's Fabric Wallet or Health Card will be generated.

Note: As it was a contribution to healthcare research, we will consider the fabric wallet as a health-card

To know more about the admin/user Roles of Fabric Network you can read more articles on Node Organizational Units (NodeOUs).

For our system, I was using the Fabric SDK in an ExpressJS framework which is an MVC framework. This ExpressJS application enabled blockchain services in the Web 2.0 layer, and its API gateways were able to distribute the blockchain services to other cross-platform applications (mobile-desktop applications).

As mentioned earlier, the proposed system uses the Hyperledger Fabric Framework, and JavaScript SDK while maintaining Object Oriented Programming (OOP) standards. Inheritance is largely used here for adopting SDK components into the NodeJS environment.

  1. “fabric-contract-api”,
  2. “fabric-ca-client” , and
  3. “fabric-network”;

These three modules of Hyperledger Fabric are mostly used in the implementation of the prototype system.

Fabric-Contract-API:

This module is used when a smart contract needs to be installed in a peer or for initializing the smart contract or chain code.

Fabric-network:

This is one of the most important modules that connects the Fabric Wallet to the application layer of the proposed system. From logging a user into the private Blockchain network to creating a Fabric Wallet for that user, this module is widely used. It is also responsible for verifying the Fabric Wallet. Figure 1 represents the complete workflow of this user registration operation. This module also has another object called gateway. This object connects a user to the Blockchain network, which returns a contract object. It helps the client or user perform read, and write operations in the smart contract. The authentication process for user login is also controlled from here.

Fabric-CA-Client:

This module is responsible for establishing communication with the CA server. Whenever fabric-network is used over the Fabric Wallet, the module fabric-ca-client is called each time to authenticate the user and his request. All these processes are managed by the Node.js environment running on internal port 3000. In the Node.js environment, the main web application that actually works with the SDK is developed using the Express framework, which is actually an MVC-based web application framework. This web application acts as a portal between client applications and the Blockchain service. This web application has its own client interface, and also an API service.

Enabling Web 2.0 users in Web3

Now we are getting into the main part. Where we have enabled general web users for web3 transactions without owning them Fabric Wallet.


A flowchard diagram of User Authentication in Hyperledger Fabric Blockchain network with service fabric sdk
Figure 2: User Login Authentication Diagram with Hyperledger Fabric node SDK
Point to be noted that in this approach we are storing the Fabric Wallet in the Server Side Storage.

  1. In Figure 2, I have discussed the authentication process where it can be seen that User Identity and Password are collected from the user as login credentials according to the concept of conventional web application (Web 2.0).
  2. After getting the credentials the Web 2.0 application tries to Map the user's identity with the stored Fabric Wallet which is labeled as Health-Card in the Figure 2 diagram.
  3. If the identity is matched with an existing Fabric Wallet the NodeJS application will check the World State (Offchain Database) of the user's organization to collect the password hash. Then check the password with the hash value.
  4. If the user is authenticated the Web 2.0 Application Layer will bind the Fabric Wallet information (Certificate and Private Key) with the User's Session so that the user can access, and perform transactions in the Web3 network layer.

References

The information written in this article is fully collected from my published Research "Distributed Ledger Technology Based Integrated Healthcare Solution for Bangladesh". This research is Funded by The Research Council of Norway a government's research policy advisor. The contents I have shared here are directly implemented by me and my team member Md Antonin Islam . The research contribution was conducted on behalf of Brain Station 23 . In this research, we have worked on the challenges of blockchain in healthcare. The blockchain technology in healthcare research paper pdf (Free) is also available in IEEE Access (Open Access), and ResearchGate. You can also have the summarized version of our paper at Kudos. In this research, we have worked on the layered architecture of blockchain, fabric wallet integration, load/ stress testing on the blockchain, and also shared the network configuration to blockchain node deployment level details. The pseudocode, and the Blockchain algorithms (RAFT) we have developed in this prototype are also disclosed in this research paper. The whole technical video presentation is also available at IEEE Access.

Feel free to learn and Cite our paper. Thank you.

要查看或添加评论,请登录

Md. Ariful Islam的更多文章

社区洞察

其他会员也浏览了