Skip to content
  • YACOVM's avatar
    [FAB-2424] Gossip: Extract connection authInfo in comm · 00a9bd79
    YACOVM authored
    In the previous chapter of FAB-2424(https://gerrit.hyperledger.org/r/#/c/6393/
    
    )
    we took care of channel-based access control by consulting the
    MSP whether a given peer is eligible for a specific channel.
    This works for blocks that are broadcasted, and also for blocks
    that are pulled from peers in the gossip layer,
    but alas - the state transfer layer still stays bare and exposed to
    the mercy of malicious peers!
    
    This commit extends the protos/gossip/extensions.go:ReceivedMessage
    interface and replaces GetPKIID() with GetConnectionInfo() that returns:
    	ID       common.PKIidType
    	Auth     *AuthInfo:
    			SignedData []byte
    			Signature  []byte
    	Identity api.PeerIdentityType
    Using this, in the next commit I'll be able to modify the state
    transfer module by having the predicate it passes to the gossip
    layer when listening for messages from remote peers to also
    call the method provided by the MSP: VerifyByChannel()
    and in this way- to verify that the remote peer
    should indeed receive blocks or not.
    
    Change-Id: I9e2e6f4da430ed062a6fa12bebdfab4add6c4843
    Signed-off-by: default avatarYacov Manevich <yacovm@il.ibm.com>
    00a9bd79