mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user