diff --git a/NuGet.config b/NuGet.config index 46ee1c2f75f338caacbb2eb9d20745fd404243b1..aa6163b399dbb683c8bc73c8bac0c8a36af80931 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,8 +4,10 @@ <clear /> <!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.--> <!-- Begin: Package sources from dotnet-runtime --> + <add key="darc-int-dotnet-runtime-3a25a7f" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-3a25a7f1/nuget/v3/index.json" /> <!-- End: Package sources from dotnet-runtime --> <!-- Begin: Package sources from dotnet-efcore --> + <add key="darc-int-dotnet-efcore-41e6aaa" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-41e6aaaf/nuget/v3/index.json" /> <!-- End: Package sources from dotnet-efcore --> <!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.--> <add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" /> @@ -23,5 +25,13 @@ </packageSources> <disabledPackageSources> <clear /> + <!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.--> + <!-- Begin: Package sources from dotnet-efcore --> + <add key="darc-int-dotnet-efcore-41e6aaa" value="true" /> + <!-- End: Package sources from dotnet-efcore --> + <!-- Begin: Package sources from dotnet-runtime --> + <add key="darc-int-dotnet-runtime-3a25a7f" value="true" /> + <!-- End: Package sources from dotnet-runtime --> + <!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.--> </disabledPackageSources> </configuration> diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 39126423139d4915504d7303ba01cdc2d86bb259..6b6b837c3dd469b674b7eafaf420879b01af6b76 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> <Dependencies> <ProductDependencies> - <Dependency Name="dotnet-ef" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="dotnet-ef" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> - <Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.0"> - <Uri>https://github.com/dotnet/efcore</Uri> - <Sha>0e3742183e6ae2b6c38834919698d24183834d81</Sha> + <Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri> + <Sha>41e6aaaf6216de904530de11b0bfd4af43fb13f7</Sha> </Dependency> <Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0"> <Uri>https://github.com/dotnet/runtime</Uri> @@ -113,9 +113,9 @@ <Uri>https://github.com/dotnet/runtime</Uri> <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> </Dependency> - <Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="6.0.0-rtm.21522.10"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="6.0.1-servicing.21567.5"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> <Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0"> <Uri>https://github.com/dotnet/runtime</Uri> @@ -177,9 +177,9 @@ <Uri>https://github.com/dotnet/runtime</Uri> <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> </Dependency> - <Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.0-rtm.21522.10"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.1-servicing.21567.5"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> <Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.0"> <Uri>https://github.com/dotnet/runtime</Uri> @@ -193,9 +193,9 @@ <Uri>https://github.com/dotnet/runtime</Uri> <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> </Dependency> - <Dependency Name="System.IO.Pipelines" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="System.IO.Pipelines" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> <Dependency Name="System.Net.Http.Json" Version="6.0.0"> <Uri>https://github.com/dotnet/runtime</Uri> @@ -233,9 +233,9 @@ <Uri>https://github.com/dotnet/runtime</Uri> <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> </Dependency> - <Dependency Name="System.Text.Json" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="System.Text.Json" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> <Dependency Name="System.Threading.Channels" Version="6.0.0"> <Uri>https://github.com/dotnet/runtime</Uri> @@ -245,40 +245,40 @@ <Uri>https://github.com/dotnet/runtime</Uri> <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> </Dependency> - <Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> - <Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> - <Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> <!-- Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime. All Runtime.$rid packages should have the same version. --> - <Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> - <Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> - <Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.0-rtm.21522.10"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.1-servicing.21567.5"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> </ProductDependencies> <ToolsetDependencies> <!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 --> - <Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.0"> - <Uri>https://github.com/dotnet/runtime</Uri> - <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha> + <Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.1"> + <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> + <Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha> </Dependency> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21560.2"> <Uri>https://github.com/dotnet/arcade</Uri> diff --git a/eng/Versions.props b/eng/Versions.props index ccf17107e8ca46a75bb89e533989ce0c432ea585..4307f175b3069077aad0b7452192f192c95d094f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -65,12 +65,12 @@ <PropertyGroup Label="Automated"> <!-- Packages from dotnet/runtime --> <MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion> - <MicrosoftNETCoreAppRefVersion>6.0.0</MicrosoftNETCoreAppRefVersion> - <MicrosoftNETCoreAppRuntimewinx64Version>6.0.0</MicrosoftNETCoreAppRuntimewinx64Version> - <MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.0</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion> - <MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.0</MicrosoftNETRuntimeWebAssemblySdkVersion> - <MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.0</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion> - <MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.0-rtm.21522.10</MicrosoftNETCoreBrowserDebugHostTransportVersion> + <MicrosoftNETCoreAppRefVersion>6.0.1</MicrosoftNETCoreAppRefVersion> + <MicrosoftNETCoreAppRuntimewinx64Version>6.0.1</MicrosoftNETCoreAppRuntimewinx64Version> + <MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.1</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion> + <MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.1</MicrosoftNETRuntimeWebAssemblySdkVersion> + <MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.1</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion> + <MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.1-servicing.21567.5</MicrosoftNETCoreBrowserDebugHostTransportVersion> <MicrosoftExtensionsCachingAbstractionsVersion>6.0.0</MicrosoftExtensionsCachingAbstractionsVersion> <MicrosoftExtensionsCachingMemoryVersion>6.0.0</MicrosoftExtensionsCachingMemoryVersion> <MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0</MicrosoftExtensionsConfigurationAbstractionsVersion> @@ -89,7 +89,7 @@ <MicrosoftExtensionsFileProvidersCompositeVersion>6.0.0</MicrosoftExtensionsFileProvidersCompositeVersion> <MicrosoftExtensionsFileProvidersPhysicalVersion>6.0.0</MicrosoftExtensionsFileProvidersPhysicalVersion> <MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0</MicrosoftExtensionsFileSystemGlobbingVersion> - <MicrosoftExtensionsHostFactoryResolverSourcesVersion>6.0.0-rtm.21522.10</MicrosoftExtensionsHostFactoryResolverSourcesVersion> + <MicrosoftExtensionsHostFactoryResolverSourcesVersion>6.0.1-servicing.21567.5</MicrosoftExtensionsHostFactoryResolverSourcesVersion> <MicrosoftExtensionsHostingAbstractionsVersion>6.0.0</MicrosoftExtensionsHostingAbstractionsVersion> <MicrosoftExtensionsHostingVersion>6.0.0</MicrosoftExtensionsHostingVersion> <MicrosoftExtensionsHttpVersion>6.0.0</MicrosoftExtensionsHttpVersion> @@ -105,11 +105,11 @@ <MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0</MicrosoftExtensionsOptionsDataAnnotationsVersion> <MicrosoftExtensionsOptionsVersion>6.0.0</MicrosoftExtensionsOptionsVersion> <MicrosoftExtensionsPrimitivesVersion>6.0.0</MicrosoftExtensionsPrimitivesVersion> - <MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.0-rtm.21522.10</MicrosoftInternalRuntimeAspNetCoreTransportVersion> + <MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.1-servicing.21567.5</MicrosoftInternalRuntimeAspNetCoreTransportVersion> <SystemDiagnosticsDiagnosticSourceVersion>6.0.0</SystemDiagnosticsDiagnosticSourceVersion> <SystemDiagnosticsEventLogVersion>6.0.0</SystemDiagnosticsEventLogVersion> <SystemDirectoryServicesProtocolsVersion>6.0.0</SystemDirectoryServicesProtocolsVersion> - <SystemIOPipelinesVersion>6.0.0</SystemIOPipelinesVersion> + <SystemIOPipelinesVersion>6.0.1</SystemIOPipelinesVersion> <SystemNetHttpJsonVersion>6.0.0</SystemNetHttpJsonVersion> <SystemNetHttpWinHttpHandlerVersion>6.0.0</SystemNetHttpWinHttpHandlerVersion> <SystemReflectionMetadataVersion>6.0.0</SystemReflectionMetadataVersion> @@ -119,19 +119,19 @@ <SystemSecurityCryptographyXmlVersion>6.0.0</SystemSecurityCryptographyXmlVersion> <SystemServiceProcessServiceControllerVersion>6.0.0</SystemServiceProcessServiceControllerVersion> <SystemTextEncodingsWebVersion>6.0.0</SystemTextEncodingsWebVersion> - <SystemTextJsonVersion>6.0.0</SystemTextJsonVersion> + <SystemTextJsonVersion>6.0.1</SystemTextJsonVersion> <SystemThreadingChannelsVersion>6.0.0</SystemThreadingChannelsVersion> <!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 --> - <MicrosoftNETCorePlatformsVersion>6.0.0</MicrosoftNETCorePlatformsVersion> + <MicrosoftNETCorePlatformsVersion>6.0.1</MicrosoftNETCorePlatformsVersion> <!-- Packages from dotnet/efcore --> - <dotnetefVersion>6.0.0</dotnetefVersion> - <MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.0</MicrosoftEntityFrameworkCoreInMemoryVersion> - <MicrosoftEntityFrameworkCoreRelationalVersion>6.0.0</MicrosoftEntityFrameworkCoreRelationalVersion> - <MicrosoftEntityFrameworkCoreSqliteVersion>6.0.0</MicrosoftEntityFrameworkCoreSqliteVersion> - <MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.0</MicrosoftEntityFrameworkCoreSqlServerVersion> - <MicrosoftEntityFrameworkCoreToolsVersion>6.0.0</MicrosoftEntityFrameworkCoreToolsVersion> - <MicrosoftEntityFrameworkCoreVersion>6.0.0</MicrosoftEntityFrameworkCoreVersion> - <MicrosoftEntityFrameworkCoreDesignVersion>6.0.0</MicrosoftEntityFrameworkCoreDesignVersion> + <dotnetefVersion>6.0.1</dotnetefVersion> + <MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.1</MicrosoftEntityFrameworkCoreInMemoryVersion> + <MicrosoftEntityFrameworkCoreRelationalVersion>6.0.1</MicrosoftEntityFrameworkCoreRelationalVersion> + <MicrosoftEntityFrameworkCoreSqliteVersion>6.0.1</MicrosoftEntityFrameworkCoreSqliteVersion> + <MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.1</MicrosoftEntityFrameworkCoreSqlServerVersion> + <MicrosoftEntityFrameworkCoreToolsVersion>6.0.1</MicrosoftEntityFrameworkCoreToolsVersion> + <MicrosoftEntityFrameworkCoreVersion>6.0.1</MicrosoftEntityFrameworkCoreVersion> + <MicrosoftEntityFrameworkCoreDesignVersion>6.0.1</MicrosoftEntityFrameworkCoreDesignVersion> <!-- Packages from dotnet/arcade --> <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21560.2</MicrosoftDotNetBuildTasksInstallersVersion> <MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21560.2</MicrosoftDotNetBuildTasksTemplatingVersion> diff --git a/src/Security/Authentication/Certificate/src/AssemblyInfo.cs b/src/Security/Authentication/Certificate/src/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..92a83a2875b177a71f422b3cb9711d374e192816 --- /dev/null +++ b/src/Security/Authentication/Certificate/src/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Authentication.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/Security/Authentication/Certificate/src/CertificateValidationCache.cs b/src/Security/Authentication/Certificate/src/CertificateValidationCache.cs index 0e48ac403daeb57c16b58d91cdbd0d04d3301c29..bd4912ac9decce3f90b2671860344e7afee56aa6 100644 --- a/src/Security/Authentication/Certificate/src/CertificateValidationCache.cs +++ b/src/Security/Authentication/Certificate/src/CertificateValidationCache.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using Microsoft.AspNetCore.Http; @@ -16,16 +17,21 @@ namespace Microsoft.AspNetCore.Authentication.Certificate { private readonly MemoryCache _cache; private readonly CertificateValidationCacheOptions _options; + private readonly ISystemClock _clock; + + internal CertificateValidationCache(IOptions<CertificateValidationCacheOptions> options, ISystemClock clock) + { + _options = options.Value; + _cache = new MemoryCache(new MemoryCacheOptions { SizeLimit = _options.CacheSize, Clock = new CachingClock(clock) }); + _clock = clock; + } /// <summary> /// Initializes a new instance of <see cref="CertificateValidationCache"/>. /// </summary> /// <param name="options">An accessor to <see cref="CertificateValidationCacheOptions"/></param> - public CertificateValidationCache(IOptions<CertificateValidationCacheOptions> options) - { - _options = options.Value; - _cache = new MemoryCache(new MemoryCacheOptions { SizeLimit = _options.CacheSize }); - } + public CertificateValidationCache(IOptions<CertificateValidationCacheOptions> options) : this(options, new SystemClock()) + { } /// <summary> /// Get the <see cref="AuthenticateResult"/> for the connection and certificate. @@ -43,10 +49,30 @@ namespace Microsoft.AspNetCore.Authentication.Certificate /// <param name="certificate">The certificate.</param> /// <param name="result">the <see cref="AuthenticateResult"/></param> public void Put(HttpContext context, X509Certificate2 certificate, AuthenticateResult result) - => _cache.Set(ComputeKey(certificate), result.Clone(), new MemoryCacheEntryOptions() - .SetSize(1).SetSlidingExpiration(_options.CacheEntryExpiration).SetAbsoluteExpiration(certificate.NotAfter)); - + { + // Never cache longer than 30 minutes + var absoluteExpiration = _clock.UtcNow.Add(TimeSpan.FromMinutes(30)); + var notAfter = certificate.NotAfter.ToUniversalTime(); + if (notAfter < absoluteExpiration) + { + absoluteExpiration = notAfter; + } + _cache.Set(ComputeKey(certificate), result.Clone(), new MemoryCacheEntryOptions() + .SetSize(1) + .SetSlidingExpiration(_options.CacheEntryExpiration) + .SetAbsoluteExpiration(absoluteExpiration)); + } + private string ComputeKey(X509Certificate2 certificate) => certificate.GetCertHashString(HashAlgorithmName.SHA256); + + + private class CachingClock : Extensions.Internal.ISystemClock + { + private readonly ISystemClock _clock; + public CachingClock(ISystemClock clock) => _clock = clock; + + public DateTimeOffset UtcNow => _clock.UtcNow; + } } } diff --git a/src/Security/Authentication/test/CertificateTests.cs b/src/Security/Authentication/test/CertificateTests.cs index f8bbbeeeb610a178ebb87302eb12147d3de97e4e..e25bbafcd8f3b7dba349e881edcd742016fe21cc 100644 --- a/src/Security/Authentication/test/CertificateTests.cs +++ b/src/Security/Authentication/test/CertificateTests.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Net; using System.Security.Claims; +using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; using System.Xml.Linq; @@ -15,8 +16,10 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.TestHost; using Microsoft.AspNetCore.Testing; +using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Options; using Xunit; namespace Microsoft.AspNetCore.Authentication.Certificate.Test @@ -682,6 +685,108 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test Assert.Single(responseAsXml.Elements("claim")); } + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task VerifyValidationResultNeverCachedAfter30Min(bool cache) + { + const string Expected = "John Doe"; + var validationCount = 0; + var clock = new TestClock(); + clock.UtcNow = DateTime.UtcNow; + + using var host = await CreateHost( + new CertificateAuthenticationOptions + { + AllowedCertificateTypes = CertificateTypes.SelfSigned, + Events = new CertificateAuthenticationEvents + { + OnCertificateValidated = context => + { + validationCount++; + + // Make sure we get the validated principal + Assert.NotNull(context.Principal); + + var claims = new[] + { + new Claim(ClaimTypes.Name, Expected, ClaimValueTypes.String, context.Options.ClaimsIssuer), + new Claim("ValidationCount", validationCount.ToString(CultureInfo.InvariantCulture), ClaimValueTypes.String, context.Options.ClaimsIssuer) + }; + + context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); + context.Success(); + return Task.CompletedTask; + } + } + }, + Certificates.SelfSignedValidWithNoEku, null, null, false, "", cache, clock); + + using var server = host.GetTestServer(); + var response = await server.CreateClient().GetAsync("https://example.com/"); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + XElement responseAsXml = null; + if (response.Content != null && + response.Content.Headers.ContentType != null && + response.Content.Headers.ContentType.MediaType == "text/xml") + { + var responseContent = await response.Content.ReadAsStringAsync(); + responseAsXml = XElement.Parse(responseContent); + } + + Assert.NotNull(responseAsXml); + var name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); + Assert.Single(name); + Assert.Equal(Expected, name.First().Value); + var count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); + Assert.Single(count); + Assert.Equal("1", count.First().Value); + + // Second request should not trigger validation if caching + response = await server.CreateClient().GetAsync("https://example.com/"); + responseAsXml = null; + if (response.Content != null && + response.Content.Headers.ContentType != null && + response.Content.Headers.ContentType.MediaType == "text/xml") + { + var responseContent = await response.Content.ReadAsStringAsync(); + responseAsXml = XElement.Parse(responseContent); + } + + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); + Assert.Single(name); + Assert.Equal(Expected, name.First().Value); + count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); + Assert.Single(count); + var expected = cache ? "1" : "2"; + Assert.Equal(expected, count.First().Value); + + clock.Add(TimeSpan.FromMinutes(31)); + + // Third request should always trigger validation even if caching + response = await server.CreateClient().GetAsync("https://example.com/"); + responseAsXml = null; + if (response.Content != null && + response.Content.Headers.ContentType != null && + response.Content.Headers.ContentType.MediaType == "text/xml") + { + var responseContent = await response.Content.ReadAsStringAsync(); + responseAsXml = XElement.Parse(responseContent); + } + + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); + Assert.Single(name); + Assert.Equal(Expected, name.First().Value); + count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); + Assert.Single(count); + + var laterExpected = cache ? "2" : "3"; + Assert.Equal(laterExpected, count.First().Value); + } + private static async Task<IHost> CreateHost( CertificateAuthenticationOptions configureOptions, X509Certificate2 clientCertificate = null, @@ -689,7 +794,8 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test Uri baseAddress = null, bool wireUpHeaderMiddleware = false, string headerName = "", - bool useCache = false) + bool useCache = false, + ISystemClock clock = null) { var host = new HostBuilder() .ConfigureWebHost(builder => @@ -762,7 +868,14 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test } if (useCache) { - authBuilder.AddCertificateCache(); + if (clock != null) + { + services.AddSingleton<ICertificateValidationCache>(new CertificateValidationCache(Options.Create(new CertificateValidationCacheOptions()), clock)); + } + else + { + authBuilder.AddCertificateCache(); + } } if (wireUpHeaderMiddleware && !string.IsNullOrEmpty(headerName)) @@ -772,6 +885,11 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test options.CertificateHeader = headerName; }); } + + if (clock != null) + { + services.AddSingleton(clock); + } })) .Build(); diff --git a/src/Servers/IIS/AspNetCoreModuleV2/OutOfProcessRequestHandler/serverprocess.cpp b/src/Servers/IIS/AspNetCoreModuleV2/OutOfProcessRequestHandler/serverprocess.cpp index 94e3279f7521d1922c94ac1af4a4ef4d2bb283d9..84ace7e06cb04b258883e0abb1489a72953e1212 100644 --- a/src/Servers/IIS/AspNetCoreModuleV2/OutOfProcessRequestHandler/serverprocess.cpp +++ b/src/Servers/IIS/AspNetCoreModuleV2/OutOfProcessRequestHandler/serverprocess.cpp @@ -486,8 +486,9 @@ SERVER_PROCESS::SetupCommandLine( pszPath = pszFullPath; } } - if (FAILED_LOG(hr = pstrCommandLine->Copy(pszPath)) || - FAILED_LOG(hr = pstrCommandLine->Append(L" ")) || + if (FAILED_LOG(hr = pstrCommandLine->Copy(L"\"")) || + FAILED_LOG(hr = pstrCommandLine->Append(pszPath)) || + FAILED_LOG(hr = pstrCommandLine->Append(L"\" ")) || FAILED_LOG(hr = pstrCommandLine->Append(m_Arguments.QueryStr()))) { goto Finished; diff --git a/src/submodules/spa-templates b/src/submodules/spa-templates index 9ae11cea16c84ce0d803c8a1ca69216d989d9815..55da9ce020682531efe3cac6b1dfa5ca4b8f97b0 160000 --- a/src/submodules/spa-templates +++ b/src/submodules/spa-templates @@ -1 +1 @@ -Subproject commit 9ae11cea16c84ce0d803c8a1ca69216d989d9815 +Subproject commit 55da9ce020682531efe3cac6b1dfa5ca4b8f97b0