Hyperledger fabric-network SDK [[{ "code" :56, "message" : "Identity removal is disabled" }]]



我使用IBM区块链平台创建了一个示例项目。

我正在尝试使用默认的管理员身份注销用户:

identityService.delete(userName, adminIdentity, true).then(function() {
wallet.delete(userName);
});

我一直收到这个错误:


(node:48423) UnhandledPromiseRejectionWarning: Error: fabric-ca request identities/gayelabouimaddelete?force=true failed with errors [[{"code":56,"message":"Identity removal is disabled"}]]

尽管管理员帐户具有设置为true的hf.Revoker和设置为"的hf.Registrar.Roles*":


"identities": [
{
"id": "admin",
"type": "client",
"affiliation": "",
"attrs": [
{
"name": "hf.AffiliationMgr",
"value": "1"
},
{
"name": "hf.Registrar.Roles",
"value": "*"
},
{
"name": "hf.Registrar.DelegateRoles",
"value": "*"
},
{
"name": "hf.Revoker",
"value": "1"
},
{
"name": "hf.IntermediateCA",
"value": "1"
},
{
"name": "hf.GenCRL",
"value": "1"
},
{
"name": "hf.Registrar.Attributes",
"value": "*"
}
],
"max_enrollments": -1
},
...
]

您的CA中的身份删除被禁用。在结构ca服务器config.yaml.中添加以下属性(allowremove:true(

#############################################################################
# CA configuration section
#
# Configure the number of incorrect password attempts are allowed for
# identities. By default, the value of 'passwordattempts' is 10, which
# means that 10 incorrect password attempts can be made before an identity get
# locked out.
#############################################################################
cfg:
identities:
passwordattempts: 10
allowremove: true 

最新更新