Skip to content

Conversation

@rishav-karanjit
Copy link
Member

@rishav-karanjit rishav-karanjit commented Apr 15, 2025

Issue #, if available:

Description of changes:

Adds MutateToHV2 which is not yet wired to mutation logic.

Squash/merge commit message, if applicable:

chore(dafny): add method to Mutate to HV2 without wiring

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

@rishav-karanjit rishav-karanjit changed the title chore(dafny): add method to Mutate to HV2 with no wiring chore(dafny): add method to Mutate to HV2 without wiring Apr 15, 2025
@rishav-karanjit rishav-karanjit marked this pull request as ready for review April 15, 2025 17:46
@rishav-karanjit rishav-karanjit requested a review from a team as a code owner April 15, 2025 17:46
return Success(mutatedItem);
}

method MutateToHV2(
Copy link
Member Author

@rishav-karanjit rishav-karanjit Apr 15, 2025

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

josecorella
josecorella previously approved these changes Apr 15, 2025
var crypto? := HvUtils.ProvideCryptoClient();
if (crypto?.Failure?) {
var e := Types.KeyStoreAdminException(
message := "Local Cryptography error: " +
Copy link
Contributor

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.

Copy link
Member Author

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:"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done at b77ce8d

@github-actions
Copy link
Contributor

@rishav-karanjit and @josecorella, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

@rishav-karanjit rishav-karanjit dismissed josecorella’s stale review April 16, 2025 01:45

did nits from PR comment

josecorella
josecorella previously approved these changes Apr 16, 2025
Creation of internal AtomicPrimitivesClient failed -> Failed to create internal AtomicPrimitivesClient:

Co-authored-by: José Corella <[email protected]>
@rishav-karanjit rishav-karanjit merged commit 1b5be56 into hv-2/hv-2 Apr 16, 2025
136 checks passed
@rishav-karanjit rishav-karanjit deleted the rishav/hv-2/M2/MutateToHV2-nowiring branch April 16, 2025 22:28
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.

2 participants