You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FAB-2424] Gossip: Extract connection authInfo in comm
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: Yacov Manevich <[email protected]>
gc.logger.Warning("Couldn't find org identity of peer", msg.GetPKIID())
364
+
gc.logger.Warning("Couldn't find org identity of peer", msg.GetConnectionInfo().ID)
365
365
return
366
366
}
367
367
if!gc.IsOrgInChannel(orgID) {
368
-
gc.logger.Warning("Point to point message came from", msg.GetPKIID(), "but it's not eligible for the channel", msg.GetGossipMessage().Channel)
368
+
gc.logger.Warning("Point to point message came from", msg.GetConnectionInfo().ID, "but it's not eligible for the channel", msg.GetGossipMessage().Channel)
0 commit comments