tests/robustness: Encrypt peer traffic to prevent proxy manipulating packets
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
@ -478,6 +478,9 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
|
|||||||
peerAdvertiseUrl := url.URL{Scheme: cfg.PeerScheme(), Host: fmt.Sprintf("localhost:%d", peerPort)}
|
peerAdvertiseUrl := url.URL{Scheme: cfg.PeerScheme(), Host: fmt.Sprintf("localhost:%d", peerPort)}
|
||||||
var proxyCfg *proxy.ServerConfig
|
var proxyCfg *proxy.ServerConfig
|
||||||
if cfg.PeerProxy {
|
if cfg.PeerProxy {
|
||||||
|
if !cfg.IsPeerTLS {
|
||||||
|
panic("Can't use peer proxy without peer TLS as it can result in malformed packets")
|
||||||
|
}
|
||||||
peerAdvertiseUrl.Host = fmt.Sprintf("localhost:%d", peer2Port)
|
peerAdvertiseUrl.Host = fmt.Sprintf("localhost:%d", peer2Port)
|
||||||
proxyCfg = &proxy.ServerConfig{
|
proxyCfg = &proxy.ServerConfig{
|
||||||
Logger: zap.NewNop(),
|
Logger: zap.NewNop(),
|
||||||
|
@ -103,6 +103,7 @@ func TestRobustness(t *testing.T) {
|
|||||||
failpoint: RandomMultiNodeClusterFailpoint,
|
failpoint: RandomMultiNodeClusterFailpoint,
|
||||||
traffic: &traffic,
|
traffic: &traffic,
|
||||||
config: *e2e.NewConfig(
|
config: *e2e.NewConfig(
|
||||||
|
e2e.WithIsPeerTLS(true),
|
||||||
e2e.WithSnapshotCount(100),
|
e2e.WithSnapshotCount(100),
|
||||||
e2e.WithPeerProxy(true),
|
e2e.WithPeerProxy(true),
|
||||||
e2e.WithGoFailEnabled(true),
|
e2e.WithGoFailEnabled(true),
|
||||||
|
Reference in New Issue
Block a user