vault

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVaultSdkClient

func CreateVaultSdkClient(vaultAddress string, vaultCaCertFilePath string, logger log.Logger) (*api.Client, error)

func DecodeCert

func DecodeCert(cert []byte) (x509.Certificate, error)

func Login

func Login(client *api.Client, roleID string, secretID string) error

func Unseal

func Unseal(client *api.Client, unsealFile string, logger log.Logger) error

Types

type VaultSecrets

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

func NewVaultSecrets

func NewVaultSecrets(address string, pkiPath string, roleID string, secretID string, CA string, unsealFile string, ocspUrl string, logger log.Logger) (*VaultSecrets, error)

func NewVaultSecretsWithClient

func NewVaultSecretsWithClient(client *api.Client, address string, pkiPath string, roleID string, secretID string, CA string, unsealFile string, ocspUrl string, logger log.Logger) (*VaultSecrets, error)

func (*VaultSecrets) CreateCA

func (vs *VaultSecrets) CreateCA(ctx context.Context, caType dto.CAType, CAName string, privateKeyMetadata dto.PrivateKeyMetadata, subject dto.Subject, caTTL int, enrollerTTL int) (dto.Cert, error)

func (*VaultSecrets) DeleteCA

func (vs *VaultSecrets) DeleteCA(ctx context.Context, caType dto.CAType, ca string) error

func (*VaultSecrets) DeleteCert

func (vs *VaultSecrets) DeleteCert(ctx context.Context, caType dto.CAType, caName string, serialNumber string) error

func (*VaultSecrets) GetCA

func (vs *VaultSecrets) GetCA(ctx context.Context, caType dto.CAType, caName string) (dto.Cert, error)

func (*VaultSecrets) GetCAs

func (vs *VaultSecrets) GetCAs(ctx context.Context, caType dto.CAType) ([]dto.Cert, error)

func (*VaultSecrets) GetCert

func (vs *VaultSecrets) GetCert(ctx context.Context, caType dto.CAType, caName string, serialNumber string) (dto.Cert, error)

func (*VaultSecrets) GetIssuedCerts

func (vs *VaultSecrets) GetIssuedCerts(ctx context.Context, caType dto.CAType, caName string, serialnumbers []ca.IssuedCerts) ([]dto.Cert, error)

func (*VaultSecrets) GetSecretProviderName

func (vs *VaultSecrets) GetSecretProviderName(ctx context.Context) string

func (*VaultSecrets) ImportCA

func (vs *VaultSecrets) ImportCA(ctx context.Context, caType dto.CAType, CAName string, certificate x509.Certificate, privateKey dto.PrivateKey, enrollerTTL int) (dto.Cert, error)

func (*VaultSecrets) SignCertificate

func (vs *VaultSecrets) SignCertificate(ctx context.Context, caType dto.CAType, caName string, csr *x509.CertificateRequest, signVerbatim bool, cn string) (dto.SignResponse, error)

Jump to

Keyboard shortcuts

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