Skip to content
Open
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 @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -146,4 +146,4 @@ output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_ID string = infra_contributor_

output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_PRINCIPAL_ID string = infra_contributor_mi.properties.principalId

output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('infra')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('infra')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void PostConfigure(string? name, DashboardOptions options)

options.AI.Disabled = _configuration.GetBool(DashboardConfigNames.DashboardAIDisabledName.ConfigKey);

if (_configuration.GetBool(DashboardConfigNames.Legacy.DashboardOtlpSuppressUnsecuredTelemetryMessage.ConfigKey) is { } suppressUnsecuredTelemetryMessage)
if (_configuration.GetBool(DashboardConfigNames.Legacy.DashboardOtlpSuppressUnsecuredTelemetryMessageName.ConfigKey) is { } suppressUnsecuredTelemetryMessage)
{
options.Otlp.SuppressUnsecuredMessage = suppressUnsecuredTelemetryMessage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static WebSite AddDashboard(AzureResourceInfrastructure infra,
// Security is handled by app service platform
dashboard.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = "Dashboard__Frontend__AuthMode", Value = "Unsecured" });
dashboard.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = "Dashboard__Otlp__AuthMode", Value = "Unsecured" });
dashboard.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = "Dashboard__Otlp__SuppressUnsecuredTelemetryMessage", Value = "true" });
dashboard.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = "Dashboard__Otlp__SuppressUnsecuredMessage", Value = "true" });
Copy link
Member

Choose a reason for hiding this comment

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

One thing we need to be careful of is that Azure AppService is not updated to the latest dashboard at all times. It takes a while. Currently, it is using 9.5.2 in Azure. So if we merged this, it will break for anyone using main builds.

Copy link
Member Author

Choose a reason for hiding this comment

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

When will it be safe to change? Merging now would make this change for 13.1. Should it wait a release?

Copy link
Member

Choose a reason for hiding this comment

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

@ShilpiRach - thoughts?

I think AppService is waiting on us producing a 13.0 dashboard docker image. And then it would need to roll that out to all AppService regions.

dashboard.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = "Dashboard__ResourceServiceClient__AuthMode", Value = "Unsecured" });
// Dashboard ports
dashboard.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = "WEBSITES_PORT", Value = "5000" });
Expand Down
3 changes: 1 addition & 2 deletions src/Shared/DashboardConfigNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ internal static class DashboardConfigNames
public static readonly ConfigName DashboardMcpAuthModeName = new("Dashboard:Mcp:AuthMode", "DASHBOARD__MCP__AUTHMODE");
public static readonly ConfigName DashboardMcpPrimaryApiKeyName = new("Dashboard:Mcp:PrimaryApiKey", "DASHBOARD__MCP__PRIMARYAPIKEY");
public static readonly ConfigName DashboardMcpDisableName = new("Dashboard:Mcp:Disabled", "DASHBOARD__MCP__DISABLED");
public static readonly ConfigName DashboardOtlpSuppressUnsecuredTelemetryMessageName = new("Dashboard:Otlp:SuppressUnsecuredTelemetryMessage", "DASHBOARD__OTLP__SUPPRESSUNSECUREDTELEMETRYMESSAGE");
public static readonly ConfigName DashboardOtlpCorsAllowedOriginsKeyName = new("Dashboard:Otlp:Cors:AllowedOrigins", "DASHBOARD__OTLP__CORS__ALLOWEDORIGINS");
public static readonly ConfigName DashboardOtlpCorsAllowedHeadersKeyName = new("Dashboard:Otlp:Cors:AllowedHeaders", "DASHBOARD__OTLP__CORS__ALLOWEDHEADERS");
public static readonly ConfigName DashboardOtlpAllowedCertificatesName = new("Dashboard:Otlp:AllowedCertificates", "DASHBOARD__OTLP__ALLOWEDCERTIFICATES");
Expand All @@ -51,7 +50,7 @@ public static class Legacy
public static readonly ConfigName DashboardConfigFilePathName = new(KnownConfigNames.Legacy.DashboardConfigFilePath);
public static readonly ConfigName DashboardFileConfigDirectoryName = new(KnownConfigNames.Legacy.DashboardFileConfigDirectory);
public static readonly ConfigName ResourceServiceUrlName = new(KnownConfigNames.Legacy.ResourceServiceEndpointUrl);
public static readonly ConfigName DashboardOtlpSuppressUnsecuredTelemetryMessage = new("Dashboard:Otlp:SuppressUnsecuredTelemetryMessage", "Dashboard__Otlp__SuppressUnsecuredTelemetryMessage");
public static readonly ConfigName DashboardOtlpSuppressUnsecuredTelemetryMessageName = new("Dashboard:Otlp:SuppressUnsecuredTelemetryMessage", "DASHBOARD__OTLP__SUPPRESSUNSECUREDTELEMETRYMESSAGE");
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Aspire.Dashboard.Tests/DashboardOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public async Task OtlpOptions_SuppressUnsecuredMessage_LegacyName()
[
new("ASPNETCORE_URLS", "http://localhost:8000/"),
new("ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL", "http://localhost:4319/"),
new(DashboardConfigNames.Legacy.DashboardOtlpSuppressUnsecuredTelemetryMessage.ConfigKey, "true"),
new(DashboardConfigNames.Legacy.DashboardOtlpSuppressUnsecuredTelemetryMessageName.ConfigKey, "true"),
]));
var options = app.Services.GetService<IOptionsMonitor<DashboardOptions>>()!;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@description('The location for the resource(s) to be deployed.')
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location

param userPrincipalId string = ''
Expand Down Expand Up @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -146,4 +146,4 @@ output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_ID string = env_contributor_mi

output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_PRINCIPAL_ID string = env_contributor_mi.properties.principalId

output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -171,4 +171,4 @@ output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env'

output AZURE_APPLICATION_INSIGHTS_INSTRUMENTATIONKEY string = env_ai.properties.InstrumentationKey

output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = env_ai.properties.ConnectionString
output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = env_ai.properties.ConnectionString
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -173,4 +173,4 @@ output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env'

output AZURE_APPLICATION_INSIGHTS_INSTRUMENTATIONKEY string = env_ai.properties.InstrumentationKey

output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = env_ai.properties.ConnectionString
output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = env_ai.properties.ConnectionString
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -156,4 +156,4 @@ output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env'

output AZURE_APPLICATION_INSIGHTS_INSTRUMENTATIONKEY string = existingAppInsights.properties.InstrumentationKey

output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = existingAppInsights.properties.ConnectionString
output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = existingAppInsights.properties.ConnectionString
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -146,4 +146,4 @@ output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_ID string = env_contributor_mi

output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_PRINCIPAL_ID string = env_contributor_mi.properties.principalId

output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource dashboard 'Microsoft.Web/sites@2024-11-01' = {
value: 'Unsecured'
}
{
name: 'Dashboard__Otlp__SuppressUnsecuredTelemetryMessage'
name: 'Dashboard__Otlp__SuppressUnsecuredMessage'
value: 'true'
}
{
Expand Down Expand Up @@ -146,4 +146,4 @@ output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_ID string = env_contributor_mi

output AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_PRINCIPAL_ID string = env_contributor_mi.properties.principalId

output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
output AZURE_APP_SERVICE_DASHBOARD_URI string = 'https://${take('${toLower('env')}-${toLower('aspiredashboard')}-${uniqueString(resourceGroup().id)}', 60)}.azurewebsites.net'
Loading