Restrict user access to only some channels in hyperledger fabric

女生的网名这么多〃 提交于 2020-08-02 21:31:25

问题


In hyperledger fabric, suppose there is a channel, 'channel_12' between org1 and org2 and another channel, 'channel_13' between org1 and org3. Suppose there are 2 users, 'Org1User1' & 'Org1User2' in org1. Can we restrict the access of Org1User1 to channel_12 and that of Org1User2 to channel_13?


回答1:


One way with which we can achieve this is:

While enrolling the user we can set the attributes in the X509 certificate for the user about which channel he has access to. For this, we need to generate a CSR with these details and send it to the CA server.

Now, when the user is submitting the transaction, we can check the value of this attribute on either the client side or within the chaincode. Based on this attribute we can control the access to the channel.

P.S: This is on the certificate level. Would love to know if there are any methods/apis that fabric provides for the same.



来源:https://stackoverflow.com/questions/52056834/restrict-user-access-to-only-some-channels-in-hyperledger-fabric

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!