-
Notifications
You must be signed in to change notification settings - Fork 20
chore(dafny): add method to Mutate to HV2 without wiring #1445
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
chore(dafny): add method to Mutate to HV2 without wiring #1445
Conversation
| return Success(mutatedItem); | ||
| } | ||
|
|
||
| method MutateToHV2( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To mutate to hv-2 we do:
- Decrypt the branch key
- Modify the Branch Key Context (BKC) according to the Mutation (EC, KMS-ARN, HV)
- Calculate the BKC Digest with the modified BKC
- Pack and Encrypt the Branch Key Item
AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStoreAdmin/src/Mutations.dfy
Show resolved
Hide resolved
| var crypto? := HvUtils.ProvideCryptoClient(); | ||
| if (crypto?.Failure?) { | ||
| var e := Types.KeyStoreAdminException( | ||
| message := "Local Cryptography error: " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the message is misleading - this just means you failed to create a client not that a crypto related operation failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced it with "Creation of internal AtomicPrimitivesClient failed:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at b77ce8d
|
@rishav-karanjit and @josecorella, I noticed you are updating the smithy model files. |
AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStoreAdmin/src/Mutations.dfy
Show resolved
Hide resolved
Creation of internal AtomicPrimitivesClient failed -> Failed to create internal AtomicPrimitivesClient: Co-authored-by: José Corella <[email protected]>
Issue #, if available:
Description of changes:
Adds
MutateToHV2which is not yet wired to mutation logic.Squash/merge commit message, if applicable:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.