kmsprovider

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KmsKeyProvider

type KmsKeyProvider[KT model.MasterKey] struct {
	// contains filtered or unexported fields
}

func New

func New(keyIDs ...string) (*KmsKeyProvider[model.MasterKey], error)

func NewWithOpts

func NewWithOpts(keyIDs []string, optFns ...func(options *Options) error) (*KmsKeyProvider[model.MasterKey], error)

func (*KmsKeyProvider[KT]) AddMasterKey

func (kmsKP *KmsKeyProvider[KT]) AddMasterKey(keyID string) (model.MasterKey, error)

func (*KmsKeyProvider[KT]) DecryptDataKey

func (kmsKP *KmsKeyProvider[KT]) DecryptDataKey(ctx context.Context, encryptedDataKey model.EncryptedDataKeyI, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)

func (*KmsKeyProvider[KT]) DecryptDataKeyFromList

func (kmsKP *KmsKeyProvider[KT]) DecryptDataKeyFromList(ctx context.Context, encryptedDataKeys []model.EncryptedDataKeyI, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)

DecryptDataKeyFromList iterates through EDK, calls DecryptDataKey

func (*KmsKeyProvider[KT]) MasterKeyForDecrypt

func (kmsKP *KmsKeyProvider[KT]) MasterKeyForDecrypt(ctx context.Context, metadata model.KeyMeta) (model.MasterKey, error)

func (*KmsKeyProvider[KT]) MasterKeysForDecryption

func (kmsKP *KmsKeyProvider[KT]) MasterKeysForDecryption() []model.MasterKey

func (*KmsKeyProvider[KT]) MasterKeysForEncryption

func (kmsKP *KmsKeyProvider[KT]) MasterKeysForEncryption(_ context.Context, _ suite.EncryptionContext) (model.MasterKey, []model.MasterKey, error)

func (*KmsKeyProvider[KT]) NewMasterKey

func (kmsKP *KmsKeyProvider[KT]) NewMasterKey(ctx context.Context, keyID string) (model.MasterKey, error)

func (*KmsKeyProvider[KT]) ProviderID

func (kmsKP *KmsKeyProvider[KT]) ProviderID() string

func (*KmsKeyProvider[KT]) ProviderKind

func (kmsKP *KmsKeyProvider[KT]) ProviderKind() types.ProviderKind

func (*KmsKeyProvider[KT]) ValidateMasterKey

func (kmsKP *KmsKeyProvider[KT]) ValidateMasterKey(keyID string) error

func (*KmsKeyProvider[KT]) ValidateProviderID

func (kmsKP *KmsKeyProvider[KT]) ValidateProviderID(otherID string) error

type KmsProvider

type KmsProvider interface {
	model.MasterKeyProvider
	// contains filtered or unexported methods
}

type Options

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

type OptionsFunc

type OptionsFunc func(options *Options) error

func WithAwsLoadOptions

func WithAwsLoadOptions(optFns ...func(options *config.LoadOptions) error) OptionsFunc

func WithClientFactory

func WithClientFactory(factory model.KMSClientFactory) OptionsFunc

func WithDiscovery

func WithDiscovery() OptionsFunc

func WithDiscoveryFilter

func WithDiscoveryFilter(accountIDs []string, partition string) OptionsFunc

func WithDiscoveryRegion

func WithDiscoveryRegion(region string) OptionsFunc

func WithKeyFactory

func WithKeyFactory(keyFactory model.MasterKeyFactory) OptionsFunc

func WithKeyProvider

func WithKeyProvider(keyProvider model.BaseKeyProvider) OptionsFunc

func WithMrkAwareness

func WithMrkAwareness() OptionsFunc

type ProviderType

type ProviderType int
const (
	StrictKmsProvider            ProviderType = iota // Default Strict KMS Provider
	MrkAwareStrictKmsProvider                        // MRK-Aware Strict KMS Provider
	DiscoveryKmsProvider                             // Discovery-Enabled KMS Provider
	MrkAwareDiscoveryKmsProvider                     // MRK-Aware Discovery-Enabled KMS Provider
)

func (ProviderType) String

func (k ProviderType) String() string

Jump to

Keyboard shortcuts

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