Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add blockchain level access control in this repository? #38

Open
mna2016 opened this issue Jul 20, 2017 · 5 comments
Open

How to add blockchain level access control in this repository? #38

mna2016 opened this issue Jul 20, 2017 · 5 comments

Comments

@mna2016
Copy link

mna2016 commented Jul 20, 2017

How to introduce blockchain level access control in the minimal contract present in this repository.

Our UI has been using this repository for quite some time now. Switching to composer will mena a lot of changes to the UI code.

Is there a way to introduce blockchain level access control, just the way done in another example of IBM blockchain "car lease demo"?

Appreciate an early response. Thanks.

@risham33
Copy link

Try to see if you can put in a field or header option stating who is accessing. This could be easily checked via a conditional statement to see who is accessing and accomplishing an assess control model

@mna2016
Copy link
Author

mna2016 commented Jul 21, 2017

@risham33 I already planned to attempt something like this. But, for this I will need to make changes in the query methods inside of "iotcontractplatform". And once I do that I will start getting compile errors (during chaincode deploy). As per @kletkeman this is due to "not doing revendoring". I dont know how to revendor at this point in time. DO you have any clue?

@mna2016
Copy link
Author

mna2016 commented Jul 24, 2017

@kletkeman Hi there!
Any clues how I can introduce chain code level security in this repository. Something that can be done quickly.
Thanks for all the information you have provided so far.

@kletkeman
Copy link
Contributor

kletkeman commented Jul 24, 2017

Hi all ... I have not formally verified the port of the IoTCP (contract platform) to fabric v1, and don't have an ETA for that.

What I would do (or preferably will do when there is time) would be to create a fairly simple mechanism with a known admin transaction that allows someone with an admin level account (which can be tested for by examining the ecert passed in and available at the getCreator stub API) and then set up roles with CRUD privileges. Each transaction would then read and check this RBAC table when executing, since the user role is known from the ecert and the CRUD role is implicitly defined in the transaction code itself.

I hope that helps.

@mna2016
Copy link
Author

mna2016 commented Jul 25, 2017

@kletkeman Hi there!
Appreciate the quick response from your side.

Is there a tutorial or link that one can follow in order to develop smart contracts for the hyperledger. I am looking for a comprehensive tutorial that talks about smart contract, shim library, how a typical contract code is structured etc.

This will be a great help. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants