2

I am trying to implement role based access control model using blockchain. How do i store these policies? Later my smartcontract should be able to allow or deny the rquest of user based on policie.

Thank you.

1

I think its doable. Yes, users would be permitted or denied access to a function based on their address. Its worth noting that such restriction would not apply to read-only operations owing to the transparent nature of ethereum.

A good starting point is role-based access control in the open zeppelin library.

https://openzeppelin.org/api/docs/ownership_rbac_RBAC.html

Hope it helps.

  • Thank you. But in my case, I don't want to assign a role to an address, my data is something like <user id, user, role> and < role permission>. How do I store them? There are 1000 users. – Shirisha Kollapuram Feb 11 at 8:52
  • Using user id instead of address is probably a mistake. Ethereum provides a very strong user authentication system. Using it is usually the right direction. – Rob Hitchens - B9lab Feb 11 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.