A Lightweight Middleware for Secure Data Sharing Between Legacy Databases and Blockchain Systems

Authors

  • Najeebullah University of Peshawar
  • Abdul Haseeb Malik University of Peshawar
  • Qazi Ejaz Ali University of Peshawar
  • Waheed Ur Rehman University of Peshawar
  • Saif Ur Rehman University of Peshawar
  • Inam Ullah University of Peshawar

DOI:

https://doi.org/10.54692/lgurjcsit.v10i1.197

Keywords:

Middleware; , Blockchain; , Legacy Database; , Change Data Capture; , Debezium;

Abstract

Important documents are stored in institutional databases, but they are unable to demonstrate to an external party that they have not been altered. Moving a complete institutional database onto a distributed ledger is impractical due to the expense, technological complexity and infrastructural constraints that most institutions encounter. However, blockchain technology provides a tamper-evident ledger that precisely solves this issue. This paper presents a lightweight middleware that adopts a more practical approach: Hyperledger Fabric saves a cryptographic proof of each committed modification, while the operational database continues to function normally. The middleware tracks database changes in real time using Debezium Change Data Capture. A Node.js pipeline that automatically maps relational schemas using INFORMATION_SCHEMA metadata processes events that are sent via Apache Kafka. It employs SHA-256 hashing to detect duplicate events at the event and content levels, enforces role-based access control and removes personally identifiable information right before hashing. It generates canonical JSON representations, transmits verified payloads to Hyperledger Fabric with batching, automatic retry and read-back finality testing and logs the identity and source of every database actor using MySQL triggers and an audit context table. A web-based monitoring dashboard allows administrators to view the pipeline in real time without requiring any knowledge of blockchain. Different actual batches insert occurrences and six correctness situations were tested. All of the scenarios were successful. For all workload sizes, throughput remained constant at 0.48 events per second. The findings support steady scalability, policy dependability and functional correctness in an institutional deployment setting with limited resources.

Author Biographies

Abdul Haseeb Malik, University of Peshawar

Rank: Assistant Professor
Department: Computer Science, University of Peshawar

Qazi Ejaz Ali, University of Peshawar

RanK: Assistant Professor
Deaprtment: Computer Science, University of Peshawar

Waheed Ur Rehman, University of Peshawar

RanK: Assistant Professor
Deaprtment: Computer Science, University of Peshawar

Saif Ur Rehman, University of Peshawar

RanK: Assistant Professor
Deaprtment: Computer Science, University of Peshawar

Inam Ullah, University of Peshawar

Rank: MS Scholar

Deaprtment: Computer Science, University of Peshawar

Downloads

Published

08-06-2026

Issue

Section

Articles