Skip to content

Commit

Permalink
[FAB-2105] Add config schema protos
Browse files Browse the repository at this point in the history
https://jira.hyperledger.org/browse/FAB-2105

Because the new configtx format is so much more flexible than the
original, we need to make sure that it is locked down to keep people
from going crazy with it. The restrictions can be relaxed as the use
cases are made, but initially the goal is to restrict the configuration
to a minimal set and loosen from there.

To do this, protos for a simple schema should be defined so that the
configtx manager can enforce the restrictive configuration scheme.

Change-Id: Iff0df7910aa216a03267beeb86b5b9f3f29d4b70
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Feb 11, 2017
1 parent 417eccb commit f60d3af
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 50 deletions.
3 changes: 3 additions & 0 deletions protos/common/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

157 changes: 107 additions & 50 deletions protos/common/configtx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions protos/common/configtx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ message ConfigTemplate {
repeated ConfigItem items = 1;
}

message ConfigGroupSchema {
map<string, ConfigGroupSchema> groups = 1;
map<string, ConfigValueSchema> values = 2;
map<string, ConfigPolicySchema> policies = 3;
}

message ConfigValueSchema {}

message ConfigPolicySchema {}

// This message may change slightly depending on the finalization of signature schemes for transactions
message Config {
ChannelHeader header = 1;
Expand Down

0 comments on commit f60d3af

Please sign in to comment.