You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A short description of what the problem is and why we need to fix it. Add reproduction steps if necessary.
I'm using the following code to initialize my sdk in a fastapi server
Our use is mostly decryption of the data. On one of the calls I saw that the decryption failed with CacheKeyError with message Key not found in cache. It seems to have thrown this exception while invalidating the cache entry. The following is the stack trace
Traceback (most recent call last):
File "/backend/app/models.py", line 236, in decrypt_with_kms
plaintext, _ = get_encryption_client().decrypt(
File "/root/.local/share/virtualenvs/backend-gPBFdWVG/lib/python3.8/site-packages/aws_encryption_sdk/__init__.py", line 218, in decrypt
plaintext = decryptor.read()
File "/root/.local/share/virtualenvs/backend-gPBFdWVG/lib/python3.8/site-packages/aws_encryption_sdk/streaming_client.py", line 342, in read
self._prep_message()
File "/root/.local/share/virtualenvs/backend-gPBFdWVG/lib/python3.8/site-packages/aws_encryption_sdk/streaming_client.py", line 941, in _prep_message
self._header, self.header_auth = self._read_header()
File "/root/.local/share/virtualenvs/backend-gPBFdWVG/lib/python3.8/site-packages/aws_encryption_sdk/streaming_client.py", line 1045, in _read_header
decryption_materials = self.config.materials_manager.decrypt_materials(request=decrypt_materials_request)
File "/root/.local/share/virtualenvs/backend-gPBFdWVG/lib/python3.8/site-packages/aws_encryption_sdk/materials_managers/caching.py", line 236, in decrypt_materials
self.cache.remove(cache_entry)
File "/root/.local/share/virtualenvs/backend-gPBFdWVG/lib/python3.8/site-packages/aws_encryption_sdk/caches/local.py", line 151, in remove
raise CacheKeyError("Key not found in cache")
aws_encryption_sdk.exceptions.CacheKeyError: Key not found in cache
Shouldn't this be handled to fail silently. If not how is this supposed to be handled? I know I'm using a global variable although StrictAwsKmsMasterKeyProvider is not supposed to be threadsafe. But this is happening at the CachingManager layer which is thread safe.
If my implementation is wrong could you help me with the right way to do this?
Solution:
N/A
Out of scope:
N/A
The text was updated successfully, but these errors were encountered:
Problem:
A short description of what the problem is and why we need to fix it. Add reproduction steps if necessary.
I'm using the following code to initialize my sdk in a fastapi server
Our use is mostly decryption of the data. On one of the calls I saw that the decryption failed with
CacheKeyError
with messageKey not found in cache
. It seems to have thrown this exception while invalidating the cache entry. The following is the stack traceShouldn't this be handled to fail silently. If not how is this supposed to be handled? I know I'm using a global variable although
StrictAwsKmsMasterKeyProvider
is not supposed to be threadsafe. But this is happening at the CachingManager layer which is thread safe.If my implementation is wrong could you help me with the right way to do this?
Solution:
N/A
Out of scope:
N/A
The text was updated successfully, but these errors were encountered: