Skip to content

Commit 9c51f9f

Browse files
committed
[FAB-9409] add ACL spec to configtx
Add ACLs property to Application in configtx along with defaults and allow configtxgen to read it. Change-Id: Ib2cad64db3f272b4760743e3177c092c6b2a31b2 Signed-off-by: Srinivasan Muralidharan <srinivasan.muralidharan99@gmail.com>
1 parent f3d14f8 commit 9c51f9f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

common/tools/configtxgen/localconfig/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ type Application struct {
115115
Capabilities map[string]bool `yaml:"Capabilities"`
116116
Resources *Resources `yaml:"Resources"`
117117
Policies map[string]*Policy `yaml:"Policies"`
118+
ACLs map[string]string `yaml:"ACLs"`
118119
}
119120

120121
// Resouces encodes the application-level resources configuration needed to seed the resource tree

sampleconfig/configtx.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,34 @@ Orderer: &OrdererDefaults
327327
#
328328
################################################################################
329329
Application: &ApplicationDefaults
330+
ACLs:
331+
### TODO --- each of these mappings need to be documented
332+
#Lifecycle System Chaincode resource to policy mapping for access control
333+
LSCC.GETCCINFO: /Channel/Application/Readers
334+
LSCC.GETDEPSPEC: /Channel/Application/Readers
335+
LSCC.GETCCDATA: /Channel/Application/Readers
336+
337+
#Query System Chaincode resource to policy mapping for access control
338+
QSCC.GetChainInfo: /Channel/Application/Readers
339+
QSCC.GetBlockByNumber: /Channel/Application/Readers
340+
QSCC.GetBlockByHash: /Channel/Application/Readers
341+
QSCC.GetTransactionByID: /Channel/Application/Readers
342+
QSCC.GetBlockByTxID: /Channel/Application/Readers
343+
344+
#Configuration System Chaincode resource to policy mapping for access control
345+
CSCC.GetConfigBlock: /Channel/Application/Readers
346+
CSCC.GetConfigTree: /Channel/Application/Readers
347+
CSCC.SimulateConfigTreeUpdate: /Channel/Application/Writers
348+
349+
#Proposal resource to policy mapping default for access control
350+
PROPOSAL: /Channel/Application/Writers
351+
352+
#Chaincode-to-Chaincode invocation resource to policy mapping for access control
353+
CC2CC: /Channel/Application/Readers
354+
355+
#Events resource to policy mapping for access control
356+
BLOCKEVENT: /Channel/Application/Readers
357+
FILTEREDBLOCKEVENT: /Channel/Application/Readers
330358

331359
# Organizations lists the orgs participating on the application side of the
332360
# network.

0 commit comments

Comments
 (0)