vault: github.com/hashicorp/vault/vault/seal/alicloudkms Index | Files

package alicloudkms

import "github.com/hashicorp/vault/vault/seal/alicloudkms"

Index

Package Files

alicloudkms.go

Constants

const (
    EnvAliCloudKMSSealKeyID = "VAULT_ALICLOUDKMS_SEAL_KEY_ID"
)

type AliCloudKMSSeal Uses

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

func NewSeal Uses

func NewSeal(logger log.Logger) *AliCloudKMSSeal

func (*AliCloudKMSSeal) Decrypt Uses

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 Uses

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 Uses

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 Uses

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

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

func (*AliCloudKMSSeal) KeyID Uses

func (k *AliCloudKMSSeal) KeyID() string

KeyID returns the last known key id.

func (*AliCloudKMSSeal) SealType Uses

func (k *AliCloudKMSSeal) SealType() string

SealType returns the seal type for this particular seal implementation.

func (*AliCloudKMSSeal) SetConfig Uses

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)

Package alicloudkms imports 15 packages (graph) and is imported by 3 packages. Updated 2019-04-18. Refresh now. Tools for package owners.