Reputation: 41
I am trying to create my own fabric network by taking reference of "basic network" and "First Network" provided in "fabric-samples"
I have came across section called "Policies" in "configtx" yaml file.
Kindly help me to understand significance of this section.
Upvotes: 3
Views: 1628
Reputation: 116
Policies are basically rules/definations that govern access control within a channel. They are of two types
Examples 1. Signature Organizations:
- &Orderer
Name: Orderer
# ID to load the MSP definition as
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/example.com/msp
Policies:
#THIS IS WHERE YOU DEFINE THEM
# SIGNATURE POLICIES USE TERMS LIKE OR,AND,NOutOf etc.
Readers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Writers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Admins:
Type: Signature
Rule: "OR('OrdererMSP.admin')"
Application: &ApplicationDefaults
# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:
# Policies defines the set of policies at this level of the config tree
# For Application policies, their canonical path is
# /Channel/Application/<PolicyName>
# ImplicitMeta Policy types use ANY,Majority etc.
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
You can read more about them here on the hyperledger fabric read the docs :- https://hyperledger-fabric.readthedocs.io/en/release-1.3/policies.html
Upvotes: 3