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 ^10.15 (tested with 10.18.1)
- Docker (latest)
- Docker-compose (latest)
- Install the prerequesites and fabric-samples.
NOTE: Install Fabric v2.0 with
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.0.0 1.4.4 0.4.18
- To avoid any conflict with previous network, remove all docker containers.
- docker kill $(docker ps -q)
- docker rm $(docker ps -aq)
-
Start the Fabric Network and javascript version of abacFabric chaincode by running:
./startFabric
-
You may run transactions against the ledger, specified at the end of script execution
-
Navigate to the
abacFabric
directory -
Go to
javascript
and runnpm install
. NOTE: The client is still being refactored
-
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
Tests from the older version are located in the test folder