95 references to CertificateTrustScope
Aspire.Hosting (37)
ApplicationModel\CertificateAuthorityCollectionAnnotation.cs (1)
57public CertificateTrustScope? Scope { get; internal set; }
ApplicationModel\CertificateTrustConfigurationCallbackAnnotation.cs (4)
59/// <see cref="CertificateTrustScope.Override"/> or <see cref="CertificateTrustScope.System"/> is configured. 87/// Gets the <see cref="CertificateTrustScope"/> for the resource. 89public required CertificateTrustScope Scope { get; init; }
ApplicationModel\CertificateTrustExecutionConfigurationGatherer.cs (8)
22private readonly Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> _configContextFactory; 28public CertificateTrustExecutionConfigurationGatherer(Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> configContextFactory) 44additionalData.Scope = CertificateTrustScope.Append; 57if (additionalData.Scope == CertificateTrustScope.None) 63if (additionalData.Scope == CertificateTrustScope.System) 91if (additionalData.Scope != CertificateTrustScope.Append) 124if (additionalData.Scope == CertificateTrustScope.System) 141public CertificateTrustScope Scope { get; internal set; }
ApplicationModel\ContainerCertificatePathsAnnotation.cs (5)
45/// <see cref="CertificateTrustScope"/> is set to <see cref="CertificateTrustScope.Override"/> or 46/// <see cref="CertificateTrustScope.System"/>. 53/// when the resource's <see cref="CertificateTrustScope"/> is set to <see cref="CertificateTrustScope.Append"/>.
ApplicationModel\ExecutionConfigurationBuilderExtensions.cs (1)
44public static IExecutionConfigurationBuilder WithCertificateTrustConfig(this IExecutionConfigurationBuilder builder, Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> configContextFactory)
Ats\ExecutionConfigurationExports.cs (2)
85Scope = CertificateTrustScope.None, 178public required CertificateTrustScope Scope { get; init; }
ContainerResourceBuilderExtensions.cs (3)
1301/// <param name="defaultCertificateBundlePaths">List of default certificate bundle paths in the container that will be replaced in <see cref="CertificateTrustScope.Override"/> or <see cref="CertificateTrustScope.System"/> modes. If not specified, defaults to <c>/etc/ssl/certs/ca-certificates.crt</c> for Linux containers.</param> 1302/// <param name="defaultCertificateDirectoryPaths">List of default certificate directory paths in the container that may be appended to the custom certificates directory in <see cref="CertificateTrustScope.Append"/> mode. If not specified, defaults to <c>/usr/local/share/ca-certificates/</c> for Linux containers.</param>
Dcp\ContainerCreator.cs (5)
707if (scope == CertificateTrustScope.Append) 734&& certificateTrustConfiguration.Scope != CertificateTrustScope.None 744if (certificateTrustConfiguration.Scope != CertificateTrustScope.Append) 766CertificateTrustScope = certificateTrustConfiguration?.Scope ?? CertificateTrustScope.None, 1089public CertificateTrustScope CertificateTrustScope { get; init; }
Dcp\ExecutableConfigurationResolver.cs (2)
49if (scope == CertificateTrustScope.Append) 88certificateTrustConfiguration.Scope != CertificateTrustScope.None &&
ProjectResourceBuilderExtensions.cs (2)
561builder.WithCertificateTrustScope(CertificateTrustScope.None); 566if (ctx.Scope != CertificateTrustScope.None && OperatingSystem.IsWindows())
ResourceBuilderExtensions.cs (4)
4066/// Sets the <see cref="CertificateTrustScope"/> for custom certificate authorities associated with the resource. The scope 4077/// The default scope if not overridden is <see cref="CertificateTrustScope.Append"/> which means that custom certificate 4079/// <see cref="CertificateTrustScope.Override"/> indicates the set of certificates in referenced 4097public static IResourceBuilder<TResource> WithCertificateTrustScope<TResource>(this IResourceBuilder<TResource> builder, CertificateTrustScope scope)
Aspire.Hosting.Azure.Tests (1)
AzureCosmosDBExtensionsTests.cs (1)
735Scope = CertificateTrustScope.Append,
Aspire.Hosting.Java (5)
JavaHostingExtensions.cs (5)
109.WithCertificateTrustScope(CertificateTrustScope.System) 270.WithCertificateTrustScope(CertificateTrustScope.System) 1677/// <see cref="CertificateTrustScope.System"/> so the generated bundle carries the system roots 1679/// <see cref="CertificateTrustScope.Append"/>, the bundle would contain only Aspire's own 1688if (ctx.Scope == CertificateTrustScope.Append)
Aspire.Hosting.Java.Tests (3)
AddJavaAppTests.cs (2)
894Assert.Equal(CertificateTrustScope.System, certAnnotation.Scope); 921Scope = CertificateTrustScope.Append,
AddJavaContainerTests.cs (1)
150Assert.Equal(CertificateTrustScope.System, scope.Scope);
Aspire.Hosting.JavaScript (8)
JavaScriptHostingExtensions.cs (8)
306if (ctx.Scope == CertificateTrustScope.Append) 723if (ctx.Scope == CertificateTrustScope.Append) 1097if (ctx.Scope is CertificateTrustScope.Append or CertificateTrustScope.Override or CertificateTrustScope.System) 1110if (ctx.Scope == CertificateTrustScope.Override) 1114else if (ctx.Scope == CertificateTrustScope.System) 3040.WithCertificateTrustScope(CertificateTrustScope.None);
Aspire.Hosting.JavaScript.Tests (6)
AddBunAppTests.cs (2)
264Scope = CertificateTrustScope.Append, 292Scope = CertificateTrustScope.Override,
AddDenoAppTests.cs (3)
2410Scope = CertificateTrustScope.Append, 2439Scope = CertificateTrustScope.Override, 2467Scope = CertificateTrustScope.System,
ResourceCreationTests.cs (1)
211Assert.Equal(CertificateTrustScope.None, certAnnotation.Scope);
Aspire.Hosting.Python (3)
PythonAppResourceBuilderExtensions.cs (3)
404.WithCertificateTrustScope(CertificateTrustScope.System) 407if (ctx.Scope == CertificateTrustScope.Append) 1322.WithCertificateTrustScope(CertificateTrustScope.None);
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
853Assert.Equal(CertificateTrustScope.None, certAnnotation.Scope);
Aspire.Hosting.Tests (30)
Dcp\DcpExecutorTests.cs (3)
5412.WithCertificateTrustScope(CertificateTrustScope.Override) 5454.WithCertificateTrustScope(CertificateTrustScope.Override) 5587var sslCertDir = GetPlainExecutableSslCertDirAsync(builder => builder.WithCertificateTrustScope(CertificateTrustScope.Override)).GetAwaiter().GetResult();
DistributedApplicationTests.cs (18)
963[InlineData(false, false, false, false, CertificateTrustScope.Append)] 964[InlineData(false, true, true, false, CertificateTrustScope.Append)] 965[InlineData(true, false, false, false, CertificateTrustScope.Append)] 966[InlineData(false, false, false, false, CertificateTrustScope.Override)] 967[InlineData(false, true, true, false, CertificateTrustScope.Override)] 968[InlineData(true, false, false, false, CertificateTrustScope.Override)] 969[InlineData(false, false, false, true, CertificateTrustScope.Override)] 970[InlineData(false, true, true, true, CertificateTrustScope.Override)] 971[InlineData(true, false, false, true, CertificateTrustScope.Override)] 972[InlineData(false, false, false, false, CertificateTrustScope.None)] 973[InlineData(false, true, false, false, CertificateTrustScope.None)] 974[InlineData(true, false, false, false, CertificateTrustScope.None)] 975public async Task VerifyContainerIncludesExpectedDevCertificateConfiguration(bool? implicitTrust, bool? explicitTrust, bool expectDevCert, bool overridePaths, CertificateTrustScope trustScope) 1023if (trustScope == CertificateTrustScope.Append) 1027else if (trustScope == CertificateTrustScope.Override) 1044if (trustScope == CertificateTrustScope.Append) 1053if (trustScope == CertificateTrustScope.None) 1068if (trustScope == CertificateTrustScope.Override)
ExecutionConfigurationGathererTests.cs (9)
300Assert.Equal(CertificateTrustScope.Append, metadata.Scope); 314.WithCertificateTrustScope(CertificateTrustScope.System) 329Assert.Equal(CertificateTrustScope.System, metadata.Scope); 344.WithCertificateTrustScope(CertificateTrustScope.Override) 359Assert.Equal(CertificateTrustScope.Override, metadata.Scope); 372.WithCertificateTrustScope(CertificateTrustScope.None) 387Assert.Equal(CertificateTrustScope.None, metadata.Scope); 420.WithCertificateTrustScope(CertificateTrustScope.Append) 882private static Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> CreateCertificateTrustConfigurationContextFactory()
TestingAppHost1.AppHost (1)
Program.cs (1)
56.WithCertificateTrustScope(CertificateTrustScope.None);