Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 2.2 KB

File metadata and controls

44 lines (27 loc) · 2.2 KB

Hyperledger-Fabric-Based-Acess-Control

Build Status Codacy Badge

Welcome to the Hyperledger Fabric Based Access Control project.

This project aims to mediate the access control flow coming from a centralized system, enhancing auditability and access control policy enforcement. It discourages illicit accesses, as the system administrators are not able to tamper the access logs (if applicable).

Pre-requisites

Make sure following tools are installed:

  • NodeJS 8 (LTS)
  • Docker
  • Docker-compose

Installation steps

  1. To avoid any conflict with the prevoius network, kill docker containers and remove docker images (Please note that that this will take down all of your containers and removes all images which has container name starting with dev)
  • docker kill $(docker ps -q)
  • docker rm $(docker ps -aq)
  • docker rmi $(docker images dev-* -q)
  1. Navigate to the attributebased directory

  2. Start the Fabric Network and javascript version of attributebased chaincode by running: ./startFabric javascript

  3. Go to javascript and run npm install

Demonstration

  1. To enroll an admin user, run node enrollAdmin.js

  2. With the enrolled admin, register another user with node registerUser.js

  3. Run node index.js file to run the web application. I your terminal you should see the message "app is listening on port 3000 ..."

  4. In your browser go to the address localhost:3000. Now you record subjects and resources attributes and policies in JSON format on the ledger. Query the stored data. And check the access permissions based on stored data and given rule.

Shutting the network down

  1. To stop the network, run ./stopFabric