Merge pull request #74 from ceph/devel

rbd: add AAD(additionalAuthData) while unwrapping the DEK
This commit is contained in:
OpenShift Merge Robot 2022-02-07 23:26:17 -05:00 committed by GitHub
commit 25d252ab2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,7 +251,8 @@ func (kms *keyProtectKMS) DecryptDEK(volumeID, encryptedDEK string) (string, err
err)
}
result, err := kms.client.Unwrap(context.TODO(), kms.customerRootKey, ciphertextBlob, nil)
aadVolID := []string{volumeID}
result, err := kms.client.Unwrap(context.TODO(), kms.customerRootKey, ciphertextBlob, &aadVolID)
if err != nil {
return "", fmt.Errorf("failed to unwrap the DEK: %w", err)
}