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).
Make sure following tools are installed:
- NodeJS 8 (LTS)
- Docker
- Docker-compose
- 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)
-
Navigate to the
attributebased
directory -
Start the Fabric Network and javascript version of attributebased chaincode by running:
./startFabric javascript
-
Go to
javascript
and runnpm install
-
To enroll an admin user, run
node enrollAdmin.js
-
With the enrolled admin, register another user with
node registerUser.js
-
Run
node index.js
file to run the web application. I your terminal you should see the message "app is listening on port 3000 ..." -
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.
- To stop the network, run
./stopFabric