Skip to content

Commit 9623f9a

Browse files
schaabschristothes
andauthored
Cherry-Pick fixes for 1.8.2 patch release (#33984)
* cherry-pick Do not handle AADSTS errors as PowerShell not installed (#32251) * Do not handle AADSTS errors as PowerShell not installed * cherry-pick Fix regional endpoint validation error (#33544) * Fix regional endpoint validation error and update MSAL dependencies * update changelog for 1.8.2 release * update project version * cherry-pick First iteration of a simple ManagedIdentity integration test (#33017) * First iteration of a simple ManagedIdentity integration test --------- Co-authored-by: Christopher Scott <chriss@microsoft.com>
1 parent 3a2a7d4 commit 9623f9a

25 files changed

+403
-84
lines changed

eng/.docsettings.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ omitted_paths:
99
- samples/*
1010
- sdk/*/*.Management.*/*
1111
- sdk/*/*/perf/*
12+
- sdk/*/*/integration/*
13+
- sdk/*/*/tests/Samples/*
14+
- sdk/*/*/tests/samples/*
1215
- sdk/*/*/samples/*
1316
- sdk/*/samples/*
1417
- sdk/*/swagger/*

eng/Packages.Data.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@
102102
<PackageReference Update="Azure.ResourceManager" Version="1.3.1" />
103103

104104
<!-- Other approved packages -->
105-
<PackageReference Update="Microsoft.Azure.Amqp" Version="2.5.10" />
106-
<PackageReference Update="Microsoft.Azure.WebPubSub.Common" Version="1.1.0" />
107-
<PackageReference Update="Microsoft.Identity.Client" Version="4.46.0" />
108-
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="2.23.0" />
105+
<PackageReference Update="Microsoft.Azure.Amqp" Version="2.6.1" />
106+
<PackageReference Update="Microsoft.Azure.WebPubSub.Common" Version="1.2.0" />
107+
<PackageReference Update="Microsoft.Identity.Client" Version="4.49.1" />
108+
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="2.25.3" />
109109
<!--
110110
TODO: This package needs to be released as GA and arch-board approved before taking a dependency in any stable SDK library.
111111
Currently, it is referencd by Azure.Identity.BrokeredAuthentication which is still in beta
112112
-->
113-
<PackageReference Update="Microsoft.Identity.Client.Broker" Version="4.46.0-preview" />
113+
<PackageReference Update="Microsoft.Identity.Client.Broker" Version="4.49.1-preview" />
114114

115115
<!-- TODO: Make sure this package is arch-board approved -->
116116
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="6.5.0" />

sdk/identity/Azure.Identity/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Release History
2+
## 1.8.2 (2023-02-08)
3+
4+
### Bugs Fixed
5+
- Fixed error message parsing in `AzurePowerShellCredential` which would misinterpret AAD errors with the need to install PowerShell. [#31998](https://github.com/Azure/azure-sdk-for-net/issues/31998)
6+
- Fix regional endpoint validation error when using `ManagedIdentityCredential`. [#32498])(https://github.com/Azure/azure-sdk-for-net/issues/32498)
27

38
## 1.8.1 (2023-01-13)
49

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System;
2+
using System.Linq;
3+
using Azure.Core;
4+
using Azure.Identity;
5+
using Azure.Storage.Blobs;
6+
using Microsoft.AspNetCore.Mvc;
7+
8+
namespace WebApp.Controllers
9+
{
10+
11+
[ApiController]
12+
[Route("[controller]")]
13+
public class TestController : ControllerBase
14+
{
15+
16+
[HttpGet(Name = "GetTest")]
17+
public IActionResult Get()
18+
{
19+
string resourceId = Environment.GetEnvironmentVariable("IDENTITY_WEBAPP_USER_DEFINED_IDENTITY")!;
20+
string account1 = Environment.GetEnvironmentVariable("IDENTITY_STORAGE_NAME_1")!;
21+
string account2 = Environment.GetEnvironmentVariable("IDENTITY_STORAGE_NAME_2")!;
22+
23+
var credential1 = new ManagedIdentityCredential();
24+
var credential2 = new ManagedIdentityCredential(new ResourceIdentifier(resourceId));
25+
var client1 = new BlobServiceClient(new Uri($"https://{account1}.blob.core.windows.net/"), credential1);
26+
var client2 = new BlobServiceClient(new Uri($"https://{account2}.blob.core.windows.net/"), credential2);
27+
try
28+
{
29+
var results = client1.GetBlobContainers().ToList();
30+
results = client2.GetBlobContainers().ToList();
31+
return Ok("Successfully acquired a token from ManagedIdentityCredential");
32+
}
33+
catch (Exception ex)
34+
{
35+
return BadRequest(ex.ToString());
36+
}
37+
}
38+
}
39+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Azure.Storage.Blobs" />
11+
</ItemGroup>
12+
<ItemGroup>
13+
<ProjectReference Include="..\..\src\Azure.Identity.csproj" />
14+
</ItemGroup>
15+
16+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Microsoft.AspNetCore.Builder;
2+
using Microsoft.Extensions.DependencyInjection;
3+
4+
var builder = WebApplication.CreateBuilder(args);
5+
6+
// Add services to the container.
7+
8+
builder.Services.AddControllers();
9+
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
10+
builder.Services.AddEndpointsApiExplorer();
11+
12+
var app = builder.Build();
13+
14+
// Configure the HTTP request pipeline.
15+
app.UseHttpsRedirection();
16+
17+
app.UseAuthorization();
18+
19+
app.MapControllers();
20+
21+
app.Run();
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<config>
4+
<!--
5+
<add key="repositoryPath" value="./NugetInstall" />
6+
<add key="globalPackagesFolder" value="./Nuget" />
7+
-->
8+
<add key="repositoryPath" value="%AGENT_WORKFOLDER%/NugetInstall" />
9+
<add key="globalPackagesFolder" value="%AGENT_WORKFOLDER%/Nuget" />
10+
</config>
11+
<packageSources>
12+
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
13+
</packageSources>
14+
</configuration>

sdk/identity/Azure.Identity/src/Azure.Identity.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<Description>This is the implementation of the Azure SDK Client Library for Azure Identity</Description>
44
<AssemblyTitle>Microsoft Azure.Identity Component</AssemblyTitle>
5-
<Version>1.8.1</Version>
5+
<Version>1.8.2</Version>
66
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
7-
<ApiCompatVersion>1.8.0</ApiCompatVersion>
7+
<ApiCompatVersion>1.8.1</ApiCompatVersion>
88
<PackageTags>Microsoft Azure Identity;$(PackageCommonTags)</PackageTags>
99
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
1010
<NoWarn>$(NoWarn);3021;AZC0011</NoWarn>

0 commit comments

Comments
 (0)