编辑:rest-server 提供选项“指定是否要保护生成的 REST API:(y/N)”,这是为了强制执行 acl 吗?
我一直在尝试使用 hyperledger-composer node js 客户端设置一个简单的测试。在我的配置中,我有以下内容:
"connection-info" : {
"participantId" : "gk1",
"participantPwd" :"CjysyeLjriRT",
"businessNetworkIdentifier" : "myBizNetwork",
"connectionProfile" : "defaultProfile"}
在我的业务网络定义中,我有以下内容:
rule Default {
description: "DENY all participants access to all resources"
participant: "ANY"
operation: ALL
resource: "net.name.myBizNetwork"
action: DENY }
当我在 node js 应用程序中调用以下代码时,我仍然可以看到资源:
this.bizNetworkConnection.getAssetRegistry('net.name.myBizNetwork.TestAsset');
}).then((registry) => {
return registry.find('testAssetId = ' + id);
显然我想用访问控制做更多的场景,但据我了解,这应该可行。