ptls

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SecureTLSConfigMinTLSVersion = tls.VersionTLS13

SecureTLSConfigMinTLSVersion is the minimum tls version in the format expected by tls.Config.

Variables

This section is empty.

Functions

func Default

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

func DefaultLDAP

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

func Legacy

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

func Merge

func Merge(tlsConfigFunc ConfigFunc, tlsConfig *tls.Config)

func Secure

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

Types

type ConfigFunc

type ConfigFunc func(*x509.CertPool) *tls.Config

type PrepareServerConfigFunc added in v0.29.0

type PrepareServerConfigFunc func(c *genericapiserver.RecommendedConfig)

PrepareServerConfigFunc is a function that can prepare a RecommendedConfig before the use of RecommendedOptions.ApplyTo().

func DefaultRecommendedOptions

func DefaultRecommendedOptions(opts *options.RecommendedOptions, f RestConfigFunc) (PrepareServerConfigFunc, error)

DefaultRecommendedOptions configures the RecommendedOptions for a server to use the appropriate cipher suites, min TLS version, and client configuration options for servers that need to accept incoming connections from arbitrary clients (like the impersonation proxy). It returns a PrepareServerConfigFunc which must be used on a RecommendedConfig before passing it to RecommendedOptions.ApplyTo().

func SecureRecommendedOptions

func SecureRecommendedOptions(opts *options.RecommendedOptions, f RestConfigFunc) (PrepareServerConfigFunc, error)

SecureRecommendedOptions configures the RecommendedOptions for a server to use the appropriate cipher suites, min TLS version, and client configuration options for servers that only need to accept incoming connections from certain well known clients which we expect will always use modern TLS settings (like the Kube API server). It returns a PrepareServerConfigFunc which must be used on a RecommendedConfig before passing it to RecommendedOptions.ApplyTo().

type RestConfigFunc

type RestConfigFunc func(*rest.Config) (kubernetes.Interface, *rest.Config, error)

RestConfigFunc allows this package to not depend on the kubeclient package.

Jump to

Keyboard shortcuts

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