Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"apos",
"azsdk",
"blazor",
"bleu",
"byok",
"centralus",
"clippy",
Expand Down Expand Up @@ -166,6 +167,7 @@
"skus",
"somaxconn",
"southcentralus",
"sovcloud",
"structs",
"sybase",
"sysctls",
Expand Down
2 changes: 2 additions & 0 deletions sdk/core/Azure.Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Features Added

- Added `AzureAuthorityHosts.AzureBleuCloud` (`https://login.sovcloud-identity.fr/`), the Microsoft Entra authority host for Bleu Cloud, the national partner cloud for France. Interactive credentials' `Authenticate` methods now also resolve the default Azure Resource Manager scope for Bleu Cloud.

### Breaking Changes

### Bugs Fixed
Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net10.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,7 @@ public AuthorizationCodeCredentialOptions() { }
[System.Runtime.CompilerServices.TypeForwardedFromAttribute("Azure.Identity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8")]
public static partial class AzureAuthorityHosts
{
public static System.Uri AzureBleuCloud { get { throw null; } }
public static System.Uri AzureChina { get { throw null; } }
[System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static System.Uri AzureGermany { get { throw null; } }
Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net462.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ public AuthorizationCodeCredentialOptions() { }
[System.Runtime.CompilerServices.TypeForwardedFromAttribute("Azure.Identity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8")]
public static partial class AzureAuthorityHosts
{
public static System.Uri AzureBleuCloud { get { throw null; } }
public static System.Uri AzureChina { get { throw null; } }
[System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static System.Uri AzureGermany { get { throw null; } }
Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net472.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ public AuthorizationCodeCredentialOptions() { }
[System.Runtime.CompilerServices.TypeForwardedFromAttribute("Azure.Identity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8")]
public static partial class AzureAuthorityHosts
{
public static System.Uri AzureBleuCloud { get { throw null; } }
public static System.Uri AzureChina { get { throw null; } }
[System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static System.Uri AzureGermany { get { throw null; } }
Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net8.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,7 @@ public AuthorizationCodeCredentialOptions() { }
[System.Runtime.CompilerServices.TypeForwardedFromAttribute("Azure.Identity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8")]
public static partial class AzureAuthorityHosts
{
public static System.Uri AzureBleuCloud { get { throw null; } }
public static System.Uri AzureChina { get { throw null; } }
[System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static System.Uri AzureGermany { get { throw null; } }
Expand Down
1 change: 1 addition & 0 deletions sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ public AuthorizationCodeCredentialOptions() { }
[System.Runtime.CompilerServices.TypeForwardedFromAttribute("Azure.Identity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8")]
public static partial class AzureAuthorityHosts
{
public static System.Uri AzureBleuCloud { get { throw null; } }
public static System.Uri AzureChina { get { throw null; } }
[System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static System.Uri AzureGermany { get { throw null; } }
Expand Down
9 changes: 9 additions & 0 deletions sdk/core/Azure.Core/src/Identity/AzureAuthorityHosts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace Azure.Identity
public static class AzureAuthorityHosts
{
private const string AzurePublicCloudHostUrl = "https://login.microsoftonline.com/";
private const string AzureBleuCloudHostUrl = "https://login.sovcloud-identity.fr/";
private const string AzureChinaHostUrl = "https://login.chinacloudapi.cn/";
private const string AzureGermanyHostUrl = "https://login.microsoftonline.de/";
private const string AzureGovernmentHostUrl = "https://login.microsoftonline.us/";
Expand All @@ -24,6 +25,11 @@ public static class AzureAuthorityHosts
/// </summary>
public static Uri AzurePublicCloud { get; } = new Uri(AzurePublicCloudHostUrl);

/// <summary>
/// The host of the Microsoft Entra authority for tenants in Bleu Cloud, the national partner cloud for France.
/// </summary>
public static Uri AzureBleuCloud { get; } = new Uri(AzureBleuCloudHostUrl);
Comment thread
m-nash marked this conversation as resolved.

/// <summary>
/// The host of the Microsoft Entra authority for tenants in the Azure China Cloud.
/// </summary>
Expand Down Expand Up @@ -57,6 +63,9 @@ internal static string GetDefaultScope(Uri authorityHost)
case AzurePublicCloudHostUrl:
// The double slash is intentional for public cloud.
return "https://management.azure.com//.default";
case AzureBleuCloudHostUrl:
// The double slash is intentional for Bleu Cloud.
return "https://management.sovcloud-api.fr//.default";
case AzureChinaHostUrl:
return "https://management.chinacloudapi.cn/.default";
case AzureGermanyHostUrl:
Expand Down
31 changes: 31 additions & 0 deletions sdk/core/Azure.Core/tests/Identity/AzureAuthorityHostsTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Azure.Identity;
using NUnit.Framework;

namespace Azure.Core.Tests.Identity
{
public class AzureAuthorityHostsTests
{
[Test]
public void WellKnownAuthorityHostsHaveExpectedValues()
{
Assert.AreEqual(new Uri("https://login.microsoftonline.com/"), AzureAuthorityHosts.AzurePublicCloud);
Assert.AreEqual(new Uri("https://login.sovcloud-identity.fr/"), AzureAuthorityHosts.AzureBleuCloud);
Assert.AreEqual(new Uri("https://login.chinacloudapi.cn/"), AzureAuthorityHosts.AzureChina);
Assert.AreEqual(new Uri("https://login.microsoftonline.us/"), AzureAuthorityHosts.AzureGovernment);
}

[Test]
public void GetDefaultScopeReturnsExpectedScopeForKnownAuthorityHosts()
{
Assert.AreEqual("https://management.azure.com//.default", AzureAuthorityHosts.GetDefaultScope(AzureAuthorityHosts.AzurePublicCloud));
Assert.AreEqual("https://management.sovcloud-api.fr//.default", AzureAuthorityHosts.GetDefaultScope(AzureAuthorityHosts.AzureBleuCloud));
Assert.AreEqual("https://management.chinacloudapi.cn/.default", AzureAuthorityHosts.GetDefaultScope(AzureAuthorityHosts.AzureChina));
Assert.AreEqual("https://management.usgovcloudapi.net/.default", AzureAuthorityHosts.GetDefaultScope(AzureAuthorityHosts.AzureGovernment));
Assert.IsNull(AzureAuthorityHosts.GetDefaultScope(new Uri("https://login.contoso.com/")));
}
}
}
2 changes: 2 additions & 0 deletions sdk/resourcemanager/Azure.ResourceManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Features Added

- Added `ArmEnvironment.AzureBleuCloud` (`https://management.sovcloud-api.fr`) for Bleu Cloud, the national partner cloud for France.

### Breaking Changes

### Bugs Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected ArmCollection(Azure.ResourceManager.ArmClient client, Azure.Core.Resou
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Azure.ResourceManager.ArmEnvironment AzureBleuCloud;
public static readonly Azure.ResourceManager.ArmEnvironment AzureChina;
public static readonly Azure.ResourceManager.ArmEnvironment AzureGermany;
public static readonly Azure.ResourceManager.ArmEnvironment AzureGovernment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected ArmCollection(Azure.ResourceManager.ArmClient client, Azure.Core.Resou
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Azure.ResourceManager.ArmEnvironment AzureBleuCloud;
public static readonly Azure.ResourceManager.ArmEnvironment AzureChina;
public static readonly Azure.ResourceManager.ArmEnvironment AzureGermany;
public static readonly Azure.ResourceManager.ArmEnvironment AzureGovernment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ protected ArmCollection(Azure.ResourceManager.ArmClient client, Azure.Core.Resou
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Azure.ResourceManager.ArmEnvironment AzureBleuCloud;
public static readonly Azure.ResourceManager.ArmEnvironment AzureChina;
public static readonly Azure.ResourceManager.ArmEnvironment AzureGermany;
public static readonly Azure.ResourceManager.ArmEnvironment AzureGovernment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ namespace Azure.ResourceManager
/// <summary> Azure Public Cloud. </summary>
public static readonly ArmEnvironment AzurePublicCloud = new(new Uri("https://management.azure.com"), "https://management.azure.com/");

/// <summary> Bleu Cloud, the national partner cloud for France. </summary>
public static readonly ArmEnvironment AzureBleuCloud = new(new Uri("https://management.sovcloud-api.fr"), "https://management.sovcloud-api.fr/");

/// <summary> Azure China Cloud. </summary>
public static readonly ArmEnvironment AzureChina = new(new Uri("https://management.chinacloudapi.cn"), "https://management.chinacloudapi.cn");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void DefaultValueIsNull()
public void DefaultScope()
{
Assert.AreEqual("https://management.azure.com//.default", ArmEnvironment.AzurePublicCloud.DefaultScope);
Assert.AreEqual("https://management.sovcloud-api.fr//.default", ArmEnvironment.AzureBleuCloud.DefaultScope);
Assert.AreEqual("https://management.chinacloudapi.cn/.default", ArmEnvironment.AzureChina.DefaultScope);
Assert.AreEqual("https://management.usgovcloudapi.net/.default", ArmEnvironment.AzureGovernment.DefaultScope);
Assert.AreEqual("https://management.microsoftazure.de/.default", ArmEnvironment.AzureGermany.DefaultScope);
Expand Down
Loading