Skip to content

Commit

Permalink
Update AKV Provider dependencies and packaging details (dotnet#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra committed Oct 22, 2019
1 parent 9efe50e commit 676a63b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 16 deletions.
2 changes: 1 addition & 1 deletion buildAddons.cmd
@@ -1,5 +1,5 @@
call :pauseOnError msbuild /p:configuration=Release /t:clean
call :pauseOnError msbuild /p:configuration=Release /t:BuildAll
call :pauseOnError msbuild /p:configuration=Release /t:BuildAllConfigurations
call :pauseOnError msbuild /p:configuration=Release /t:BuildAKVNetFx
call :pauseOnError msbuild /p:configuration=Release /t:BuildAKVNetCoreAllOS
call :pauseOnError msbuild /p:configuration=Release /t:GenerateAKVProviderNugetPackage
Expand Down
2 changes: 2 additions & 0 deletions doc/samples/AzureKeyVaultProviderExample.cs
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Threading.Tasks;
// <Snippet1>
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
Expand Down Expand Up @@ -254,3 +255,4 @@ public CustomerRecord(int id, string fName, string lName)
}
}
}
// </Snippet1>
Expand Up @@ -21,9 +21,9 @@
<ProjectReference Condition="'$(TargetGroup)'=='netfx'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.4" />
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.4" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.20" />
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.19" />
<PackageReference Include="Microsoft.Azure.KeyVault" Version="[3.0.4,4.0.0)" />
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="[3.0.4,4.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.20,3.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.19,4.0.0)" />
</ItemGroup>
</Project>
Expand Up @@ -18,8 +18,10 @@
namespace Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
{
/// <summary>
/// Provides implementation similar to certificate store provider.
/// A CEK encrypted with certificate store provider should be decryptable by this provider and vice versa.
/// Implementation of column master key store provider that allows client applications to access data when a
/// column master key is stored in Microsoft Azure Key Vault. For more information on Always Encrypted, please refer to: https://aka.ms/AlwaysEncrypted.
///
/// A Column Encryption Key encrypted with certificate store provider should be decryptable by this provider and vice versa.
///
/// Envolope Format for the encrypted column encryption key
/// version + keyPathLength + ciphertextLength + keyPath + ciphertext + signature
Expand All @@ -30,6 +32,23 @@ namespace Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
/// ciphertext: Encrypted column encryption key
/// signature: Signature of the entire byte array. Signature is validated before decrypting the column encryption key.
/// </summary>
/// <remarks>
/// <format ttype="text/markdown"><![CDATA[
/// ## Remarks
///
/// <xref=Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider> is implemented for Microsoft.Data.SqlClient driver and supports .NET Framework 4.6+ and .NET Core 2.1+.
/// The provider name identifier for this implementation is "AZURE_KEY_VAULT" and it is not registered in driver by default.
/// Client applications must call <xref=Microsoft.Data.SqlClient.SqlConnection.RegisterColumnEncryptionKeyStoreProviders> API only once in the lifetime of driver to register this custom provider by implementing a custom Authentication Callback mechanism.
///
/// Once the provider is registered, it can used to perform Always Encrypted operations by creating Column Master Key using Azure Key Vault Key Identifier URL.
///
/// ## Example
///
/// A sample C# application to demonstrate Always Encrypted with Azure Key Vault can be download from samples directory:
///
/// [!code-csharp[AzureKeyVaultProviderExample#1](~/../sqlclient/doc/samples/AzureKeyVaultProvider.cs#1)]
/// ]]></format>
/// </remarks>
public class SqlColumnEncryptionAzureKeyVaultProvider : SqlColumnEncryptionKeyStoreProvider
{
#region Properties
Expand Down
Expand Up @@ -9,27 +9,36 @@
<license type="expression">MIT</license>
<projectUrl>https://aka.ms/sqlclientproject</projectUrl>
<icon>dotnet.png</icon>
<repository type="git" url="https://github.com/dotnet/sqlclient" />
<description>Always Encrypted Azure Key Vault Provider for Microsoft.Data.SqlClient.

This library enables .NET Core and .NET Framework applications to use Microsoft Azure Key Vault with Always Encrypted in Microsoft Azure SQL Database and Microsoft SQL Server. The library includes the column master key store provider that allows client applications to access data when a column master key is stored in Microsoft Azure Key Vault. For more information on Always Encrypted, please refer to: https://aka.ms/AlwaysEncrypted.

Use this library only with the Microsoft.Data.SqlClient (https://www.nuget.org/packages/Microsoft.Data.SqlClient) client driver. If you are using the legacy .NET Framework Data Provider for SQL Server within the System.Data.SqlClient namespace in .NET Framework (https://www.nuget.org/packages/System.Data.SqlClient) as a client driver, you need to use Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider (http://www.nuget.org/packages/Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider) instead of this package.

For more information on Always Encrypted, please refer to: https://aka.ms/AlwaysEncrypted.

Available Types:
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyStoreProvider.SqlColumnEncryptionAzureKeyVaultProvider

</description>
<releaseNotes>https://go.microsoft.com/fwlink/?linkid=2090501</releaseNotes>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>sqlclient microsoft.data.sqlclient AzureKeyVaultProvider akvprovider alwaysencrypted</tags>
<tags>sqlclient microsoft.data.sqlclient azurekeyvaultprovider akvprovider alwaysencrypted</tags>
<dependencies>
<group targetFramework="net46">
<dependency id="Microsoft.Azure.KeyVault" version="3.0.4" />
<dependency id="Microsoft.Azure.KeyVault.WebKey" version="3.0.4" />
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" />
<dependency id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.19" />
<dependency id="Microsoft.Data.SqlClient" version="[1.0.19269.1,)" />
<dependency id="Microsoft.Azure.KeyVault" version="[3.0.4,4.0.0)" />
<dependency id="Microsoft.Azure.KeyVault.WebKey" version="[3.0.4,4.0.0)" />
<dependency id="Microsoft.Rest.ClientRuntime" version="[2.3.20,3.0.0)" />
<dependency id="Microsoft.Rest.ClientRuntime.Azure" version="[3.3.19,4.0.0)" />
</group>
<group targetFramework="netcoreapp2.1">
<dependency id="Microsoft.Azure.KeyVault" version="3.0.4" />
<dependency id="Microsoft.Azure.KeyVault.WebKey" version="3.0.4" />
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" />
<dependency id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.19" />
<dependency id="Microsoft.Data.SqlClient" version="[1.0.19269.1,)" />
<dependency id="Microsoft.Azure.KeyVault" version="[3.0.4,4.0.0)" />
<dependency id="Microsoft.Azure.KeyVault.WebKey" version="[3.0.4,4.0.0)" />
<dependency id="Microsoft.Rest.ClientRuntime" version="[2.3.20,3.0.0)" />
<dependency id="Microsoft.Rest.ClientRuntime.Azure" version="[3.3.19,4.0.0)" />
</group>
</dependencies>
<frameworkAssemblies>
Expand Down

0 comments on commit 676a63b

Please sign in to comment.