Documentation ¶
Index ¶
- Constants
- Variables
- func NewKeyManager(options *CLIOptions) (base.KeyManager, error)
- func RegisterCLIParametersWithFlags(flags *flag.FlagSet, prefix string, description string)
- type CLIOptions
- type KeyMapper
- type Loader
- type MasterKeyEncryptorFabric
- func (k MasterKeyEncryptorFabric) GetKeyMapper() baseKMS.KeyMapper
- func (k MasterKeyEncryptorFabric) NewKeyEncryptor(extractor *args.ServiceExtractor, prefix string) (keystore.KeyEncryptor, error)
- func (k MasterKeyEncryptorFabric) NewKeyEncryptorSuite(extractor *args.ServiceExtractor, prefix string) (*crypto.KeyStoreSuite, error)
- func (k MasterKeyEncryptorFabric) RegisterCLIParameters(flags *flag.FlagSet, prefix, description string)
- type PerClientKeyEncryptorFabric
- func (k PerClientKeyEncryptorFabric) GetKeyMapper() baseKMS.KeyMapper
- func (k PerClientKeyEncryptorFabric) NewKeyEncryptor(extractor *args.ServiceExtractor, prefix string) (keystore.KeyEncryptor, error)
- func (k PerClientKeyEncryptorFabric) NewKeyEncryptorSuite(extractor *args.ServiceExtractor, prefix string) (*crypto.KeyStoreSuite, error)
- func (k PerClientKeyEncryptorFabric) RegisterCLIParameters(flags *flag.FlagSet, prefix, description string)
Constants ¶
const AcraMasterKeyKEKID = "acra_master_key"
AcraMasterKeyKEKID represent ID/alias of encryption key used for MasterKey loading
const KeyPolicyCreate = "create"
KeyPolicyCreate represent KMS key policy
const TypeAWS = "aws"
TypeAWS supported KMS type AWS
Variables ¶
var ( ErrMissingKeyPurpose = errors.New("key purpose is required for keyID creating") ErrUnsupportedKeyPurpose = errors.New("unsupported KeyPurpose option provided") ErrEmptyClientIDProvided = errors.New("empty clientID in key context") ErrEmptyZoneIDProvided = errors.New("empty zoneID in key context") )
KmsEncryptor errors
var ErrUnknownKMSType = errors.New("unknown KMS type provided")
ErrUnknownKMSType error displaying unknown KMS type provided by flags
var SupportedPolicies = []string{ KeyPolicyCreate, }
SupportedPolicies contains all possible values for flag `--kms_key_policy`
Functions ¶
func NewKeyManager ¶
func NewKeyManager(options *CLIOptions) (base.KeyManager, error)
NewKeyManager create kms.KeyManager from kms.CLIOptions
Types ¶
type CLIOptions ¶
CLIOptions keep command-line options related to KMS ACRA_MASTER_KEY loading.
func ParseCLIParameters ¶
func ParseCLIParameters(extractor *args.ServiceExtractor) *CLIOptions
ParseCLIParameters parse CLIOptions from CommandLine flags
func ParseCLIParametersFromFlags ¶
func ParseCLIParametersFromFlags(extractor *args.ServiceExtractor, prefix string) *CLIOptions
ParseCLIParametersFromFlags parse CLIOptions from provided FlagSet
type KeyMapper ¶
type KeyMapper struct{}
KeyMapper Implement KeyMapper interface for `kms_per_client` strategy
func NewKMSPerClientKeyMapper ¶
func NewKMSPerClientKeyMapper() *KeyMapper
NewKMSPerClientKeyMapper create new KeyMapper
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is implementation of MasterKeyLoader for kms
func (*Loader) LoadMasterKey ¶
LoadMasterKey implementation kms MasterKeyLoader for loading AcraMasterKey for keystore v1
type MasterKeyEncryptorFabric ¶
type MasterKeyEncryptorFabric struct{}
MasterKeyEncryptorFabric implementation of keyloader.KeyEncryptorFabric for `kms_encrypted_master_key` strategy
func (MasterKeyEncryptorFabric) GetKeyMapper ¶
func (k MasterKeyEncryptorFabric) GetKeyMapper() baseKMS.KeyMapper
GetKeyMapper return KeyMapper for `kms_encrypted_master_key` strategy
func (MasterKeyEncryptorFabric) NewKeyEncryptor ¶
func (k MasterKeyEncryptorFabric) NewKeyEncryptor(extractor *args.ServiceExtractor, prefix string) (keystore.KeyEncryptor, error)
NewKeyEncryptor fabric of keystore.KeyEncryptor for `kms_encrypted_master_key` strategy
func (MasterKeyEncryptorFabric) NewKeyEncryptorSuite ¶
func (k MasterKeyEncryptorFabric) NewKeyEncryptorSuite(extractor *args.ServiceExtractor, prefix string) (*crypto.KeyStoreSuite, error)
NewKeyEncryptorSuite fabric of crypto.KeyStoreSuite for `kms_encrypted_master_key` strategy
func (MasterKeyEncryptorFabric) RegisterCLIParameters ¶
func (k MasterKeyEncryptorFabric) RegisterCLIParameters(flags *flag.FlagSet, prefix, description string)
RegisterCLIParameters empty implementation of KMSMasterKeyKeyEncryptorFabric interface
type PerClientKeyEncryptorFabric ¶
type PerClientKeyEncryptorFabric struct{}
PerClientKeyEncryptorFabric implementation of keyloader.KeyEncryptorFabric for `kms_per_client` strategy
func (PerClientKeyEncryptorFabric) GetKeyMapper ¶
func (k PerClientKeyEncryptorFabric) GetKeyMapper() baseKMS.KeyMapper
GetKeyMapper return KeyMapper for `kms_per_client` strategy
func (PerClientKeyEncryptorFabric) NewKeyEncryptor ¶
func (k PerClientKeyEncryptorFabric) NewKeyEncryptor(extractor *args.ServiceExtractor, prefix string) (keystore.KeyEncryptor, error)
NewKeyEncryptor fabric of keystore.KeyEncryptor for `kms_per_client` strategy
func (PerClientKeyEncryptorFabric) NewKeyEncryptorSuite ¶
func (k PerClientKeyEncryptorFabric) NewKeyEncryptorSuite(extractor *args.ServiceExtractor, prefix string) (*crypto.KeyStoreSuite, error)
NewKeyEncryptorSuite fabric of crypto.KeyStoreSuite for `kms_per_client` strategy
func (PerClientKeyEncryptorFabric) RegisterCLIParameters ¶
func (k PerClientKeyEncryptorFabric) RegisterCLIParameters(flags *flag.FlagSet, prefix, description string)
RegisterCLIParameters empty implementation of KMSMasterKeyKeyEncryptorFabric interface