36 references to OtlpAuthMode
Aspire.Dashboard (14)
Authentication\OtlpCompositeAuthenticationHandler.cs (2)
44if (options.Otlp.AuthMode is OtlpAuthMode.ApiKey) 48else if (options.Otlp.AuthMode is OtlpAuthMode.ClientCertificate)
Components\Layout\MainLayout.razor.cs (1)
105if (Options.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured)
Configuration\DashboardOptions.cs (1)
79public OtlpAuthMode? AuthMode { get; set; }
Configuration\PostConfigureDashboardOptions.cs (2)
50options.Otlp.AuthMode = OtlpAuthMode.Unsecured; 55options.Otlp.AuthMode ??= OtlpAuthMode.Unsecured;
Configuration\ValidateDashboardOptions.cs (4)
70case OtlpAuthMode.Unsecured: 72case OtlpAuthMode.ApiKey: 78case OtlpAuthMode.ClientCertificate: 89errorMessages.Add($"OTLP endpoint authentication is not configured. Either specify {DashboardConfigNames.DashboardUnsecuredAllowAnonymousName.ConfigKey}=true, or specify {DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey}. Possible values: {string.Join(", ", typeof(OtlpAuthMode).GetEnumNames())}");
DashboardWebApplication.cs (4)
324if (_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 519AddEndpointConfiguration(initialValues, "OtlpGrpc", otlpGrpcAddress.ToString(), HttpProtocols.Http2, requiredClientCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate); 523AddEndpointConfiguration(initialValues, "OtlpHttp", otlpHttpAddress.ToString(), HttpProtocols.Http1AndHttp2, requiredClientCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate); 545AddEndpointConfiguration(initialValues, "OtlpGrpc", url!, HttpProtocols.Http1AndHttp2, requiredClientCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate);
Aspire.Dashboard.Components.Tests (1)
Layout\MainLayoutTests.cs (1)
141Services.Configure<DashboardOptions>(o => o.Otlp.AuthMode = OtlpAuthMode.Unsecured);
Aspire.Dashboard.Tests (21)
DashboardOptionsTests.cs (1)
24AuthMode = OtlpAuthMode.Unsecured,
Integration\IntegrationTestHelpers.cs (1)
64[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = nameof(OtlpAuthMode.Unsecured),
Integration\OtlpGrpcServiceTests.cs (10)
55config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString(); 77config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString(); 104config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString(); 132config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString(); 169["AuthMode"] = OtlpAuthMode.ApiKey.ToString(), 211["AuthMode"] = OtlpAuthMode.ApiKey.ToString(), 274config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ClientCertificate.ToString(); 300config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ClientCertificate.ToString(); 339config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ClientCertificate.ToString(); 378config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ClientCertificate.ToString();
Integration\OtlpHttpServiceTests.cs (3)
106config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString(); 130config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString(); 158config[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = OtlpAuthMode.ApiKey.ToString();
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (1)
32[DashboardConfigNames.DashboardOtlpAuthModeName.ConfigKey] = nameof(OtlpAuthMode.Unsecured),
Integration\StartupTests.cs (5)
119data["Dashboard:Otlp:AuthMode"] = nameof(OtlpAuthMode.ClientCertificate); 250initialData["Dashboard:Otlp:AuthMode"] = nameof(OtlpAuthMode.ApiKey); 258Assert.Equal(OtlpAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 439Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 458Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode);