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

feat: Adding a storage option to the KeyStore #594

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Aug 13, 2024

The key store now allows for both a default DynamoDB table, or any custom storage system.

The important aspect about the key store
is the fact that branch keys can be versioned easily, and are cryptographically safe to use.
The actual storage medium is not important.

See: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/changes/2024-6-17_key-store-persistance/background.md#background

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

@seebees seebees requested a review from a team as a code owner August 13, 2024 23:08
Copy link

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

Copy link

Detected changes to the release files or to the check-files action

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

Detected changes to the release files or to the check-files action

Copy link

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

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

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

Copy link

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

ajewellamz
ajewellamz previously approved these changes Aug 15, 2024
Copy link
Contributor

@ajewellamz ajewellamz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

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

Copy link

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

Copy link

github-actions bot commented Sep 4, 2024

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

Copy link

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

Copy link

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

Copy link

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

Copy link

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

Copy link

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

Copy link

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

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.

looking good!

Comment on lines +338 to +344
// config.ddbTableName,
config.logicalKeyStoreName,
config.kmsConfiguration,
config.grantTokens,
config.kmsClient,
config.ddbClient
config.storage
// config.ddbClient
Copy link
Contributor

Choose a reason for hiding this comment

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

intentional comments?


&& 3 == |writeNewKey.TransactItems|
&& Seq.Last(storage.History.WriteNewEncryptedBranchKey).input.Active
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 liked how above you separated the Seq.Last(..) on line 112 into its own variable that made it easy to follow along. Down below it gets a little difficult to tell what the Seq.Last is referring to.

Copy link

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

Copy link

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

Copy link

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

The key store now allows for both a default DynamoDB table,
or any custom storage system.

The important aspect about the key store
is the fact that branch keys can be versioned easily,
and are cryptographically safe to use.
The actual storage medium is not important.

See: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/changes/2024-6-17_key-store-persistance/background.md#background
Copy link

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

@seebees seebees changed the base branch from main to rc-1.7.0 September 17, 2024 19:29
@seebees seebees merged commit 0f79e74 into rc-1.7.0 Sep 18, 2024
71 checks passed

ensures
&& old(ddbClient.History.GetItem) < ddbClient.History.GetItem
&& old(ddbClient.History.TransactWriteItems) == ddbClient.History.TransactWriteItems
Copy link
Contributor

Choose a reason for hiding this comment

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

@seebees What is going on here?

I just stumbled on this while working on Mutations,
but why assert the history of TransactWriteItems?

Is this a copy-paste mistake?

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.

4 participants