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: [sc-44563] Wrap Encryption related APIs #170

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

rroelke
Copy link
Member

@rroelke rroelke commented Sep 27, 2024

Story details: https://app.shortcut.com/tiledb-inc/story/44563

This pull request enables interactions with encrypted arrays, and adds a unit test demonstrating creating an encrypted array and opening it, following along the C API example.

The encryption key is set on the tiledb Config object. As this seems like a common use case, we add the convenience API CommonOption which makes configuration settings much more discoverable than writing the string in documentation somewhere.

@rroelke rroelke requested a review from davisp September 27, 2024 14:17
@rroelke rroelke force-pushed the rr/sc-44563-encryption-api branch from 6c15987 to 05688cc Compare September 27, 2024 14:35
Copy link
Collaborator

@davisp davisp left a comment

Choose a reason for hiding this comment

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

+1. The only thing I saw was the lack of setting "Unecrypted" via CommonOption, though I've not even convinced myself whether that would be useful or not so I'm not gonna hold things up over it.

#[derive(Clone, Debug)]
pub enum CommonOption {
/// Sets an AES256GCM encryption key.
Aes256GcmEncryptionKey(Vec<u8>),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if this shouldn't be defined as something like:

pub enum CommonOption {
    Encryption(array::Encryption, Option<String>)
}

This is only a vague "might be better, might not" suggestion. So feel free to do what you want with it.

Copy link
Member Author

@rroelke rroelke Sep 27, 2024

Choose a reason for hiding this comment

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

My thinking here (and the way I am following up in the tables repo so far) is that other future encryption types (if there will ever be any) might have more or different arguments. So for now I'm just going with this.

@rroelke rroelke merged commit 89dee14 into main Sep 27, 2024
3 checks passed
@rroelke rroelke deleted the rr/sc-44563-encryption-api branch September 27, 2024 17:44
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