Skip to content

Conversation

@johnnypham
Copy link
Contributor

These changes add a public method to register providers into an instance cache at the command-level, allowing users to maintain their own set of providers in the same application.

The current column encryption key (CEK) cache is global so a new CEK cache and signature verification cache is added at the SqlColumnEncryptionAzureKeyVaultProvider level. Each SqlColumnEncryptionAzureKeyVaultProvider is linked to a single TokenCredential, which serves as the user identity.

public class SqlCommand
{    
       // Added API: registers into command-level key store provider cache
       public void RegisterColumnEncryptionKeyStoreProvidersOnCommand(IDictionary<string, SqlColumnEncryptionKeyStoreProvider> customProviders);
}

@johnnypham johnnypham added the Public API 🆕 Issues/PRs that introduce new APIs to the driver. label Apr 28, 2021
@cheenamalhotra cheenamalhotra added this to the 3.0.0-preview3 milestone May 7, 2021
@cheenamalhotra cheenamalhotra requested a review from David-Engel May 7, 2021 21:18
Copy link
Contributor

@DavoudEshtehari DavoudEshtehari left a comment

Choose a reason for hiding this comment

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

Can you assess TTL by adding more tests?

Copy link
Member

@cheenamalhotra cheenamalhotra left a comment

Choose a reason for hiding this comment

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

Overall LGTM 👍

@cheenamalhotra cheenamalhotra merged commit 5e067c4 into dotnet:main May 17, 2021
@johnnypham johnnypham deleted the multitenant-provider-command branch May 19, 2021 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants