Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Better messages when no keyring succeeded to decrypt #319

Closed

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Apr 25, 2020

Related #152

If no keyrings attempt to decrypt any encrypted data keys,
then the message can not be decrypted.
The code attempted to enforce this,
by retrieving the unencrypted data key in node.

There were two issues here

  1. The check ensure the validity of the materials,
    itself threw an error.
  2. Had this check succeeded, the error message
    'Unencrypted data key is invalid.’ is not incredibly more helpful than
    'unencryptedDataKey has not been set'

The error message has been updated,
and the tests have been updated
to verify this error message.

On a related note
awslabs/aws-encryption-sdk-specification#97
starts to explore some additional possibilities.
The fullness of this issue is not only in failure,
but success can also have similar issues.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

If no keyrings attempt to decrypt any encrypted data keys,
then the message can not be decrypted.
The code attempted to enforce this,
by retrieving the unencrypted data key in node.

There were two issues here

1. The check ensure the validity of the materials,
itself threw an error.
1. Had this check succeeded, the error message
`'Unencrypted data key is invalid.’` is not incredibly more helpful than
'unencryptedDataKey has not been set'

The error message has been updated,
and the tests have been updated
to verify _this_ error message.

On a related note
awslabs/aws-encryption-sdk-specification#97
starts to explore some additional possibilities.
The fullness of this issue is not only in failure,
but success can also have similar issues.
@seebees seebees requested a review from a team April 25, 2020 00:16
@seebees
Copy link
Contributor Author

seebees commented Aug 7, 2020

moving to spec v1

@seebees seebees closed this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant