Search code examples
hyperledger-fabricblockchainibm-blockchain

Hyperledger Fabric ACL in configtx.yaml


Please have a look into my issue .I am using hyperledger fabric 1.2 . I am exploring ACL at the time of channel creation. I just copied default Writers Policy and rename it with PankajPolicy and put into the Channel.Application in configtx.yaml see here.

Now the issue is that I just replaced peer/Propose: /Channel/Application/Writers With PankajPolicy in peer/Propose: /Channel/Application/PankajPoilicy. For complete configtx.yaml please have a look see here.

When i create genesis block with this and trying to create the channel evrything goes fine .But at the time of query am getting error

Error: error endorsing query: rpc error: code = Unknown desc = failed evaluating policy on signed data during check policy [/Channel/Application/PankajPoilicy]: [policy /Channel/Application/PankajPoilicy not found] - proposal response: <nil>

Instead if something is wrong then it should stop on write operation means at the time of peer chaincode instansiate.

Thanks in advance !!!


Solution

  • You created your own policy. So according to the comment on sample configtx.yaml

    Policies defines the set of policies at this level of the config tree
        # For Channel policies, their canonical path is
        #   /Channel/<PolicyName>
    

    Your custom defined policy will be accessible on this path /Channel/<PolicyName>

    Please use this peer/Propose: /Channel/PankajPoilicy instead of this peer/Propose: /Channel/Application/PankajPoilicy

    I do not know why your write operations are working with the current configuration.