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

chore(Mutations): respond to comments on PR #720 #751

Merged
merged 9 commits into from
Sep 26, 2024

Conversation

texastony
Copy link
Contributor

@texastony texastony commented Sep 22, 2024

Responding to @josecorella comments on #720 .

Verification failure is due to:

  1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
  2. In AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy, the test assumes type is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

@texastony texastony marked this pull request as ready for review September 22, 2024 21:08
@texastony texastony requested a review from a team as a code owner September 22, 2024 21:08
texastony added a commit that referenced this pull request Sep 23, 2024
…#753)

This resolves feedback from both @seebees  and @josecorella 
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.
Copy link
Contributor

@josecorella josecorella left a comment

Choose a reason for hiding this comment

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

only request is in regards to the error message.

@@ -100,7 +121,7 @@ module {:options "/functionSyntax:4" } Mutations {
)
returns (output: Result<Types.InitializeMutationOutput, Types.Error>)
requires ValidateInitializeMutationInput(input, logicalKeyStoreName).Success?
requires StateStrucs.ValidMutations?(input.mutations) // made not need this
requires StateStrucs.ValidMutations?(input.mutations) // may not need this
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: i believe it is Structs not Strucs

Copy link

@texastony 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?

Copy link

@texastony and @texastony, 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?

1 similar comment
Copy link

@texastony and @texastony, 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?

Copy link

@texastony 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?

…#753)

This resolves feedback from both @seebees  and @josecorella 
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.
@texastony
Copy link
Contributor Author

But in contrast to #754 (comment),
It is AWESOME that this PR still has approval!

i.e: @josecorella Approved this PR and the PR that was merged into it.
And GitHub retained that!
Super Groovy.

@texastony
Copy link
Contributor Author

The KMS Code generation check failed due to throttling by Nuget.

@texastony texastony merged commit 575906b into rc-1.7.0 Sep 26, 2024
67 of 71 checks passed
@texastony texastony deleted the tony/mutations-pr720-response branch September 26, 2024 21:17
texastony added a commit that referenced this pull request Nov 15, 2024
…#753)

This resolves feedback from both @seebees  and @josecorella 
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.
texastony added a commit that referenced this pull request Nov 15, 2024
…#753)

This resolves feedback from both @seebees  and @josecorella 
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.
texastony added a commit that referenced this pull request Nov 15, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Nov 20, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Nov 20, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Nov 20, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Nov 20, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Nov 26, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Dec 2, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Dec 4, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Dec 9, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Dec 11, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Dec 17, 2024
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
ajewellamz pushed a commit that referenced this pull request Dec 18, 2024
…#752)

See #751

Also bumps the Rust toolchain version since the SDKs require 1.81 now.
texastony added a commit that referenced this pull request Jan 22, 2025
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Jan 22, 2025
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
texastony added a commit that referenced this pull request Mar 14, 2025
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
josecorella pushed a commit that referenced this pull request Mar 31, 2025
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
josecorella pushed a commit that referenced this pull request Mar 31, 2025
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
josecorella pushed a commit that referenced this pull request Mar 31, 2025
Explicitly:
- Change InitializeMutationFlag from a union to an enum for ToString reasons
- Model `DoNotVersion` flag for Initialize Mutation
- Refactor Describe Mutation output to detail Input so resume can be done
- Refactor System Key to be optional, detailing that TrustStorage is the default
- More errors
- Smithy changes from PR feedback on #854
- Correction of spelling mistakes
- Mutation Token's UUID is required

Why change the flag to an enum?

Dafny/Smithy-Dafny's support for Union's results in structures that do not print well.
The intention of the  `InitializeMutationFlag` is to inform customers
about the result of their request.

Such information may,
possibly even should,
be logged.

Initialize Mutation and Apply Mutation MUST
ensure that the UUID of the Index and Commitment agree.
Apply MUST ensure that the UUID of the Commitment and Token agree.
The Mutation Token's UUID is REQUIRED.
It is how we track a mutation,
much like how CFN tracks a change set.

Fixed bug where UUID is a reserved word in DDB.

Refactored some of the error messages.
Utilize Java Example to demonstrate resume and restart.
Finally, addressed some of the feedback on PR #854.

feat(Mutations): Idempotent Resume (#854)

Refactor Storage:
- Rename Mutation Lock to Mutation Commitment
- Introduce Mutation Index to describe what items of a Branch Key have been mutated
- Add Input field to Mutation Commitment
- Add Ciphertext field to Mutation Commitment
- When Mutating an item, always write with an optimistic lock
- Allow Initialize Mutation to over write a Version, instead of only creating a version
- When Overwriting a Mutation Index, ensure it has not changed
- Whenever writing for Mutation, ensure the Mutation Commitment's ENC is as expected (along with original and terminal)

Refactor Storage to contain operations that:
1. Allow for Atomic Mutations (maybe cut later)
2. Allow for Deleting a Mutation
3. Allow for Creating a Mutation Index

Refactor KeyStoreAdmin:
- Support a System Key for Mutations
- Stub out the System Key
- Logic for handling Mutation Index

Refactor Initialize Mutation:
- If Commitment & Index already exist and match Input, write nothing and return token
- If Commitment already exists and matches input, write index, and return token
- If Commitment already exists and does not match input, fail
- If no commitment, Initialize Mutation

Refactor Apply Mutation:
- Write an update Page Index.

fix: Dafny intendation formatting

chore: fix Java test examples

chore: more fomratting for CI

feat(Mutations): Native test for Loose access in-flight

feat(Mutations): Example In Flight Mutation Scanner

feat(Mutations-TODO): Some Terminal KMS Exceptions (#795)

If the KMS Call, for mutating the Beacon, fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

If the KMS call for verifying a terminal version fails,
it MAY indicate the MPL Consumer does not have access to the
terminal KMS Key.

Also fix some Dafny tests failing verification.

feat(KS+): More modeled errors (#754)

* refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

* chore(Mutations): address #754\#discussion_r1775676091

#754 (comment)

* chore(Mutations): Address feedback from #750

See #750

* chore(Mutations): address feedback on #742

See #742

refactor(Storage): Use TransactGet instead of BatchGet for GetInitMut (#753)

This resolves feedback from both @seebees  and @josecorella
on Mutations branch.

Verification failure is due to (just like in #751 ):
1. Key Store Admin's Index.dfy not proving Fresh, which has been a long standing issue with the Admin
2. In `AwsCryptographyKeyStore/test/Storage/TestGetItemsForInitializeMutation.dfy`, the test assumes `type` is in the Encryption Context. It is, but Structure.dfy does not prove that, so it must be proven else where.

A .NET MPL job failed due to .NET 48 Sig V4 Auth bug.

test(Mutations): additional testing for Mutations

feat(Mutations): more clean up

feat(Mutations): log statements for ApplyMutation

fix(Storage): typo

fix(Storage): ensure KmsArn is valid

chore(Mutations): respond to comments on PR #720

test(GHW): Run Java Examples for PR CI (#749)

chore(Java): Examples for Mutations (#742)

chore(Mutations): comment out non-GA Mutations (#750)

Crypto Tools, at this time, intends to release Branch Key Mutations
without some operations useful for recovering a dropped Mutation Token
or dealing with the disagreement of a Mutation Token and a Mutation Lock.

Additionally,
we intend to release the Key Store Admin with only support for
one Key Management Strategy.

All checks are green except for Verification.
Verification is failing for the Key Store Admin's Index.dfy.

Verification for the Key Store Admin's Index.dfy
has been failing for a long time.

feat: Mutations BETA (#720)

Beta build of Mutations with several substantial gaps
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