security

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CACertKey = "ca.crt"

Variables

This section is empty.

Functions

func GenerateWebhookCert added in v1.8.0

func GenerateWebhookCert(ctx context.Context, log *logr.Logger, cfg *rest.Config, certDir, prefixName, ns string) error

GenerateWebhookCert will create the cert to be used by the webhook. On success, this will have created the certs in the cert directory (CertDir). This is only called when deploying the operator and they have chosen that an internal self-signed cert is used.

func PatchWebhookCABundle added in v1.8.0

func PatchWebhookCABundle(ctx context.Context, log *logr.Logger, cfg *rest.Config, caCert []byte, prefixName, ns string) error

PatchWebhookCABundle will update the webhook configuration with the given CA cert.

func PatchWebhookCABundleFromSecret added in v1.8.0

func PatchWebhookCABundleFromSecret(ctx context.Context, log *logr.Logger, cfg *rest.Config, secretName, prefixName, ns string) error

PatchWebhookCABundleFromSecret will update the webhook configurations with the CA cert in the given secret.

Types

type Certificate

type Certificate interface {
	TLSKey() []byte
	TLSCrt() []byte
	Buildx509() (*x509.Certificate, error)
	BuildPrivateKey() (*rsa.PrivateKey, error)
}

func NewCertificate

func NewCertificate(ca Certificate, keySize int, commonName string, dnsNames []string) (Certificate, error)

NewCertificate will create a certificate using the given CA.

func NewSelfSignedCACertificate

func NewSelfSignedCACertificate(keySize int) (Certificate, error)

NewSelfSignedCACertificate creates and returns a CA certificate

Jump to

Keyboard shortcuts

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