vault

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TagFingerprint is the key for the fingerprint meta data in a vault object
	TagFingerprint = "fingerprint"
	// TagKeyAlgo is the key for the PublicKeyAlgorithm meta data in a vault object
	TagKeyAlgo = "keyalgo"
	// TagNotAfter is the key for the expiry date meta data in a vault object
	TagNotAfter = "notafter"
	// TagSubjectCN is the key for the certificate subject common name meta data in a vault object
	TagSubjectCN = "subjectcn"
)

Variables

This section is empty.

Functions

func CertificateID

func CertificateID(subject string, keyalgo string) string

CertificateID generates an object id to be used as an identifier for the cert in the vault

func CertificateIDFromCert

func CertificateIDFromCert(c *cert.Certificate) string

CertificateIDFromCert wraps CertificateID() for a certificate type

Types

type Client added in v1.3.0

type Client struct {
	VaultClient *azsecrets.Client
	VaultURL    string
}

Client represents a certdeploy client

func NewClient

func NewClient(vaultURL string) (*Client, error)

NewClient creates a new vault client

func (*Client) DeleteCertificate added in v1.3.0

func (c *Client) DeleteCertificate(subject string, keyalgo string) error

DeleteCertificate deletes a certificate from vault

func (*Client) GetCertificates added in v1.3.0

func (c *Client) GetCertificates() ([]*cert.Certificate, error)

GetCertificates returns a list of all certificates in vault

func (*Client) PullCertificate added in v1.3.0

func (c *Client) PullCertificate(subject string, keyalgo string) (*cert.Certificate, error)

PullCertificate fetches a certificate from the key vault

func (*Client) PushCertificate added in v1.3.0

func (c *Client) PushCertificate(cert *cert.Certificate) error

PushCertificate uploads a certificate to the key vault

Jump to

Keyboard shortcuts

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