Support etcd TLS certficates (#6719)

This PR supports two models for etcd certs

- Client-to-server transport security with HTTPS
- Client-to-server authentication with HTTPS client certificates
This commit is contained in:
Harshavardhana
2018-10-29 11:14:12 -07:00
committed by kannappanr
parent 7e879a45d5
commit 9fe51e392b
5 changed files with 39 additions and 15 deletions

View File

@@ -218,12 +218,6 @@ func serverMain(ctx *cli.Context) {
logger.EnableQuiet()
}
// Handle all server command args.
serverHandleCmdArgs(ctx)
// Handle all server environment vars.
serverHandleEnvVars()
// Create certs path.
logger.FatalIf(createConfigDir(), "Unable to initialize configuration files")
@@ -236,6 +230,12 @@ func serverMain(ctx *cli.Context) {
globalRootCAs, err = getRootCAs(getCADir())
logger.FatalIf(err, "Failed to read root CAs (%v)", err)
// Handle all server command args.
serverHandleCmdArgs(ctx)
// Handle all server environment vars.
serverHandleEnvVars()
// Is distributed setup, error out if no certificates are found for HTTPS endpoints.
if globalIsDistXL {
if globalEndpoints.IsHTTPS() && !globalIsSSL {