tlsprofile

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const APIServerName = "cluster"

APIServerName is the apiserver resource name used to fetch it.

Variables

View Source
var ErrGetInvalidProfile = errors.New("failed to get profile from cluster, using default TLS profile")

ErrGetInvalidProfile happens when the profile is invalid or unknow.

View Source
var ErrGetProfileFromCluster = errors.New("failed to get profile from cluster, using default TLS profile")

ErrGetProfileFromCluster happens when failed to get the cluster security policy in openshift.

View Source
var ErrInvalidTLSVersion = errors.New("invalid TLS version")

ErrInvalidTLSVersion is returned when the TLS version is invalid.

Functions

func GetDefaultTLSSecurityProfile

func GetDefaultTLSSecurityProfile() openshiftconfigv1.TLSSecurityProfile

GetDefaultTLSSecurityProfile get the default tls profile settings if none is specified.

Types

type TLSProfileOptions

type TLSProfileOptions struct {
	// Ciphers is used to specify the cipher algorithms that are negotiated
	// during the TLS handshake.
	Ciphers []string
	// MinTLSVersion is used to specify the minimal version of the TLS protocol
	// that is negotiated during the TLS handshake.
	MinTLSVersion string
}

TLSProfileOptions is the desired behavior of a TLSProfileType.

func Get

Get the profile according to the features configuration, if the policy is invalid or is not specified (empty string) this should return an error, if openshift.ClusterTLSPolicy is enabled, it should get the profile from the cluster, if the cluster return a unknow profile this should return an error.

func GetTLSSettings

GetTLSSettings get the tls settings that belongs to the TLS profile specifications.

func (TLSProfileOptions) MinVersionShort

func (o TLSProfileOptions) MinVersionShort() (string, error)

MinVersionShort returns the min TLS version but only the number instead of VersionTLS10 it will return 1.0.

func (TLSProfileOptions) TLSCipherSuites

func (o TLSProfileOptions) TLSCipherSuites() string

TLSCipherSuites transforms TLSProfileSpec.Ciphers from a slice to a string of elements joined with a comma.

Jump to

Keyboard shortcuts

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