client

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 22 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, customFields []api.CustomField) (string, error)
	RetrieveCertificate(pickupID string, csrPEM []byte, customFields []api.CustomField) ([]byte, error)
	Ping() error
	ReadZoneConfiguration() (*endpoint.ZoneConfiguration, error)
	SetClient(endpoint.Connector)
	VerifyCredentials() error
}

Interface implements a Venafi client

func New

func New(namespace string, secretsLister internalinformers.SecretLister, issuer cmapi.GenericIssuer, metrics *metrics.Metrics, logger logr.Logger, userAgent string) (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, 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, customFields []api.CustomField) ([]byte, error)

func (*Venafi) SetClient

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

func (*Venafi) VerifyCredentials added in v1.9.0

func (v *Venafi) VerifyCredentials() error

VerifyCredentials will remotely verify the credentials for the client, both for TPP and Cloud

type VenafiClientBuilder

type VenafiClientBuilder func(namespace string, secretsLister internalinformers.SecretLister,
	issuer cmapi.GenericIssuer, metrics *metrics.Metrics, logger logr.Logger, userAgent string) (Interface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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