fn: SSL config adjustments (#1160)

SSL related FN_NODE_CERT (and related) settings are
not very clear today. Removing this in favor of a
simple map of tls.Config objects. Three keys are
provided for this map:

TLSGRPCServer
TLSAdminServer
TLSWebServer

which correspond to server TLS settings for the
associated services.

Operators/implementers can further add more
keys to the map and add their own TLS config.
This commit is contained in:
Tolga Ceylan
2018-08-06 20:57:03 -07:00
committed by GitHub
parent ff39d0896f
commit f57571fb3a
9 changed files with 157 additions and 175 deletions

View File

@@ -2,6 +2,7 @@ package runnerpool
import (
"context"
"crypto/tls"
"io"
"net/http"
@@ -22,15 +23,8 @@ type RunnerPool interface {
Shutdown(ctx context.Context) error
}
// PKIData encapsulates TLS certificate data
type PKIData struct {
Ca string
Key string
Cert string
}
// MTLSRunnerFactory represents a factory method for constructing runners using mTLS
type MTLSRunnerFactory func(addr, certCommonName string, pki *PKIData) (Runner, error)
type MTLSRunnerFactory func(addr string, tlsConf *tls.Config) (Runner, error)
// RunnerStatus is general information on Runner health as returned by Runner::Status() call
type RunnerStatus struct {