После выполнения этого урока https://medium.freecodecamp.org/how-to-build-a-blockchain-network-using-hyperledger-fabric-and-composer-e06644ff801d
Когда я использую команду:
composer network start --networkName my-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file my-network-admin.card
Я успешно создаю карту и импортирую ее, используя следующую команду:
composer card import --file my-network-admin.card
Однако проблема заключается в использовании следующей команды:
composer network ping --card admin@my-network
Я получаю следующую ошибку:
транзакция возвращена с ошибкой: AccessException: Participant 'org.hyperledger.composer.system.NetworkAdmin # admin 'не имеет' READ 'доступ к ресурсу' org.hyperledger.composer.system.Network#my-network@0.0.1 'Команда не выполнена
Я имеюпросмотрел документацию и попытался перезапустить весь процесс пару раз безрезультатно.Я даже попытался добавить следующее в мой permissions.acl
файл:
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
rule Default {
description: "Grant all access by default"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
РЕДАКТИРОВАТЬ:
Когда я запускаю composer card list -c admin@my-network
, я получаю следующее:
userName: admin
description:
businessNetworkName: my-network
identityId: fc63d3e4b3b3d73a2be2943a0c422e7af862207f9489fc1ce3707e8769efc99b
roles:
- PeerAdmin
connectionProfile:
name: hlfv1
x-type: hlfv1
credentials: Credentials set
Command succeeded