Specify an Endorsement Policy

(Hyperledger Fabric v2.x) You can add an endorsement policy when you deploy a chaincode. An endorsement policy specifies the members with peers that must approve, or properly endorse, a chaincode transaction before it’s added to a block and submitted to the ledger.

Endorsement guarantees the legitimacy of a transaction. When you deploy a chaincode on a channel, you can specify an endorsement policy. If you don’t specify an endorsement policy, then the default endorsement policy is used. The default endorsement policy gets an endorsement from any peer on the network.
A member’s endorsing peers must have ReaderWriter permissions on the channel. When a transaction is processed, each endorsing peer returns a signed read-write set. After the client has enough endorsements to meet the endorsement policy requirements, then the client bundles the common read-write set with the signature from the endorsing peers and sends everything to the ordering service, which orders and commits the transactions into blocks and then to the ledger.
You can go to the Channels tab to view a deployed chaincode’s endorsement policy. See View an Endorsement Policy. You can’t modify a deployed chaincode's endorsement policy. If you need to change an endorsement policy, then you must redeploy the chaincode or upgrade it to another version and specify a different endorsement policy.
You must be an administrator to complete this task.
  1. Go to the console and select the Chaincodes tab.
  2. Locate the chaincode package that you want to deploy and use the More Actions menu to begin the deployment process.
  3. On the Deploy Chaincode window, expand Endorsement Policy.
  4. Select Default, Signature Policy or Channel Config Policy, and then specify an expression for the endorsement policy.
    For more information about endorsement policies, see Endorsement policies in the Hyperledger Fabric documentation.
  5. Complete the other fields on the Deploy Chaincode page as needed.
  6. Click Deploy.