tlsprofile

package
v0.0.0-...-917f9d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const APIServerClusterName = "cluster"

APIServerClusterName is the singleton apiserver.config.openshift.io object.

Variables

View Source
var DefaultCurvePreferences = []tls.CurveID{
	tls.X25519,
	tls.CurveP256,
	tls.CurveP384,
	tls.CurveP521,
}

DefaultCurvePreferences is the explicit key-exchange curve order for TLS clients (and can be reused for servers) when the cluster TLS profile API does not yet expose curve preferences.

Functions

func ClientTLSConfig

func ClientTLSConfig(rootCAs *x509.CertPool) *tls.Config

ClientTLSConfig returns a tls.Config for outbound HTTPS/TLS clients, or nil if no cluster TLS profile is configured. rootCAs, if non-nil, is used to verify the remote server's certificate chain.

func GetOperandTLSArgs

func GetOperandTLSArgs() []string

GetOperandTLSArgs returns the --tls-min-version/--tls-ciphers args for the honored cluster TLS profile, or nil if none is configured.

func ServerTLSConfig

func ServerTLSConfig(clientCAs *x509.CertPool) *tls.Config

ServerTLSConfig returns a tls.Config for serving HTTPS/TLS, or nil if no cluster TLS profile is configured. clientCAs, if non-nil, is used to verify client certificates presented during the handshake (mTLS).

func SetTLSConfig

func SetTLSConfig(spec *configv1.TLSProfileSpec) error

SetTLSConfig resolves spec into the cached TLS settings and the operand --tls-min-version/--tls-ciphers args derived from them. A nil spec clears the cache: ClientTLSConfig/ServerTLSConfig/GetOperandTLSArgs then report nothing configured.

Callers decide whether the profile should be honored at all using github.com/openshift/library-go/pkg/crypto.ShouldHonorClusterTLSProfile before calling this with a non-nil spec.

Types

type FetchAPIServerFunc

type FetchAPIServerFunc func(ctx context.Context) (*configv1.APIServer, error)

FetchAPIServerFunc retrieves apiserver.config.openshift.io/cluster.

func NewClientReaderAPIServerFetch

func NewClientReaderAPIServerFetch(r ObjectGetter) FetchAPIServerFunc

NewClientReaderAPIServerFetch returns a controller-runtime fetcher for the cluster APIServer.

type ObjectGetter

type ObjectGetter interface {
	Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
}

ObjectGetter is the Get subset used to fetch APIServer.

func NewClientReaderObjectGetter

func NewClientReaderObjectGetter(r client.Reader) ObjectGetter

NewClientReaderObjectGetter adapts a controller-runtime client.Reader to the ObjectGetter interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL