internal: use go-kms-wrapping for KMS backends (#1012)

* Replace external KMS backend logic for AWS, Azure, and GCP with go-kms-wrapping

* Move kms client setup config into its own package for easier parsing

* Update kms integration flag naming

* Error if nil storage is passed to external KMS

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-02-08 12:03:54 +01:00 committed by GitHub
parent 68ce23b909
commit 3a7b829107
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 1319 additions and 3121 deletions

View file

@ -155,13 +155,10 @@ func newStubKMS(setupErr, getDEKErr error) kmsFactory {
}
type stubKMS struct {
kms.CloudKMS
getDEKErr error
}
func (s *stubKMS) CreateKEK(ctx context.Context, keyID string, kek []byte) error {
return nil
}
func (s *stubKMS) GetDEK(ctx context.Context, dekID string, dekSize int) ([]byte, error) {
if s.getDEKErr != nil {
return nil, s.getDEKErr