attestor

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSVIDExpired

func IsSVIDExpired(svid []*x509.Certificate, timeNow func() time.Time) bool

IsSVIDExpired returns true if the X.509 SVID provided is expired

Types

type AttestationResult

type AttestationResult struct {
	SVID         []*x509.Certificate
	Key          keymanager.Key
	Bundle       *bundleutil.Bundle
	Reattestable bool
}

type Attestor

type Attestor interface {
	Attest(ctx context.Context) (*AttestationResult, error)
}

func New

func New(config *Config) Attestor

type Config

type Config struct {
	Catalog           catalog.Catalog
	Metrics           telemetry.Metrics
	JoinToken         string
	TrustDomain       spiffeid.TrustDomain
	TrustBundle       []*x509.Certificate
	InsecureBootstrap bool
	Storage           storage.Storage
	Log               logrus.FieldLogger
	ServerAddress     string
	NodeAttestor      nodeattestor.NodeAttestor
}

type ServerStream

type ServerStream struct {
	Client       agentv1.AgentClient
	Csr          []byte
	Log          logrus.FieldLogger
	SVID         []*x509.Certificate
	Reattestable bool
	// contains filtered or unexported fields
}

func (*ServerStream) SendAttestationData

func (ss *ServerStream) SendAttestationData(ctx context.Context, attestationData nodeattestor.AttestationData) ([]byte, error)

func (*ServerStream) SendChallengeResponse

func (ss *ServerStream) SendChallengeResponse(ctx context.Context, response []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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