2017-11-09 11:16:03 +00:00
|
|
|
package tls
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
const certificateHeader = "-----BEGIN CERTIFICATE-----\n"
|
2017-11-09 11:16:03 +00:00
|
|
|
|
2019-07-09 13:18:04 +00:00
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2019-07-12 15:50:04 +00:00
|
|
|
// ClientAuth defines the parameters of the client authentication part of the TLS connection, if any.
|
|
|
|
type ClientAuth struct {
|
|
|
|
CAFiles []FileOrContent `json:"caFiles,omitempty" toml:"caFiles,omitempty" yaml:"caFiles,omitempty"`
|
|
|
|
// ClientAuthType defines the client authentication type to apply.
|
|
|
|
// The available values are: "NoClientCert", "RequestClientCert", "VerifyClientCertIfGiven" and "RequireAndVerifyClientCert".
|
|
|
|
ClientAuthType string `json:"clientAuthType,omitempty" toml:"clientAuthType,omitempty" yaml:"clientAuthType,omitempty"`
|
2017-11-10 09:30:04 +00:00
|
|
|
}
|
|
|
|
|
2019-07-09 13:18:04 +00:00
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2019-06-27 21:58:03 +00:00
|
|
|
// Options configures TLS for an entry point
|
|
|
|
type Options struct {
|
2019-07-12 15:50:04 +00:00
|
|
|
MinVersion string `json:"minVersion,omitempty" toml:"minVersion,omitempty" yaml:"minVersion,omitempty" export:"true"`
|
|
|
|
CipherSuites []string `json:"cipherSuites,omitempty" toml:"cipherSuites,omitempty" yaml:"cipherSuites,omitempty"`
|
|
|
|
ClientAuth ClientAuth `json:"clientAuth,omitempty" toml:"clientAuth,omitempty" yaml:"clientAuth,omitempty"`
|
|
|
|
SniStrict bool `json:"sniStrict,omitempty" toml:"sniStrict,omitempty" yaml:"sniStrict,omitempty" export:"true"`
|
2019-03-14 08:30:04 +00:00
|
|
|
}
|
|
|
|
|
2019-07-09 13:18:04 +00:00
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
// Store holds the options for a given Store
|
|
|
|
type Store struct {
|
2019-07-01 09:30:05 +00:00
|
|
|
DefaultCertificate *Certificate `json:"defaultCertificate,omitempty" toml:"defaultCertificate,omitempty" yaml:"defaultCertificate,omitempty"`
|
2017-11-09 11:16:03 +00:00
|
|
|
}
|
|
|
|
|
2019-07-09 13:18:04 +00:00
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2019-06-27 21:58:03 +00:00
|
|
|
// CertAndStores allows mapping a TLS certificate to a list of entry points.
|
|
|
|
type CertAndStores struct {
|
|
|
|
Certificate `yaml:",inline"`
|
2019-07-01 09:30:05 +00:00
|
|
|
Stores []string `json:"stores,omitempty" toml:"stores,omitempty" yaml:"stores,omitempty"`
|
2017-11-09 11:16:03 +00:00
|
|
|
}
|