-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-5309] Set mod_policy for new channel policies
The current configtxgen creates a channel creation tx with policies of Reader/Writer/Admin, where these each do not have a mod_policy set. This makes it difficult to change these policies, because the policy does not exist. It is possible through a roundabout way to change these policies (by removing and re-adding the policy with a different mod_policy), but this is certainly not a painless procedure and requires assistance of the orderer org. This CR updates to configtx processing to validate mod_policy values such that they are valid names. This means that the policy is not empty, and if the policy is path specified (ie using '/'), that each component of the path can be described as a valid config element (does not violate the config element naming rules). This CR additionally sets the mod_policy on the policies generated by configtxgen to "Admins". For users of the old v1.0.0 configtxgen, channel creation will fail with an error for v1.0.1 orderers. However, v1.0.1 configtxgen users will have their transaction appropriately consumed by v1.0.0 orderers. So in summary, upgrading configtxgen without fabric is okay. Upgrading fabric without configtxgen will cause breakage for new channel creation. An additional bug in the configtxgen output was discovered which was not setting a mod_policy on the anchor peers element. There was also an error in the bddtests which mimic the missing policies for the application level policies. Change-Id: Ic2bc120cfb6170f3e4e6cbeac5be145363a64861 Signed-off-by: Jason Yellick <[email protected]>
- Loading branch information
Jason Yellick
committed
Jul 17, 2017
1 parent
8737eba
commit 3a2dd8e
Showing
6 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters