95 references to CertificateTrustScope
Aspire.Hosting (33)
ApplicationModel\CertificateAuthorityCollectionAnnotation.cs (1)
57
public
CertificateTrustScope
? Scope { get; internal set; }
ApplicationModel\CertificateTrustConfigurationCallbackAnnotation.cs (4)
56
/// <see cref="
CertificateTrustScope
.Override"/> or <see cref="
CertificateTrustScope
.System"/> is configured.
84
/// Gets the <see cref="
CertificateTrustScope
"/> for the resource.
86
public required
CertificateTrustScope
Scope { get; init; }
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\ResourceExtensions.cs (11)
386
/// <param name="bundlePathFactory">A function that takes the active <see cref="
CertificateTrustScope
"/> and returns a <see cref="ReferenceExpression"/> representing the path to a custom certificate bundle for the resource.</param>
387
/// <param name="certificateDirectoryPathsFactory">A function that takes the active <see cref="
CertificateTrustScope
"/> and returns a <see cref="ReferenceExpression"/> representing path(s) to a directory containing the custom certificates for the resource.</param>
390
internal static async ValueTask<(
CertificateTrustScope
, X509Certificate2Collection?)> ProcessCertificateTrustConfigAsync(
398
Func<
CertificateTrustScope
, ReferenceExpression> bundlePathFactory,
399
Func<
CertificateTrustScope
, ReferenceExpression> certificateDirectoryPathsFactory,
408
var
scope =
CertificateTrustScope
.Append;
420
if (scope ==
CertificateTrustScope
.None)
425
if (scope ==
CertificateTrustScope
.System)
454
if (scope !=
CertificateTrustScope
.Append)
485
if (scope ==
CertificateTrustScope
.System)
ContainerResourceBuilderExtensions.cs (3)
1059
/// <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>
1060
/// <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\DcpExecutor.cs (3)
2396
(
var
scope, var certificates) = await modelResource.ProcessCertificateTrustConfigAsync(
2431
if (scope ==
CertificateTrustScope
.Append)
2478
if (scope !=
CertificateTrustScope
.Append)
ProjectResourceBuilderExtensions.cs (2)
429
builder.WithCertificateTrustScope(
CertificateTrustScope
.None);
434
if (ctx.Scope !=
CertificateTrustScope
.None && OperatingSystem.IsWindows())
ResourceBuilderExtensions.cs (4)
2326
/// Sets the <see cref="
CertificateTrustScope
"/> for custom certificate authorities associated with the resource. The scope
2335
/// The default scope if not overridden is <see cref="
CertificateTrustScope
.Append"/> which means that custom certificate
2337
/// <see cref="
CertificateTrustScope
.Override"/> indicates the set of certificates in referenced
2354
public static IResourceBuilder<TResource> WithCertificateTrustScope<TResource>(this IResourceBuilder<TResource> builder,
CertificateTrustScope
scope)
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
196
if (ctx.Scope ==
CertificateTrustScope
.Append)
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (2)
369
.WithCertificateTrustScope(
CertificateTrustScope
.System)
372
if (ctx.Scope ==
CertificateTrustScope
.Append)
Aspire.Hosting.Tests (59)
DistributedApplicationTests.cs (59)
630
[InlineData(null, null, true, false,
CertificateTrustScope
.Append)]
631
[InlineData(null, false, false, false,
CertificateTrustScope
.Append)]
632
[InlineData(null, true, true, false,
CertificateTrustScope
.Append)]
633
[InlineData(false, null, false, false,
CertificateTrustScope
.Append)]
634
[InlineData(false, false, false, false,
CertificateTrustScope
.Append)]
635
[InlineData(false, true, true, false,
CertificateTrustScope
.Append)]
636
[InlineData(true, null, true, false,
CertificateTrustScope
.Append)]
637
[InlineData(true, false, false, false,
CertificateTrustScope
.Append)]
638
[InlineData(true, true, true, false,
CertificateTrustScope
.Append)]
639
[InlineData(null, null, true, true,
CertificateTrustScope
.Append)]
640
[InlineData(null, false, false, true,
CertificateTrustScope
.Append)]
641
[InlineData(null, true, true, true,
CertificateTrustScope
.Append)]
642
[InlineData(false, null, false, true,
CertificateTrustScope
.Append)]
643
[InlineData(false, false, false, true,
CertificateTrustScope
.Append)]
644
[InlineData(false, true, true, true,
CertificateTrustScope
.Append)]
645
[InlineData(true, null, true, true,
CertificateTrustScope
.Append)]
646
[InlineData(true, false, false, true,
CertificateTrustScope
.Append)]
647
[InlineData(true, true, true, true,
CertificateTrustScope
.Append)]
648
[InlineData(null, null, true, false,
CertificateTrustScope
.Override)]
649
[InlineData(null, false, false, false,
CertificateTrustScope
.Override)]
650
[InlineData(null, true, true, false,
CertificateTrustScope
.Override)]
651
[InlineData(false, null, false, false,
CertificateTrustScope
.Override)]
652
[InlineData(false, false, false, false,
CertificateTrustScope
.Override)]
653
[InlineData(false, true, true, false,
CertificateTrustScope
.Override)]
654
[InlineData(true, null, true, false,
CertificateTrustScope
.Override)]
655
[InlineData(true, false, false, false,
CertificateTrustScope
.Override)]
656
[InlineData(true, true, true, false,
CertificateTrustScope
.Override)]
657
[InlineData(null, null, true, true,
CertificateTrustScope
.Override)]
658
[InlineData(null, false, false, true,
CertificateTrustScope
.Override)]
659
[InlineData(null, true, true, true,
CertificateTrustScope
.Override)]
660
[InlineData(false, null, false, true,
CertificateTrustScope
.Override)]
661
[InlineData(false, false, false, true,
CertificateTrustScope
.Override)]
662
[InlineData(false, true, true, true,
CertificateTrustScope
.Override)]
663
[InlineData(true, null, true, true,
CertificateTrustScope
.Override)]
664
[InlineData(true, false, false, true,
CertificateTrustScope
.Override)]
665
[InlineData(true, true, true, true,
CertificateTrustScope
.Override)]
666
[InlineData(null, null, false, false,
CertificateTrustScope
.None)]
667
[InlineData(null, false, false, false,
CertificateTrustScope
.None)]
668
[InlineData(null, true, false, false,
CertificateTrustScope
.None)]
669
[InlineData(false, null, false, false,
CertificateTrustScope
.None)]
670
[InlineData(false, false, false, false,
CertificateTrustScope
.None)]
671
[InlineData(false, true, false, false,
CertificateTrustScope
.None)]
672
[InlineData(true, null, false, false,
CertificateTrustScope
.None)]
673
[InlineData(true, false, false, false,
CertificateTrustScope
.None)]
674
[InlineData(true, true, false, false,
CertificateTrustScope
.None)]
675
[InlineData(null, null, false, true,
CertificateTrustScope
.None)]
676
[InlineData(null, false, false, true,
CertificateTrustScope
.None)]
677
[InlineData(null, true, false, true,
CertificateTrustScope
.None)]
678
[InlineData(false, null, false, true,
CertificateTrustScope
.None)]
679
[InlineData(false, false, false, true,
CertificateTrustScope
.None)]
680
[InlineData(false, true, false, true,
CertificateTrustScope
.None)]
681
[InlineData(true, null, false, true,
CertificateTrustScope
.None)]
682
[InlineData(true, false, false, true,
CertificateTrustScope
.None)]
683
[InlineData(true, true, false, true,
CertificateTrustScope
.None)]
684
public async Task VerifyContainerIncludesExpectedDevCertificateConfiguration(bool? implicitTrust, bool? explicitTrust, bool expectDevCert, bool overridePaths,
CertificateTrustScope
trustScope)
734
if (trustScope ==
CertificateTrustScope
.Append)
738
else if (trustScope ==
CertificateTrustScope
.Override)
755
if (trustScope ==
CertificateTrustScope
.Append)
795
if (trustScope ==
CertificateTrustScope
.Override)