spiffe

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 18 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity added in v0.16.0

type Identity struct {
	X509SVID *x509svid.SVID
	JWTSVID  *jwtsvid.SVID
}

Identity contains both X.509 and JWT SVIDs for a workload.

type Options

type Options struct {
	Log           logger.Logger
	RequestSVIDFn RequestSVIDFn

	// WriteIdentityToFile is used to write the identity private key and
	// certificate chain to file. The certificate chain and private key will be
	// written to the `tls.cert` and `tls.key` files respectively in the given
	// directory.
	WriteIdentityToFile *string

	TrustAnchors trustanchors.Interface
}

type RequestSVIDFn

type RequestSVIDFn func(context.Context, []byte) (*SVIDResponse, error)

RequestSVIDFn is the function type that requests SVIDs from a SPIFFE server, returning both X.509 certificates and a JWT token.

type SPIFFE

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

SPIFFE is a readable/writeable store of SPIFFE SVID credentials. Used to manage workload SVIDs, and share read-only interfaces to consumers.

func New

func New(opts Options) *SPIFFE

func (*SPIFFE) JWTSVIDSource added in v0.16.0

func (s *SPIFFE) JWTSVIDSource() jwtsvid.Source

func (*SPIFFE) Ready

func (s *SPIFFE) Ready(ctx context.Context) error

Ready blocks until SPIFFE is ready or the context is done which will return the context error.

func (*SPIFFE) Run

func (s *SPIFFE) Run(ctx context.Context) error

func (*SPIFFE) X509SVIDSource added in v0.16.0

func (s *SPIFFE) X509SVIDSource() x509svid.Source

type SVIDResponse added in v0.16.0

type SVIDResponse struct {
	X509Certificates []*x509.Certificate
	JWT              *string
}

SVIDResponse represents the response from the SVID request function, containing both X.509 certificates and a JWT token.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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