Documentation ¶
Index ¶
- Constants
- func WithAddress(with string) wrapping.Option
- func WithDisableRenewal(with string) wrapping.Option
- func WithKeyIdPrefix(with string) wrapping.Option
- func WithKeyName(with string) wrapping.Option
- func WithLogger(with hclog.Logger) wrapping.Option
- func WithMountPath(with string) wrapping.Option
- func WithNamespace(with string) wrapping.Option
- func WithTlsCaCert(with string) wrapping.Option
- func WithTlsCaPath(with string) wrapping.Option
- func WithTlsClientCert(with string) wrapping.Option
- func WithTlsClientKey(with string) wrapping.Option
- func WithTlsServerName(with string) wrapping.Option
- func WithTlsSkipVerify(with bool) wrapping.Option
- func WithToken(with string) wrapping.Option
- type OptionFunc
- type TransitClient
- func (c *TransitClient) Close()
- func (c *TransitClient) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)
- func (c *TransitClient) Encrypt(ctx context.Context, plaintext []byte) ([]byte, error)
- func (c *TransitClient) GetApiClient() *api.Client
- func (c *TransitClient) GetMountPath() string
- type Wrapper
- func (s *Wrapper) Decrypt(ctx context.Context, in *wrapping.BlobInfo, _ ...wrapping.Option) ([]byte, error)
- func (s *Wrapper) Encrypt(ctx context.Context, plaintext []byte, _ ...wrapping.Option) (*wrapping.BlobInfo, error)
- func (s *Wrapper) Finalize(_ context.Context) error
- func (s *Wrapper) GetClient() transitClientEncryptor
- func (s *Wrapper) Init(_ context.Context) error
- func (s *Wrapper) KeyId(_ context.Context) (string, error)
- func (s *Wrapper) SetConfig(_ context.Context, opt ...wrapping.Option) (*wrapping.WrapperConfig, error)
- func (s *Wrapper) Type(_ context.Context) (wrapping.WrapperType, error)
Constants ¶
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 ¶
func WithAddress ¶
WithAddress provides a way to choose the address
func WithDisableRenewal ¶
WithDisableRenewal provides a way to disable renewal
func WithKeyIdPrefix ¶ added in v2.0.8
WithKeyIdPrefix specifies a prefix to prepend to the keyId (key version)
func WithKeyName ¶
WithKeyName provides a way to choose the key name
func WithLogger ¶
WithLogger provides a way to pass in a logger
func WithMountPath ¶
WithMountPath provides a way to choose the mount path
func WithNamespace ¶
WithNamespace provides a way to choose the namespace
func WithTlsCaCert ¶
WithTlsCaCert provides a way to choose the CA cert
func WithTlsCaPath ¶
WithTlsCaPath provides a way to choose the CA path
func WithTlsClientCert ¶
WithTlsClientCert provides a way to choose the client cert
func WithTlsClientKey ¶
WithTlsClientKey provides a way to choose the client key
func WithTlsServerName ¶
WithTlsServerName provides a way to choose the server name
func WithTlsSkipVerify ¶
WithTlsSkipVerify provides a way to skip TLS verification
Types ¶
type OptionFunc ¶
type OptionFunc func(*options) error
OptionFunc holds a function with local options
type TransitClient ¶
type TransitClient struct {
// contains filtered or unexported fields
}
func (*TransitClient) Close ¶
func (c *TransitClient) Close()
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 (*Wrapper) Decrypt ¶
func (s *Wrapper) Decrypt(ctx context.Context, in *wrapping.BlobInfo, _ ...wrapping.Option) ([]byte, error)
Decrypt is used to decrypt the ciphertext
func (*Wrapper) Encrypt ¶
func (s *Wrapper) Encrypt(ctx context.Context, plaintext []byte, _ ...wrapping.Option) (*wrapping.BlobInfo, error)
Encrypt is used to encrypt using Vault's Transit engine
func (*Wrapper) GetClient ¶
func (s *Wrapper) GetClient() transitClientEncryptor
GetClient returns the transit Wrapper's transitClientEncryptor