hyperledger-labs/fabric-operations-console

Import of organization asset only not working when using the fabric test-network

aMinuteMan opened this issue · 2 comments

Good day,

This can be reproduced the following way:

  1. Follow all the steps from the readme to setup the test-network and the console
  2. Create assets and do the bulk import

==> The bulk import works.

  1. Start fresh. Follow all the steps from the readme to setup the test-network and the console
  2. Create the assets
  3. Go to the Organizations tab and select "Import MSP definition" and choose e.g. "org1msp_msp.json" and click "Import MSP definition"

==> The import fails with required fields are missing

I can make it work by doing a bulk import, enrolling the MSP admin and adding the certificate from the wallet of Org1s MSP admin to the json file.

From this two questions come to my mind:

  1. Since the bulk import works: What is the consequence of not having the admin cert in the msp.json file?
  2. What would be the best way to add the admin certificate to the json file (e.g. via script?), meaning without a prior bulk import like described above?

this should help
#204

if you would like to add an admin cert to the organization you could do so somewhere here in the script, by calling fabric ca client, get the cert and add to the json...
https://github.com/hyperledger-labs/fabric-operations-console/blob/main/scripts/createAssets.sh#L56

Hello varadgit,

#204 solves it. Thank you very much!