svid

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultRotatorInterval = 5 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.1.1

type Client interface {
	RenewSVID(ctx context.Context, csr []byte) (*client.X509SVID, error)
	Release()
}

type Rotator

type Rotator interface {
	Run(ctx context.Context) error

	State() State
	Subscribe() observer.Stream
	GetRotationMtx() *sync.RWMutex
	SetRotationFinishedHook(func())
}

func NewRotator

func NewRotator(c *RotatorConfig) (Rotator, client.Client)

type RotatorConfig

type RotatorConfig struct {
	SVIDKeyManager         keymanager.SVIDKeyManager
	Log                    logrus.FieldLogger
	Metrics                telemetry.Metrics
	TrustDomain            spiffeid.TrustDomain
	ServerAddr             string
	NodeAttestor           nodeattestor.NodeAttestor
	Reattestable           bool
	DisableReattestToRenew bool

	// Initial SVID and key
	SVID    []*x509.Certificate
	SVIDKey keymanager.Key

	BundleStream *cache.BundleStream

	// How long to wait between expiry checks
	Interval time.Duration

	// Clk is the clock that the rotator will use to create a ticker
	Clk clock.Clock

	RotationStrategy *rotationutil.RotationStrategy
}

type State

type State struct {
	SVID         []*x509.Certificate
	Key          crypto.Signer
	Reattestable bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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