Skip to content

Commit 1dbca82

Browse files
m
1 parent 8f64de2 commit 1dbca82

File tree

1 file changed

+6
-4
lines changed
  • test_vector_handlers/src/awses_test_vectors/manifests

1 file changed

+6
-4
lines changed

test_vector_handlers/src/awses_test_vectors/manifests/master_key.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,16 @@ class TestVectorsMultiMasterKeyProvider(MasterKeyProvider):
302302
In the ESDK-Python, MasterKey extends MasterKeyProvider;
303303
i.e. MasterKey "is a" MasterKeyProvider; isinstance(some_master_key, MasterKeyProvider) == True.
304304
305-
However, MasterKey overrides MasterKeyProvider's `decrypt_data_key` method.
306305
From AWS ESDK specification:
307306
"A master key MUST supply itself and MUST NOT supply any other master keys."
308307
https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/master-key-interface.md#get-master-key
309308
310-
This suggests that this "is a" relationship is not entirely true.
309+
The MasterKey class overrides MasterKeyProvider's `decrypt_data_key` method to correct this gap.
310+
However, this modification suggests that this "is a" relationship is not entirely true.
311311
312-
master_key_provider_from_master_key_specs uses this class to provide all loaded MasterKeyProviders (or MasterKeys)
313-
from an interface that supports supplying other master keys.
312+
master_key_provider_from_master_key_specs expects to return a MasterKeyProvider, not a MasterKey.
313+
master_key_provider_from_master_key_specs uses this class to always return a MasterKeyProvider
314+
that wraps any MasterKeyProvider or MasterKey loaded from a spec.
314315
"""
315316

316317
_config_class = MasterKeyProviderConfig
@@ -321,6 +322,7 @@ def add_key(self, key_provider):
321322

322323
def _new_master_key(self, key_id):
323324
# This MKP does not have a key associated with it.
325+
# ESDK-Python will find keys in _members.
324326
raise InvalidKeyIdError()
325327

326328

0 commit comments

Comments
 (0)