Welcome to the Linux Foundation Forum!

Modifying an Identity: Failed to verify if user can act on type 'user'

Options

I'm doing the task of creating a new identity with a wrong type to then practice modifying the identity. However, when I execute:

fabric-ca-client register \
--id.name peer2 \
--id.affiliation org1 \
--id.type user \
--id.secret 'IAMPEER2!' \
-u http://Org1Administrator:Org1Rocks@localhost:7054

I get:

2022/04/13 20:16:05 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-client-config.yaml
Error: Response from server: Error Code: 45 - Failed to verify if user can act on type 'user': : scode: 403, local code: 42, local msg: 'peer1' is not a registrar, remote code: 71, remote msg: Authorization failure

I was able to register indentity previously with no problems. I don't see why it's not allowing me to register an identity of type user. I've checked fabric-ca-client-config.yaml and I see no restrains to do so:

#############################################################################
#  Registration section used to register a new identity with fabric-ca server
#
#  name - Unique name of the identity
#  type - Type of identity being registered (e.g. 'peer, app, user')
#  affiliation - The identity's affiliation
#  maxenrollments - The maximum number of times the secret can be reused to enroll.
#                   Specially, -1 means unlimited; 0 means to use CA's max enrollment
#                   value.
#  attributes - List of name/value pairs of attribute for identity
#############################################################################
id:
  name:
  type:
  affiliation:
  maxenrollments: 0
  attributes:
   # - name:
   #   value:

Any ideas?

Comments

  • matisalimba
    Options

    I found the problem. If you follow instructions in order, but the you try to register peer2, you are enrolled with peer1, who cannot be a registrar. Therefore, enrolling again with Admin user does the trick.

  • Bobbijn
    Bobbijn Posts: 190
    Options

    @matisalimba, Great job! Bobbi

Categories

Upcoming Training