Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,32 @@ private string StorageFileEndpointFormat()
{AzureEnvironment.Endpoint.GraphEndpointResourceId, AzureEnvironmentConstants.USGovernmentGraphEndpoint}
}
}
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@horrion We have no plans to update this library, so please revert this.

{
EnvironmentName.AzureGermanCloud,
new AzureEnvironment
{
Name = EnvironmentName.AzureGermanCloud,
Endpoints = new Dictionary<AzureEnvironment.Endpoint, string>
{
{ AzureEnvironment.Endpoint.PublishSettingsFileUrl, AzureEnvironmentConstants.GermanPublishSettingsFileUrl },
{ AzureEnvironment.Endpoint.ServiceManagement, AzureEnvironmentConstants.GermanServiceEndpoint },
{ AzureEnvironment.Endpoint.ResourceManager, AzureEnvironmentConstants.GermanResourceManagerEndpoint },
{ AzureEnvironment.Endpoint.ManagementPortalUrl, AzureEnvironmentConstants.GermanManagementPortalUrl },
{ AzureEnvironment.Endpoint.ActiveDirectory, AzureEnvironmentConstants.GermanActiveDirectoryServiceEndpoint },
{ AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, AzureEnvironmentConstants.GermanServiceEndpoint },
{ AzureEnvironment.Endpoint.StorageEndpointSuffix, AzureEnvironmentConstants.GermanStorageEndpointSuffix },
{ AzureEnvironment.Endpoint.Gallery, AzureEnvironmentConstants.GermanGalleryEndpoint },
{ AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, AzureEnvironmentConstants.GermanSqlDatabaseDnsSuffix },
{ AzureEnvironment.Endpoint.Graph, AzureEnvironmentConstants.GermanGraphEndpoint },
{ AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, AzureEnvironmentConstants.GermanTrafficManagerDnsSuffix},
{ AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, AzureEnvironmentConstants.GermanKeyVaultDnsSuffix},
{ AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, AzureEnvironmentConstants.GermanKeyVaultServiceEndpointResourceId},
{ AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, null},
{ AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, null},
{AzureEnvironment.Endpoint.GraphEndpointResourceId, AzureEnvironmentConstants.GermanGraphEndpoint}
}
}
}
};

Expand Down Expand Up @@ -330,6 +356,8 @@ public static class EnvironmentName
public const string AzureChinaCloud = "AzureChinaCloud";

public const string AzureUSGovernment = "AzureUSGovernment";

public const string AzureGermanCloud = "AzureGermanCloud";
}

public static class AzureEnvironmentConstants
Expand All @@ -340,72 +368,96 @@ public static class AzureEnvironmentConstants

public const string USGovernmentServiceEndpoint = "https://management.core.usgovcloudapi.net/";

public const string GermanServiceEndpoint = "https://management.core.cloudapi.de/";

public const string AzureResourceManagerEndpoint = "https://management.azure.com/";

public const string ChinaResourceManagerEndpoint = "https://management.chinacloudapi.cn/";

public const string USGovernmentResourceManagerEndpoint = "https://management.usgovcloudapi.net/";

public const string GermanResourceManagerEndpoint = "https://management.microsoftazure.de/";

public const string GalleryEndpoint = "https://gallery.azure.com/";

public const string ChinaGalleryEndpoint = "https://gallery.chinacloudapi.cn/";

public const string USGovernmentGalleryEndpoint = "https://gallery.usgovcloudapi.net/";

public const string GermanGalleryEndpoint = "https://gallery.cloudapi.de/";

public const string AzurePublishSettingsFileUrl = "http://go.microsoft.com/fwlink/?LinkID=301775";

public const string ChinaPublishSettingsFileUrl = "http://go.microsoft.com/fwlink/?LinkID=301776";

public const string USGovernmentPublishSettingsFileUrl = "https://manage.windowsazure.us/publishsettings/index";

public const string GermanPublishSettingsFileUrl = "https://manage.microsoftazure.de/publishsettings/index";

public const string AzureManagementPortalUrl = "http://go.microsoft.com/fwlink/?LinkId=254433";

public const string ChinaManagementPortalUrl = "http://go.microsoft.com/fwlink/?LinkId=301902";

public const string USGovernmentManagementPortalUrl = "https://manage.windowsazure.us";

public const string GermanManagementPortalUrl = "http://portal.microsoftazure.de/";

public const string AzureStorageEndpointSuffix = "core.windows.net";

public const string ChinaStorageEndpointSuffix = "core.chinacloudapi.cn";

public const string USGovernmentStorageEndpointSuffix = "core.usgovcloudapi.net";

