Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerRootURL = "/ratify/gatekeeper/v1" DefaultMetricsType = "prometheus" DefaultMetricsPort = 8888 DefaultHealthPort = ":9099" )
View Source
const ( VerificationResultVersion = "0.1.0" ResultVersion0_2_0 = "0.2.0" // Starting from this version, the verification result can be // evaluated by Ratify embedded OPA engine. ResultVersionSupportingRego = "1.0.0" ResultVersion1_1_0 = "1.1.0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextHandler ¶
ContextHandler defines a http handler with a context input
type Server ¶
type Server struct { Address string Router *mux.Router GetExecutor config.GetExecutor Context context.Context CertDirectory string CaCertFile string MutationStoreName string MetricsEnabled bool MetricsType string MetricsPort int CacheTTL time.Duration LogOption logger.Option // contains filtered or unexported fields }
type ServerAddrNotFoundError ¶
type ServerAddrNotFoundError struct{}
func (ServerAddrNotFoundError) Error ¶
func (err ServerAddrNotFoundError) Error() string
type TLSCertWatcher ¶
This implementation is based on K8s certwatcher: https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/certwatcher/certwatcher.go
func NewTLSCertWatcher ¶
func NewTLSCertWatcher(ratifyServerCertPath, ratifyServerKeyPath, clientCACertPath string) (*TLSCertWatcher, error)
NewTLSCertWatcher creates a new TLSCertWatcher for ratify tls cert/key paths and client CA cert path
func (*TLSCertWatcher) GetConfigForClient ¶
func (t *TLSCertWatcher) GetConfigForClient(*tls.ClientHelloInfo) (*tls.Config, error)
GetConfigForClient returns the tls config for the client use in the TLS Config
func (*TLSCertWatcher) ReadCertificates ¶
func (t *TLSCertWatcher) ReadCertificates() error
ReadCertificates reads the certificates from the cert/key paths
func (*TLSCertWatcher) Start ¶
func (t *TLSCertWatcher) Start() error
Start adds the files to watcher and starts the certificate watcher routine
func (*TLSCertWatcher) Watch ¶
func (t *TLSCertWatcher) Watch()
Watch watches the certificate files for changes and terminates on error/stop
Click to show internal directories.
Click to hide internal directories.