Skip to content

feat(encryption/kms): Implement KeyManagementClient for AWS KMS#2466

Draft
hsiang-c wants to merge 2 commits into
apache:mainfrom
hsiang-c:aws_kms_client
Draft

feat(encryption/kms): Implement KeyManagementClient for AWS KMS#2466
hsiang-c wants to merge 2 commits into
apache:mainfrom
hsiang-c:aws_kms_client

Conversation

@hsiang-c
Copy link
Copy Markdown

Which issue does this PR close?

What changes are included in this PR?

  • Add AWS KMS implementation of KeyManagementClient
  • Note that the generate_key() AWS KMS API takes a DataKeySpec to specify the length of the data key. To accommodate it, I introduced one more key_size: AesKeySize argument to @xanderbailey 's API. I think we need more discussion about it.

Are these changes tested?

Yes, unit test.

@hsiang-c
Copy link
Copy Markdown
Author

cc @xanderbailey

}

/// Creates an `AwsKeyManagementClient` from a pre-configured AWS KMS client.
pub fn new_with_client(kms_client: Client) -> Self {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the idea here that we would configure the Client in the AwsKmsFactory? https://github.com/apache/iceberg/blob/6d8ebbb1033cbda1360b0ab5d21e5706b1dcadce/aws/src/main/java/org/apache/iceberg/aws/AwsKeyManagementClient.java#L53-L59. We're exposing the Client now as a part of our public API doesn't quite seem right to me?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if we should introduce the factory first to get an idea for what the right way to construct the KMS is?

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