alicloudkms

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: MPL-2.0 Imports: 13 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

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

func (*AliCloudKMSSeal) Encrypt

func (k *AliCloudKMSSeal) Encrypt(_ context.Context, plaintext []byte) (*physical.EncryptedBlobInfo, 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