client

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorMissingSubject = errors.New("Certificate requests submitted to Venafi issuers must have the 'commonName' field or at least one other subject field set.")

Functions

This section is empty.

Types

type ErrCustomFieldsType

type ErrCustomFieldsType struct {
	Type api.CustomFieldType
}

ErrCustomFieldsType provides a common error structure for an invalid Venafi custom field type

func (ErrCustomFieldsType) Error

func (err ErrCustomFieldsType) Error() string

type Interface

type Interface interface {
	RequestCertificate(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error)
	RetrieveCertificate(pickupID string, csrPEM []byte, duration time.Duration, customFields []api.CustomField) ([]byte, error)
	Ping() error
	ReadZoneConfiguration() (*endpoint.ZoneConfiguration, error)
	SetClient(endpoint.Connector)
}

Interface implements a Venafi client

func New

func New(namespace string, secretsLister corelisters.SecretLister, issuer cmapi.GenericIssuer) (Interface, error)

New constructs a Venafi client Interface. Errors may be network errors and should be considered for retrying.

type Venafi

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

Venafi is a implementation of vcert library to manager certificates from TPP or Venafi Cloud

func (*Venafi) Ping

func (v *Venafi) Ping() error

func (*Venafi) ReadZoneConfiguration

func (v *Venafi) ReadZoneConfiguration() (*endpoint.ZoneConfiguration, error)

func (*Venafi) RequestCertificate

func (v *Venafi) RequestCertificate(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error)

This function sends a request to Venafi to for a signed certificate. The CSR will be decoded to be validated against the zone configuration policy. Upon the template being successfully defaulted and validated, the CSR will be sent, as is. It will return a pickup ID which can be used with RetrieveCertificate to get the certificate

func (*Venafi) RetrieveCertificate

func (v *Venafi) RetrieveCertificate(pickupID string, csrPEM []byte, duration time.Duration, customFields []api.CustomField) ([]byte, error)

func (*Venafi) SetClient

func (v *Venafi) SetClient(client endpoint.Connector)

type VenafiClientBuilder

type VenafiClientBuilder func(namespace string, secretsLister corelisters.SecretLister,
	issuer cmapi.GenericIssuer) (Interface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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