public const string GermanStorageEndpointSuffix = "core.cloudapi.de";

public const string AzureSqlDatabaseDnsSuffix = ".database.windows.net";

public const string ChinaSqlDatabaseDnsSuffix = ".database.chinacloudapi.cn";

public const string USGovernmentSqlDatabaseDnsSuffix = ".database.usgovcloudapi.net";

public const string GermanSqlDatabaseDnsSuffix = ".database.cloudapi.de";

public const string AzureActiveDirectoryEndpoint = "https://login.microsoftonline.com/";

public const string ChinaActiveDirectoryEndpoint = "https://login.chinacloudapi.cn/";

public const string USGovernmentActiveDirectoryEndpoint = "https://login.microsoftonline.com/";

public const string GermanActiveDirectoryServiceEndpoint = "https://login.microsoftonline.de/";

public const string AzureGraphEndpoint = "https://graph.windows.net/";

public const string ChinaGraphEndpoint = "https://graph.chinacloudapi.cn/";

public const string USGovernmentGraphEndpoint = "https://graph.windows.net/";

public const string GermanGraphEndpoint = "https://graph.cloudapi.de/";

public const string AzureTrafficManagerDnsSuffix = "trafficmanager.net";

public const string ChinaTrafficManagerDnsSuffix = "trafficmanager.cn";

public const string GermanTrafficManagerDnsSuffix = "azuretrafficmanager.de";

public const string AzureKeyVaultDnsSuffix = "vault.azure.net";

public const string ChinaKeyVaultDnsSuffix = "vault.azure.cn";

public const string USGovernmentKeyVaultDnsSuffix = "vault.usgovcloudapi.net";

public const string GermanKeyVaultDnsSuffix = "vault.microsoftazure.de";

public const string AzureKeyVaultServiceEndpointResourceId = "https://vault.azure.net";

public const string ChinaKeyVaultServiceEndpointResourceId = "https://vault.azure.cn";

public const string USGovernmentKeyVaultServiceEndpointResourceId = "https://vault.usgovcloudapi.net";

public const string GermanKeyVaultServiceEndpointResourceId = "https://vault.microsoftazure.de";

public const string AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix = "azuredatalakeanalytics.net";

public const string AzureDataLakeStoreFileSystemEndpointSuffix = "azuredatalakestore.net";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed class ActiveDirectoryServiceSettings

private static readonly ActiveDirectoryServiceSettings AzureSettings = new ActiveDirectoryServiceSettings
{
AuthenticationEndpoint= new Uri("https://login.windows.net/"),
AuthenticationEndpoint= new Uri("https://login.microsoftonline.com/"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

login.windows.net is preferred.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markcowl Could you please explain why the "old" endpoint is preferred? I thought everything that depends on Azure Resource Manager has to go through the new endpoint (login.microsoftonline.com).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@horrion You are absolutely right, I was reading this entirely the wrong way

TokenAudience = new Uri("https://management.core.windows.net/"),
ValidateAuthority = true
};
Expand All @@ -28,6 +28,20 @@ public sealed class ActiveDirectoryServiceSettings
ValidateAuthority = true
};

private static readonly ActiveDirectoryServiceSettings AzureUSGovernmentSettings = new ActiveDirectoryServiceSettings
{
AuthenticationEndpoint = new Uri("https://login.microsoftonline.com/"),
TokenAudience = new Uri("https://management.core.usgovcloudapi.net/"),
ValidateAuthority = true
};

private static readonly ActiveDirectoryServiceSettings AzureGermanCloudSettings = new ActiveDirectoryServiceSettings
{
AuthenticationEndpoint = new Uri("https://login.microsoftonline.de/"),
TokenAudience = new Uri("https://management.core.cloudapi.de/"),
ValidateAuthority = true
};

/// <summary>
/// Gets the serviceSettings for authentication with Azure
/// </summary>
Expand All @@ -38,6 +52,16 @@ public sealed class ActiveDirectoryServiceSettings
/// </summary>
public static ActiveDirectoryServiceSettings AzureChina { get { return AzureChinaSettings; } }

/// <summary>
/// Gets the serviceSettings for authentication with Azure US Government
/// </summary>
public static ActiveDirectoryServiceSettings AzureUSGovernment { get { return AzureUSGovernmentSettings; } }

/// <summary>
/// Gets the serviceSettings for authentication with Azure Germany
/// </summary>
public static ActiveDirectoryServiceSettings AzureGermany { get { return AzureGermanCloudSettings; } }

/// <summary>
/// Gets or sets the ActiveDirectory Endpoint for the Azure Environment
/// </summary>
Expand Down