Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPKIProfile ¶
func DefaultPKIProfile() configv1alpha1.PKIProfile
DefaultPKIProfile returns the default PKIProfile for OpenShift.
func KeyPairGeneratorFromAPI ¶
func KeyPairGeneratorFromAPI(apiKey configv1alpha1.KeyConfig) (crypto.KeyPairGenerator, error)
KeyPairGeneratorFromAPI converts a configv1alpha1.KeyConfig to a crypto.KeyPairGenerator.
Types ¶
type CertificateConfig ¶
type CertificateConfig struct {
// Key is the resolved key pair generator.
Key crypto.KeyPairGenerator
}
CertificateConfig holds the resolved configuration for a specific certificate. Currently contains key configuration; will grow as the PKI API expands to include additional certificate properties.
func ResolveCertificateConfig ¶
func ResolveCertificateConfig(provider PKIProfileProvider, certType CertificateType, name string) (*CertificateConfig, error)
ResolveCertificateConfig resolves the effective certificate configuration for a given certificate type and name from the PKI profile.
Returns nil if the provider returns a nil profile (Unmanaged mode), indicating that the caller should use its own default behavior.
The name parameter is reserved for future per-certificate overrides and can be used for metrics and logging.
type CertificateType ¶
type CertificateType string
CertificateType identifies the category of a certificate for profile resolution.
const ( // CertificateTypeSigner identifies certificate authority (CA) certificates // that sign other certificates. CertificateTypeSigner CertificateType = "signer" // CertificateTypeServing identifies TLS server certificates used to serve // HTTPS endpoints. CertificateTypeServing CertificateType = "serving" // CertificateTypeClient identifies client authentication certificates used // to authenticate to servers. CertificateTypeClient CertificateType = "client" // CertificateTypePeer identifies certificates used for both server and client // authentication. The resolved key configuration is the stronger of the // serving and client configurations. CertificateTypePeer CertificateType = "peer" )
type ListerPKIProfileProvider ¶
type ListerPKIProfileProvider struct {
// contains filtered or unexported fields
}
ListerPKIProfileProvider is a PKIProfileProvider that reads a named cluster-scoped PKI resource via a lister.
func NewClusterPKIProfileProvider ¶
func NewClusterPKIProfileProvider(lister configv1alpha1listers.PKILister) *ListerPKIProfileProvider
NewClusterPKIProfileProvider creates a PKIProfileProvider that resolves the PKIProfile from the OpenShift cluster configuration PKI resource.
func NewListerPKIProfileProvider ¶
func NewListerPKIProfileProvider(lister configv1alpha1listers.PKILister, resourceName string) *ListerPKIProfileProvider
NewListerPKIProfileProvider returns a PKIProfileProvider that reads the named cluster-scoped PKI resource via a lister.
func (*ListerPKIProfileProvider) PKIProfile ¶
func (l *ListerPKIProfileProvider) PKIProfile() (*configv1alpha1.PKIProfile, error)
PKIProfile reads the PKI resource and returns the profile based on its certificate management mode. Returns nil for Unmanaged mode.
type PKIProfileProvider ¶
type PKIProfileProvider interface {
PKIProfile() (*configv1alpha1.PKIProfile, error)
}
PKIProfileProvider provides the PKIProfile that determines certificate key configuration. A nil profile indicates Unmanaged mode where the caller should use its own defaults.
type StaticPKIProfileProvider ¶
type StaticPKIProfileProvider struct {
// contains filtered or unexported fields
}
StaticPKIProfileProvider is a PKIProfileProvider backed by a fixed PKIProfile.
func NewStaticPKIProfileProvider ¶
func NewStaticPKIProfileProvider(profile *configv1alpha1.PKIProfile) *StaticPKIProfileProvider
NewStaticPKIProfileProvider returns a PKIProfileProvider backed by the given profile. A nil profile signals Unmanaged mode.
func (*StaticPKIProfileProvider) PKIProfile ¶
func (s *StaticPKIProfileProvider) PKIProfile() (*configv1alpha1.PKIProfile, error)
PKIProfile returns the static PKIProfile.