Allow to start slasher RPC server with TLS (#6465)

* add warning if slasher server isn't using tls
* pass on tls key and cert to the slasher rpc server
* Merge branch 'master' into slasher-tls
This commit is contained in:
Martin Linkhorst 2020-07-01 21:31:29 +02:00 committed by GitHub
parent 270a64f059
commit aeb0b4bf75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,8 @@ func NewService(ctx context.Context, cfg *Config) *Service {
port: cfg.Port,
detector: cfg.Detector,
slasherDB: cfg.SlasherDB,
withCert: cfg.CertFlag,
withKey: cfg.KeyFlag,
beaconclient: cfg.BeaconClient,
}
}
@ -106,6 +108,10 @@ func (s *Service) Start() {
s.credentialError = err
}
opts = append(opts, grpc.Creds(creds))
} else {
log.Warn("You are using an insecure gRPC server. If you are running your slasher and " +
"validator on the same machines, you can ignore this message. If you want to know " +
"how to enable secure connections, see: https://docs.prylabs.network/docs/prysm-usage/secure-grpc")
}
s.grpcServer = grpc.NewServer(opts...)