vault

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVaultSdkClient added in v1.0.1

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

func DecodeCert added in v1.0.1

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

func InsertNth added in v1.0.1

func InsertNth(s string, n int) string

func Login

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

func ToHexInt added in v1.0.1

func ToHexInt(n *big.Int) string

func Unseal added in v1.0.1

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

Types

type LoggingRoundTripper added in v1.0.1

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

This type implements the http.RoundTripper interface

func NewLoggingRoundTripper added in v1.0.1

func NewLoggingRoundTripper(next http.RoundTripper) *LoggingRoundTripper

func (LoggingRoundTripper) RoundTrip added in v1.0.1

func (lrt LoggingRoundTripper) RoundTrip(req *http.Request) (res *http.Response, e error)

type VaultSecrets added in v1.0.1

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 added in v1.0.1

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 added in v1.0.1

func (vs *VaultSecrets) CreateCA(ctx context.Context, caType secrets.CAType, CAName string, ca secrets.Cert) (secrets.Cert, error)

func (*VaultSecrets) DeleteCA added in v1.0.1

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

func (*VaultSecrets) DeleteCert added in v1.0.1

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

func (*VaultSecrets) GetCA added in v1.0.1

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

func (*VaultSecrets) GetCAs added in v1.0.1

func (vs *VaultSecrets) GetCAs(ctx context.Context, caType secrets.CAType) (secrets.Certs, error)

func (*VaultSecrets) GetCert added in v1.0.1

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

func (*VaultSecrets) GetIssuedCerts added in v1.0.1

func (vs *VaultSecrets) GetIssuedCerts(ctx context.Context, caType secrets.CAType, caName string) (secrets.Certs, error)

func (*VaultSecrets) GetSecretProviderName added in v1.0.1

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

func (*VaultSecrets) ImportCA added in v1.0.1

func (vs *VaultSecrets) ImportCA(ctx context.Context, caType secrets.CAType, CAName string, caImport secrets.CAImport) error

func (*VaultSecrets) SignCertificate added in v1.0.1

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

Jump to

Keyboard shortcuts

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