webhook

package
v1.5.6 Latest Latest
Warning

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

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

Documentation

Overview

Package webhook manages the SVID creation and rotation for the k8s-workload-registrar webhook

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SVID

type SVID struct {
	// contains filtered or unexported fields
}

func NewSVID

func NewSVID(ctx context.Context, config SVIDConfig) (*SVID, error)

NewSVID creates a new SVID struct and creates the SPIFFE ID that will be used

func (*SVID) MintSVID

func (e *SVID) MintSVID(ctx context.Context, key crypto.Signer) (err error)

MintSVID requests the SPIRE Server to mint a new SVID for the webhook

func (*SVID) SVIDRotator

func (e *SVID) SVIDRotator(ctx context.Context) error

SVIDRotator requests a new certificate when half of its lifetime is left

type SVIDConfig

type SVIDConfig struct {
	Cluster            string
	Log                logrus.FieldLogger
	Namespace          string
	S                  svidv1.SVIDClient
	TrustDomain        spiffeid.TrustDomain
	WebhookCertDir     string
	WebhookServiceName string
}

Jump to

Keyboard shortcuts

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