servercert

package
v1.14.8 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Notify(ctx context.Context, t string, r cache.Request, correlationID string, ch chan<- cache.UpdateEvent) error
}

Cache is an interface to represent the necessary methods of the agent/cache.Cache. It is used to request and renew the server leaf certificate.

type CertManager

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

CertManager is responsible for requesting and renewing the leaf cert for server agents. The server certificate is managed internally and used for peering control-plane traffic to the TLS-enabled external gRPC port.

func NewCertManager

func NewCertManager(deps Deps) *CertManager

func (*CertManager) Start

func (m *CertManager) Start(ctx context.Context) error

type Config

type Config struct {
	// Datacenter is the datacenter name the server is configured with.
	Datacenter string

	// ACLsEnabled indicates whether the ACL system is enabled on this server.
	ACLsEnabled bool
}

type Deps

type Deps struct {
	Config          Config
	Logger          hclog.Logger
	Cache           Cache
	GetStore        func() Store
	TLSConfigurator TLSConfigurator
	// contains filtered or unexported fields
}

type Store

type Store interface {
	CAConfig(ws memdb.WatchSet) (uint64, *structs.CAConfiguration, error)
	SystemMetadataGet(ws memdb.WatchSet, key string) (uint64, *structs.SystemMetadataEntry, error)
	AbandonCh() <-chan struct{}
}

Store is an interface to represent the necessary methods of the state.Store. It is used to fetch the CA Config to getStore the trust domain in the TLSConfigurator.

type TLSConfigurator

type TLSConfigurator interface {
	UpdateAutoTLSCert(pub, priv string) error
	UpdateAutoTLSPeeringServerName(name string)
}

TLSConfigurator is an interface to represent the necessary methods of the tlsutil.Configurator. It is used to apply the server leaf certificate and server name.

Jump to

Keyboard shortcuts

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