-
Notifications
You must be signed in to change notification settings - Fork 292
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
Feature | AKV Provider Upgrade to use new Azure key Vault libraries #630
Conversation
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/AKVUnitTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Show resolved
Hide resolved
...oft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
Outdated
Show resolved
Hide resolved
...oft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
Outdated
Show resolved
Hide resolved
...oft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
Outdated
Show resolved
Hide resolved
...oft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only reviewed the production code using Key Vault packages directly and overall it looks okay, but I'm curious why it's all implemented synchronously? Where necessary, you're calling async over sync (and in some places, in ways that can deadlock) but wouldn't it make for a more efficient package for callers to use async?
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureKeyVaultProviderTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
I believe the reason of synchronous methods only is the class |
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/AKVUnitTests.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props # src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/ColumnMasterKey.cs # src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
Enclave example code and updating some public API comments
Update tests
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/AzureSqlKeyCryptographer.cs
Outdated
Show resolved
Hide resolved
...oft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
Outdated
Show resolved
Hide resolved
...oft.Data.SqlClient/add-ons/AzureKeyVaultProvider/SqlColumnEncryptionAzureKeyVaultProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/AKVUnitTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Javad <v-jarahn@microsoft.com> Co-authored-by: David Engel <dengel@magnitude.com>
Addresses #294
Changes full design and introduces new constructors to accept implementation of
TokenCredential
to support new libraries.Breaking Changes:
cc @Xtrimmer
[6 Aug, 2020] Update:
The old constructors are now removed totally and driver does not implement/support authentication callback in new design now. For user applications willing to support multi-user credentials for acquiring tokens, can implement a custom TokenCredential class with their own logic in "GetToken" and "GetTokenAsync" APIs. An example has been added (doc/samples/AzureKeyVaultProviderLegacyExample_2_0.cs) to the repository to demonstrate the same, will be published to Microsoft Docs.