Welcome to the Linux Foundation Forum!

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

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

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

I get:

  1. 2022/04/13 20:16:05 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-client-config.yaml
  2. 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:

  1. #############################################################################
  2. # Registration section used to register a new identity with fabric-ca server
  3. #
  4. # name - Unique name of the identity
  5. # type - Type of identity being registered (e.g. 'peer, app, user')
  6. # affiliation - The identity's affiliation
  7. # maxenrollments - The maximum number of times the secret can be reused to enroll.
  8. # Specially, -1 means unlimited; 0 means to use CA's max enrollment
  9. # value.
  10. # attributes - List of name/value pairs of attribute for identity
  11. #############################################################################
  12. id:
  13. name:
  14. type:
  15. affiliation:
  16. maxenrollments: 0
  17. attributes:
  18. # - name:
  19. # value:

Any ideas?

Comments

  • 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.

  • Posts: 193

    @matisalimba, Great job! Bobbi

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training