Enum network::noise::handshake::HandshakeAuthMode
source · pub enum HandshakeAuthMode {
Mutual {
anti_replay_timestamps: RwLock<AntiReplayTimestamps>,
trusted_peers: Arc<RwLock<PeerSet>>,
},
MaybeMutual(Arc<RwLock<PeerSet>>),
}
Expand description
Noise handshake authentication mode.
Variants§
Mutual
In Mutual
mode, both sides will authenticate each other with their
trusted_peers
set. We also include replay attack mitigation in this mode.
For example, in the Diem validator network, validator peers will only allow connections from other validator peers. They will use this mode to check that inbound connections authenticate to a network public key actually contained in the current validator set.
MaybeMutual(Arc<RwLock<PeerSet>>)
In MaybeMutual
mode, the dialer authenticates the server and the server will allow all
inbound connections from any peer but will mark connections as Trusted
if the incoming
connection is apart of its trusted peers set.