transit

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MPL-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EnvTransitWrapperMountPath   = "TRANSIT_WRAPPER_MOUNT_PATH"
	EnvVaultTransitSealMountPath = "VAULT_TRANSIT_SEAL_MOUNT_PATH"

	EnvTransitWrapperKeyName   = "TRANSIT_WRAPPER_KEY_NAME"
	EnvVaultTransitSealKeyName = "VAULT_TRANSIT_SEAL_KEY_NAME"

	EnvTransitWrapperDisableRenewal   = "TRANSIT_WRAPPER_DISABLE_RENEWAL"
	EnvVaultTransitSealDisableRenewal = "VAULT_TRANSIT_SEAL_DISABLE_RENEWAL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TransitClient

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

func (*TransitClient) Close

func (c *TransitClient) Close()

func (*TransitClient) Decrypt

func (c *TransitClient) Decrypt(ciphertext []byte) ([]byte, error)

func (*TransitClient) Encrypt

func (c *TransitClient) Encrypt(plaintext []byte) ([]byte, error)

func (*TransitClient) GetApiClient

func (c *TransitClient) GetApiClient() *api.Client

func (*TransitClient) GetMountPath

func (c *TransitClient) GetMountPath() string

type Wrapper

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

Wrapper is a wrapper that leverages Vault's Transit secret engine

func NewWrapper

func NewWrapper(opts *wrapping.WrapperOptions) *Wrapper

NewWrapper creates a new transit wrapper

func (*Wrapper) Decrypt

func (s *Wrapper) Decrypt(_ context.Context, in *wrapping.EncryptedBlobInfo, _ []byte) (pt []byte, err error)

Decrypt is used to decrypt the ciphertext

func (*Wrapper) Encrypt

func (s *Wrapper) Encrypt(_ context.Context, plaintext, aad []byte) (blob *wrapping.EncryptedBlobInfo, err error)

Encrypt is used to encrypt using Vault's Transit engine

func (*Wrapper) Finalize

func (s *Wrapper) Finalize(_ context.Context) error

Finalize is called during shutdown

func (*Wrapper) GetClient

func (s *Wrapper) GetClient() transitClientEncryptor

GetClient returns the transit Wrapper's transitClientEncryptor

func (*Wrapper) HMACKeyID

func (s *Wrapper) HMACKeyID() string

HMACKeyID returns the last known HMAC key id

func (*Wrapper) Init

func (s *Wrapper) Init(_ context.Context) error

Init is called during core.Initialize

func (*Wrapper) KeyID

func (s *Wrapper) KeyID() string

KeyID returns the last known key id

func (*Wrapper) SetConfig

func (s *Wrapper) SetConfig(config map[string]string) (map[string]string, error)

SetConfig processes the config info from the server config

func (*Wrapper) Type

func (s *Wrapper) Type() string

Type returns the type for this particular Wrapper implementation

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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