tlsmanage

package
v0.0.0-...-af321b4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoTLSMaterial = errors.New("no tls material available")
View Source
var (
	HubCertRenewPeriod = time.Hour * 24 * 30 // every 30 days
)

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(cfg ManagerConfig) (*Manager, error)

func (*Manager) Certificate

func (m *Manager) Certificate() (tls.Certificate, error)

func (*Manager) FetchFromVault

func (m *Manager) FetchFromVault() ([]byte, []byte, error)

func (*Manager) GetCertificateFunc

func (m *Manager) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificateFunc returns a function that will return the certificate we have stored when a TLS handshake begins. This allows a background process to renew/recreate the LetsEncrypt cert and be picked up without a restart.

func (*Manager) GetEmail

func (m *Manager) GetEmail() string

func (*Manager) GetPrivateKey

func (m *Manager) GetPrivateKey() crypto.PrivateKey

func (*Manager) GetRegistration

func (m *Manager) GetRegistration() *registration.Resource

func (*Manager) HubMaterial

func (m *Manager) HubMaterial(ctx context.Context) ([]byte, []byte, error)

func (*Manager) RefreshFromVault

func (m *Manager) RefreshFromVault() ([]byte, []byte, error)

func (*Manager) RegisterRenewHandler

func (m *Manager) RegisterRenewHandler(L hclog.Logger, reg *workq.Registry)

func (*Manager) SetupHubCert

func (m *Manager) SetupHubCert(ctx context.Context) error

func (*Manager) SetupRoute53

func (m *Manager) SetupRoute53(sess *session.Session, zoneId string) error

func (*Manager) StoreInVault

func (m *Manager) StoreInVault() error

type ManagerConfig

type ManagerConfig struct {
	L           hclog.Logger
	Domain      string
	KeyPath     string
	VaultClient *api.Client
	Staging     bool
}

Jump to

Keyboard shortcuts

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