certauth

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

certauth helps manage usages and invocations of Certificate Authority related tasks. Different backends may be implemented by providers. For example, a filesystem-backed Certificate Authority might use keys from a file, whereas a CA backed by Key Management Services in Amazon Web Services may dynamically load certificate information as needed.

Index

Constants

View Source
const DefaultName = "default"

Variables

This section is empty.

Functions

func NewDefaultFactory

func NewDefaultFactory() defaultFactory

Types

type ConfigValue

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

func NewConfigValue

func NewConfigValue(manager Manager) ConfigValue

func (*ConfigValue) Configure added in v0.7.0

func (cv *ConfigValue) Configure(name string) error

func (ConfigValue) GetCertificate

func (cv ConfigValue) GetCertificate() (*x509.Certificate, error)

func (ConfigValue) GetCertificatePEM

func (cv ConfigValue) GetCertificatePEM() (string, error)

func (ConfigValue) IsConfigured added in v0.7.0

func (cv ConfigValue) IsConfigured() bool

func (ConfigValue) Name

func (cv ConfigValue) Name() string

func (ConfigValue) SignCertificate

func (cv ConfigValue) SignCertificate(arg0 *x509.Certificate, arg1 interface{}, arg2 logrus.Fields) ([]byte, error)

func (ConfigValue) SignSSHCertificate

func (cv ConfigValue) SignSSHCertificate(arg0 *ssh.Certificate, arg1 logrus.Fields) error

func (*ConfigValue) UnmarshalYAML

func (cv *ConfigValue) UnmarshalYAML(unmarshal func(interface{}) error) error

type Factory

type Factory interface {
	Create(string, string, map[string]interface{}) (Provider, error)
}

Factory allows multiple certificate authority backends to be used.

type Manager

type Manager interface {
	Add(Provider)
	Get(string) (Provider, error)
}

Manager allows multiple certificate authorities to be referenced.

func NewDefaultManager

func NewDefaultManager() Manager

type Provider

type Provider interface {
	Name() string
	GetCertificate() (*x509.Certificate, error)
	GetCertificatePEM() (string, error)
	SignCertificate(*x509.Certificate, interface{}, logrus.Fields) ([]byte, error)
	SignSSHCertificate(*ssh.Certificate, logrus.Fields) error
}

Provider is a certificate authority which can access private keys and allow them to be used by dependents.

type ProviderFactory

type ProviderFactory interface {
	Create(string, map[string]interface{}) (Provider, error)
}

ProviderFactory handles the creation of a specific certificate authority provider with its configuration.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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