security

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultAgentAddress points to unix socket used by default
	DefaultAgentAddress = "/run/spire/sockets/agent.sock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateObtainer

type CertificateObtainer interface {
	Stop()
	ErrorCh() <-chan error
	CertificateCh() <-chan *Response
}

CertificateObtainer abstracts certificates obtaining

func NewSpireObtainer

func NewSpireObtainer() CertificateObtainer

NewSpireObtainer creates CertificateObtainer that fetch certificates from spire-agent

func NewSpireObtainerWithAddress

func NewSpireObtainerWithAddress(addr net.Addr) CertificateObtainer

NewSpireObtainerWithAddress create CertificateObtainer to passed addr

type Manager

type Manager interface {
	GetCertificate() *tls.Certificate
	GetCABundle() *x509.CertPool
}

Manager provides methods for secure grpc communication

func NewManager

func NewManager() Manager

NewManager creates new security.Manager using SpireCertObtainer

func NewManagerWithCertObtainer

func NewManagerWithCertObtainer(obtainer CertificateObtainer) Manager

NewManagerWithCertObtainer creates new security.Manager with passed CertificateObtainer

type Response

type Response struct {
	TLSCert  *tls.Certificate
	CABundle *x509.CertPool
}

Response represents pair - TLSCert and CABundle that are returned from CertificateObtainer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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