alicloudkms

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAliCloudKMSSealKeyID = "VAULT_ALICLOUDKMS_SEAL_KEY_ID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AliCloudKMSSeal

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

func NewSeal

func NewSeal(logger log.Logger) *AliCloudKMSSeal

func (*AliCloudKMSSeal) Decrypt

func (k *AliCloudKMSSeal) Decrypt(_ context.Context, in *physical.EncryptedBlobInfo) (pt []byte, err error)

Decrypt is used to decrypt the ciphertext. This should be called after Init.

func (*AliCloudKMSSeal) Encrypt

func (k *AliCloudKMSSeal) Encrypt(_ context.Context, plaintext []byte) (blob *physical.EncryptedBlobInfo, err error)

Encrypt is used to encrypt the master key using the the AliCloud CMK. This returns the ciphertext, and/or any errors from this call. This should be called after the KMS client has been instantiated.

func (*AliCloudKMSSeal) Finalize

func (k *AliCloudKMSSeal) Finalize(_ context.Context) error

Finalize is called during shutdown. This is a no-op since AliCloudKMSSeal doesn't require any cleanup.

func (*AliCloudKMSSeal) Init

func (k *AliCloudKMSSeal) Init(_ context.Context) error

Init is called during core.Initialize. No-op at the moment.

func (*AliCloudKMSSeal) KeyID

func (k *AliCloudKMSSeal) KeyID() string

KeyID returns the last known key id.

func (*AliCloudKMSSeal) SealType

func (k *AliCloudKMSSeal) SealType() string

SealType returns the seal type for this particular seal implementation.

func (*AliCloudKMSSeal) SetConfig

func (k *AliCloudKMSSeal) SetConfig(config map[string]string) (map[string]string, error)

SetConfig sets the fields on the AliCloudKMSSeal object based on values from the config parameter.

Order of precedence AliCloud values: * Environment variable * Value from Vault configuration file * Instance metadata role (access key and secret key)

Jump to

Keyboard shortcuts

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