Skip to content

Commit

Permalink
etcdserver: Added configuration flag --peer-skip-client-verify=true
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Apr 26, 2019
1 parent cca0d5c commit abbd646
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions etcdmain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func newConfig() *config {
fs.StringVar(&cfg.ec.PeerTLSInfo.CRLFile, "peer-crl-file", "", "Path to the peer certificate revocation list file.")
fs.StringVar(&cfg.ec.PeerTLSInfo.AllowedCN, "peer-cert-allowed-cn", "", "Allowed CN for inter peer authentication.")
fs.Var(flags.NewStringsValue(""), "cipher-suites", "Comma-separated list of supported TLS cipher suites between client/server and peers (empty will be auto-populated by Go).")
fs.BoolVar(&cfg.ec.PeerTLSInfo.SkipClientVerify, "peer-skip-client-verify", false, "Skip client IP verification for peer connections.")

fs.Var(
flags.NewUniqueURLsWithExceptions("*", "*"),
Expand Down
4 changes: 4 additions & 0 deletions pkg/transport/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ func wrapTLS(scheme string, tlsinfo *TLSInfo, l net.Listener) (net.Listener, err
if scheme != "https" && scheme != "unixs" {
return l, nil
}
if tlsinfo != nil && tlsinfo.SkipClientVerify {
return NewTLSListener(l, tlsinfo)
}
return newTLSListener(l, tlsinfo, checkSAN)
}

Expand All @@ -66,6 +69,7 @@ type TLSInfo struct {
ClientCertAuth bool
CRLFile string
InsecureSkipVerify bool
SkipClientVerify bool

// ServerName ensures the cert matches the given host in case of discovery / virtual hosting
ServerName string
Expand Down

0 comments on commit abbd646

Please sign in to comment.