keyvaultx

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyVault

type KeyVault struct {
	keyvault.BaseClient
	// contains filtered or unexported fields
}

KeyVault provides an interface towards the Azure Key Vault primarily used for upload and download of SSL certificates.

func New

func New(kvName string) (KeyVault, error)

func NewFromCLI

func NewFromCLI(kvName string) (KeyVault, error)

Create a new connection to an Azure key vault and use authentication credentials from Azure CLI. You must be logged in to Azure CLI to use this auth method.

func NewFromEnv

func NewFromEnv(kvName string) (KeyVault, error)

Create a new connection to an Azure key vault and fetch authentication from environment variables. See available env var authentications here https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization#use-environment-based-authentication

func (KeyVault) GetCertificate

func (v KeyVault) GetCertificate(ctx context.Context, certName string, secretVersion string, certPassword string) (*x509.Certificate, *rsa.PrivateKey, error)

GetCertificate downloads a certificate and private key from the given Azure key vault.

func (KeyVault) UploadCertificate

func (v KeyVault) UploadCertificate(ctx context.Context, cert *x509.Certificate, key *rsa.PrivateKey, certName string, certPassword string) error

UploadCertificate uploads a new certificate and key pair to the given Azure key vault

Jump to

Keyboard shortcuts

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