Gayel Abou Imad
Gayel Abou Imad

Reputation: 41

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

I created a sample project using IBM Blockchain Platform.

I am trying to deregister a user using the default admin indentity :

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

I keep getting this error :


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

although the admin account has the hf.Revoker set to true and hf.Registrar.Roles set to "*" :


"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
            },
      ...
]

Upvotes: 1

Views: 420

Answers (1)

Shubham Jaiswal
Shubham Jaiswal

Reputation: 610

The identity removal in your CA is disabled.Add the following property (allowremove: true) in your fabric-ca-server config.yaml.

#############################################################################
# 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 

Upvotes: 2

Related Questions