svid

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 21 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 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 {
	Catalog     catalog.Catalog
	Log         logrus.FieldLogger
	Metrics     telemetry.Metrics
	TrustDomain url.URL
	ServerAddr  string
	// Initial SVID and key
	SVID    []*x509.Certificate
	SVIDKey *ecdsa.PrivateKey

	BundleStream *cache.BundleStream

	SpiffeID string

	// 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
}

type State

type State struct {
	SVID []*x509.Certificate
	Key  *ecdsa.PrivateKey
}

Jump to

Keyboard shortcuts

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