为什么只有 ADMIN 用户有权查询 Hyperledger Fabric 中的 installed/instantiated 个链代码

Why only ADMIN user have permission to query installed/instantiated chaincodes in Hyperledger Fabric

我阅读了 Node SDK 教程 ( https://fabric-sdk-node.github.io/tutorial-app-dev-env-setup.html ),它们是这些行:

user identities provisioned this way are only of the MEMBER role, which means it won't be able to perform certain operations reserved for the ADMIN role:

create/update channel

install/instantiate chaincode

query installed/instantiated chaincodes

For these privileged operations, the client must use an ADMIN user to submit the request.

我有一个问题,为什么只有 ADMIN 有权限查询 installed/instantiated chaincodes?

仅针对 查询 调用 ADMIN 用户 将导致额外延迟 network / Response 而不是给定频道中的其他 MEMBER 用户(减少一个用户是 ADMIN 用户的负载)。

如果我引用的上述声明有任何安全隐患,那么它们是什么。

让我试着回答你的问题。 在我看来,链码是非常敏感或私密的东西。没有人希望他们的链码公开,其中包括业务逻辑甚至一些信息流。最好限制这种特权。

其实不仅要查询链码,还要安装和实例化 也得到这个限制。

当我们决定在单个节点上带外安装链代码时,我们决定它应该是 "administrative action"。为了与此保持一致,实际查询对等点以获取已安装的链代码并且 运行 在对等点上也应该是管理操作是有道理的。

我们正在开发更新的访问控制模型,您可以使用该模型为这些 API 设置访问控制策略。