vault

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsDynamicCredentials

type AwsDynamicCredentials struct {
	AccessKeyId     string
	SecretAccessKey string
	Expiry          time.Time
}

type FileTokenStorage

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

func NewFileTokenStorage

func NewFileTokenStorage(path string) (*FileTokenStorage, error)

func (*FileTokenStorage) ReadToken

func (f *FileTokenStorage) ReadToken() (string, error)

func (*FileTokenStorage) StoreToken

func (f *FileTokenStorage) StoreToken(token string) error

type InMemoryTokenStorage

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

func NewPopulatedInMemoryTokenStorage

func NewPopulatedInMemoryTokenStorage(vaultToken string) *InMemoryTokenStorage

func (*InMemoryTokenStorage) ReadToken

func (f *InMemoryTokenStorage) ReadToken() (string, error)

func (*InMemoryTokenStorage) StoreToken

func (f *InMemoryTokenStorage) StoreToken(token string) error

type TokenData

type TokenData struct {
	ExpireTime time.Time
	Renewable  bool
}

func FromSecret

func FromSecret(secret *api.Secret) *TokenData

func (*TokenData) MinutesUntilExpiry

func (token *TokenData) MinutesUntilExpiry() int64

func (*TokenData) PrettyExpiryDate

func (token *TokenData) PrettyExpiryDate() string

type TokenStorage

type TokenStorage interface {
	StoreToken(token string) error
	ReadToken() (string, error)
}

type VaultBackend

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

func NewVaultBackend

func NewVaultBackend(vaultConfig config.VaultConfig) (*VaultBackend, error)

func (*VaultBackend) Cleanup

func (vault *VaultBackend) Cleanup()

func (*VaultBackend) ReadAccount

func (vault *VaultBackend) ReadAccount(hash string) (*certstorage.AcmeAccount, error)

func (*VaultBackend) ReadAwsCredentials

func (vault *VaultBackend) ReadAwsCredentials() (*AwsDynamicCredentials, error)

func (*VaultBackend) ReadFullCertificateData added in v1.3.0

func (vault *VaultBackend) ReadFullCertificateData(domain string) (*certstorage.AcmeCertificate, error)

func (*VaultBackend) ReadPublicCertificateData added in v1.3.0

func (vault *VaultBackend) ReadPublicCertificateData(domain string) (*certstorage.AcmeCertificate, error)

func (*VaultBackend) RenewToken

func (vault *VaultBackend) RenewToken(tokenIncrement int) (bool, error)

RenewToken lookups the currently used token and tries to renew it by a given TTL if it's renewable. Returns true if the token was successfully renewed, otherwise false.

func (*VaultBackend) UnwrapSecretId added in v1.5.0

func (vault *VaultBackend) UnwrapSecretId(token string) (string, error)

UnwrapSecretId accepts a wrapped token and tries to unwrap and return the secret_id.

func (*VaultBackend) WriteAccount

func (vault *VaultBackend) WriteAccount(acmeRegistration certstorage.AcmeAccount) error

func (*VaultBackend) WriteCertificate

func (vault *VaultBackend) WriteCertificate(resource *certstorage.AcmeCertificate) error

Jump to

Keyboard shortcuts

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