Skip to content

Commit

Permalink
FAB-2457 revert acl check in endorser
Browse files Browse the repository at this point in the history
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 <muralisr@us.ibm.com>
  • Loading branch information
Srinivasan Muralidharan committed Feb 24, 2017
1 parent d1df522 commit 75f1344
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/endorser/endorser.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

"errors"

"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/core/chaincode"
"github.com/hyperledger/fabric/core/chaincode/shim"
Expand Down Expand Up @@ -60,6 +59,7 @@ func NewEndorserServer() pb.EndorserServer {
// we use the admins policy, whereas for normal chaincodes
// we use the writers policy
func (*Endorser) checkACL(signedProp *pb.SignedProposal, chdr *common.ChannelHeader, shdr *common.SignatureHeader, hdrext *pb.ChaincodeHeaderExtension) error {
/****** FAB-2457- we need to fix this right
// get policy manager to check ACLs
pm := peer.GetPolicyManager(chdr.ChannelId)
if pm == nil {
Expand Down Expand Up @@ -88,6 +88,7 @@ func (*Endorser) checkACL(signedProp *pb.SignedProposal, chdr *common.ChannelHea
chdr.ChannelId,
err)
}
**********/

return nil
}
Expand Down
4 changes: 4 additions & 0 deletions core/endorser/endorser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ func TestDeployAndUpgrade(t *testing.T) {
// the scenario in which the creator of this proposal is not among
// the writers for the chain
func TestWritersACLFail(t *testing.T) {
//skip pending FAB-2457 fix
t.Skip()
chainID := util.GetTestChainID()
var ctxt = context.Background()

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

// here we inject a reject policy for admins
Expand Down

0 comments on commit 75f1344

Please sign in to comment.