Skip to content

Commit 75f1344

Browse files
author
Srinivasan Muralidharan
committed
FAB-2457 revert acl check in endorser
https://jira.hyperledger.org/browse/FAB-2457 Currently there is no means to specify the policy to use for checking ACL for proposals. The default policy of > 50% admins would not work for most situations (unlike the committer side VSCC validations), especially dev/test situations. Its more reasonable to say "is this creator issuing proposal an admin" as opposed to "are there >50% admins signing off on this proposal". In any case this needs to be revisited. Till then propose we revert checkACL part of https://gerrit.hyperledger.org/r/#/c/6283/ to allow proposals through. Change-Id: I1dce8edfb4676975923017e7cfbd374b47f8c598 Signed-off-by: Srinivasan Muralidharan <[email protected]>
1 parent d1df522 commit 75f1344

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/endorser/endorser.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525

2626
"errors"
2727

28-
"github.com/hyperledger/fabric/common/policies"
2928
"github.com/hyperledger/fabric/common/util"
3029
"github.com/hyperledger/fabric/core/chaincode"
3130
"github.com/hyperledger/fabric/core/chaincode/shim"
@@ -60,6 +59,7 @@ func NewEndorserServer() pb.EndorserServer {
6059
// we use the admins policy, whereas for normal chaincodes
6160
// we use the writers policy
6261
func (*Endorser) checkACL(signedProp *pb.SignedProposal, chdr *common.ChannelHeader, shdr *common.SignatureHeader, hdrext *pb.ChaincodeHeaderExtension) error {
62+
/****** FAB-2457- we need to fix this right
6363
// get policy manager to check ACLs
6464
pm := peer.GetPolicyManager(chdr.ChannelId)
6565
if pm == nil {
@@ -88,6 +88,7 @@ func (*Endorser) checkACL(signedProp *pb.SignedProposal, chdr *common.ChannelHea
8888
chdr.ChannelId,
8989
err)
9090
}
91+
**********/
9192

9293
return nil
9394
}

core/endorser/endorser_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,8 @@ func TestDeployAndUpgrade(t *testing.T) {
514514
// the scenario in which the creator of this proposal is not among
515515
// the writers for the chain
516516
func TestWritersACLFail(t *testing.T) {
517+
//skip pending FAB-2457 fix
518+
t.Skip()
517519
chainID := util.GetTestChainID()
518520
var ctxt = context.Background()
519521

@@ -578,6 +580,8 @@ func TestWritersACLFail(t *testing.T) {
578580
// the scenario in which the creator of this proposal is not among
579581
// the admins for the chain
580582
func TestAdminACLFail(t *testing.T) {
583+
//skip pending FAB-2457 fix
584+
t.Skip()
581585
chainID := util.GetTestChainID()
582586

583587
// here we inject a reject policy for admins

0 commit comments

Comments
 (0)