Skip to content

Commit

Permalink
Updating ADAL dependency to 4.X (Azure#6980)
Browse files Browse the repository at this point in the history
  • Loading branch information
nonik0 authored and shahabhijeet committed Jul 22, 2019
1 parent 60e6bde commit 7c9fbd8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,18 @@ internal KeyVaultClient(HttpClient httpClient, NonInteractiveAzureServiceTokenPr

byte[] rawCertBytes = Convert.FromBase64String(secretBundle.Value);

X509Certificate2 certificate = new X509Certificate2(rawCertBytes);
X509Certificate2 certificate = null;

// access to key store dependent on environment, try to import to both user and machine key stores
try
{
certificate = new X509Certificate2(rawCertBytes, default(string), X509KeyStorageFlags.UserKeySet);
}
catch
{
certificate = new X509Certificate2(rawCertBytes, default(string), X509KeyStorageFlags.MachineKeySet);
}

return certificate;
}
catch (KeyVaultAccessTokenRetrievalException exp)
Expand Down Expand Up @@ -132,6 +143,7 @@ internal KeyVaultAccessTokenRetrievalException(string message) :
{
}
}

private async Task<string> GetKeyVaultAccessTokenAsync(string secretUrl, CancellationToken cancellationToken)
{
// Send an anonymous request to Key Vault endpoint to get an OAuth2 HTTP Bearer challenge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<PropertyGroup>
<PackageId>Microsoft.Azure.Services.AppAuthentication</PackageId>
<Description>Enables a service to authenticate to Azure services using the developer's Azure Active Directory/ Microsoft account during development, and authenticate as itself (using OAuth 2.0 Client Credentials flow) when deployed to Azure.</Description>
<Version>1.2.1</Version>
<Version>1.3.0</Version>
<AssemblyName>Microsoft.Azure.Services.AppAuthentication</AssemblyName>
<PackageTags>Azure Authentication AppAuthentication</PackageTags>
<PackageReleaseNotes>
<![CDATA[
Documentation can be found at https://go.microsoft.com/fwlink/p/?linkid=862452.
Adding optional MsiRetryTimeout connection string parameter
Bug fixes
Updating ADAL dependency to 4.3
Bug fix
]]>
</PackageReleaseNotes>
</PropertyGroup>
Expand All @@ -22,7 +22,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="3.19.4" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="4.3.0" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[assembly: AssemblyTitle("Microsoft.Azure.Services.AppAuthentication")]
[assembly: AssemblyDescription("Enables a service to authenticate to Azure services using the developer's Azure Active Directory/ Microsoft account during development, and authenticate as itself (using OAuth 2.0 Client Credentials flow) when deployed to Azure.")]

[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Microsoft Azure")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")]
Expand Down

0 comments on commit 7c9fbd8

Please sign in to comment.