certmanagersec

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertManagerSecurity

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

CertManagerSecurity implements a security provider that auto enrolls with Kubernetes Cert Manager

It only supports being used inside a cluster and does not use the kubernetes API client libraries due to dependencies and just awfulness with go mod

func New

func New(opts ...Option) (*CertManagerSecurity, error)

func (*CertManagerSecurity) CachePublicData

func (cm *CertManagerSecurity) CachePublicData(data []byte, identity string) error

func (*CertManagerSecurity) CachedPublicData

func (cm *CertManagerSecurity) CachedPublicData(identity string) ([]byte, error)

func (*CertManagerSecurity) CallerIdentity

func (cm *CertManagerSecurity) CallerIdentity(caller string) (string, error)

func (*CertManagerSecurity) CallerName

func (cm *CertManagerSecurity) CallerName() string

func (*CertManagerSecurity) ChecksumBytes

func (cm *CertManagerSecurity) ChecksumBytes(data []byte) []byte

func (*CertManagerSecurity) ChecksumString

func (cm *CertManagerSecurity) ChecksumString(data string) []byte

func (*CertManagerSecurity) ClientTLSConfig added in v0.21.0

func (cm *CertManagerSecurity) ClientTLSConfig() (*tls.Config, error)

func (*CertManagerSecurity) Enroll

func (cm *CertManagerSecurity) Enroll(ctx context.Context, wait time.Duration, cb func(digest string, try int)) error

func (*CertManagerSecurity) HTTPClient

func (cm *CertManagerSecurity) HTTPClient(secure bool) (*http.Client, error)

func (*CertManagerSecurity) Identity

func (cm *CertManagerSecurity) Identity() string

func (*CertManagerSecurity) IsRemoteSigning added in v0.24.0

func (cm *CertManagerSecurity) IsRemoteSigning() bool

func (*CertManagerSecurity) PrivilegedVerifyByteSignature

func (cm *CertManagerSecurity) PrivilegedVerifyByteSignature(dat []byte, sig []byte, identity string) bool

func (*CertManagerSecurity) PrivilegedVerifyStringSignature

func (cm *CertManagerSecurity) PrivilegedVerifyStringSignature(dat string, sig []byte, identity string) bool

func (*CertManagerSecurity) Provider

func (cm *CertManagerSecurity) Provider() string

func (*CertManagerSecurity) PublicCert added in v0.23.0

func (cm *CertManagerSecurity) PublicCert() (*x509.Certificate, error)

func (*CertManagerSecurity) PublicCertPem

func (cm *CertManagerSecurity) PublicCertPem() (*pem.Block, error)

func (*CertManagerSecurity) PublicCertTXT

func (cm *CertManagerSecurity) PublicCertTXT() ([]byte, error)

func (*CertManagerSecurity) RemoteSignRequest

func (cm *CertManagerSecurity) RemoteSignRequest(ctx context.Context, str []byte) (signed []byte, err error)

func (*CertManagerSecurity) SSLContext

func (cm *CertManagerSecurity) SSLContext() (*http.Transport, error)

func (*CertManagerSecurity) SignBytes

func (cm *CertManagerSecurity) SignBytes(b []byte) (signature []byte, err error)

func (*CertManagerSecurity) SignString

func (cm *CertManagerSecurity) SignString(s string) (signature []byte, err error)

func (*CertManagerSecurity) TLSConfig

func (cm *CertManagerSecurity) TLSConfig() (*tls.Config, error)

func (*CertManagerSecurity) Validate

func (cm *CertManagerSecurity) Validate() (errs []string, ok bool)

func (*CertManagerSecurity) VerifyByteSignature

func (cm *CertManagerSecurity) VerifyByteSignature(str []byte, signature []byte, identity string) bool

func (*CertManagerSecurity) VerifyCertificate

func (cm *CertManagerSecurity) VerifyCertificate(certpem []byte, identity string) error

func (*CertManagerSecurity) VerifyStringSignature

func (cm *CertManagerSecurity) VerifyStringSignature(str string, signature []byte, identity string) bool

type Config

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

type Option

type Option func(*CertManagerSecurity) error

func WithChoriaConfig

func WithChoriaConfig(c *config.Config) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithLog

func WithLog(l *logrus.Entry) Option

Jump to

Keyboard shortcuts

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