Soenneker.Cloudflare.Validators.Request
11.0.471
Prefix Reserved
dotnet add package Soenneker.Cloudflare.Validators.Request --version 11.0.471
NuGet\Install-Package Soenneker.Cloudflare.Validators.Request -Version 11.0.471
<PackageReference Include="Soenneker.Cloudflare.Validators.Request" Version="11.0.471" />
<PackageVersion Include="Soenneker.Cloudflare.Validators.Request" Version="11.0.471" />
<PackageReference Include="Soenneker.Cloudflare.Validators.Request" />
paket add Soenneker.Cloudflare.Validators.Request --version 11.0.471
#r "nuget: Soenneker.Cloudflare.Validators.Request, 11.0.471"
#:package Soenneker.Cloudflare.Validators.Request@11.0.471
#addin nuget:?package=Soenneker.Cloudflare.Validators.Request&version=11.0.471
#tool nuget:?package=Soenneker.Cloudflare.Validators.Request&version=11.0.471
Soenneker.Cloudflare.Validators.Request
Validates an ASP.NET Core request's TLS client certificate against Cloudflare's Authenticated Origin Pull CA.
Installation
dotnet add package Soenneker.Cloudflare.Validators.Request
Registration
using Soenneker.Cloudflare.Validators.Request.Registrars;
services.AddCloudflareRequestValidatorAsSingleton();
The package supplies the Cloudflare Authenticated Origin Pull CA certificate as a build resource. Set Cloudflare:RequestValidatorLog to true only when debug logging for missing or invalid certificates is useful.
Usage
using Soenneker.Cloudflare.Validators.Request.Abstract;
bool fromCloudflare = await validator.IsFromCloudflare(
httpContext,
httpContext.RequestAborted);
if (!fromCloudflare)
{
httpContext.Response.StatusCode = StatusCodes.Status403Forbidden;
return;
}
IsFromCloudflare requires a client certificate on HttpContext.Connection.ClientCertificate. It builds a custom-trust chain to the packaged Cloudflare CA, requires the client-authentication extended key usage, disables certificate downloads, and performs normal certificate validity checks.
Required origin setup
This validator is meaningful only when all of the following are true:
- Authenticated Origin Pulls is enabled for the Cloudflare zone.
- The public origin accepts traffic only through Cloudflare or otherwise requires a valid client certificate.
- The TLS endpoint serving ASP.NET Core requests requests and forwards the actual client certificate.
If TLS terminates at a load balancer or reverse proxy, configure certificate forwarding only across a trusted internal boundary. A public request header is not proof of a client certificate and must not be copied into ClientCertificate without authenticating the proxy that supplied it.
Validate(string) is a lower-level fingerprint comparison. It compares the supplied hexadecimal SHA-256 value with the packaged CA certificate; it does not validate a request or leaf certificate chain.
This package verifies Cloudflare's shared Authenticated Origin Pull CA, not a zone-specific origin-pull certificate. For enforcement in MVC applications, Soenneker.Cloudflare.Attributes.Require provides an authorization filter built on this validator.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Cloudflare.OriginCerts.Thumbprints (>= 11.0.56)
- Soenneker.Utils.File (>= 11.0.2348)
- Soenneker.Utils.Paths.Resources (>= 11.0.328)
- Soenneker.Validators.Validator (>= 11.0.756)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Cloudflare.Validators.Request:
| Package | Downloads |
|---|---|
|
Soenneker.Cloudflare.Attributes.Require
A .NET authorization filter for requiring Cloudflare sourced traffic |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.471 | 0 | 11/19/2026 |
| 11.0.469 | 0 | 11/18/2026 |
| 11.0.468 | 8 | 11/18/2026 |
| 11.0.467 | 12 | 11/18/2026 |
| 11.0.464 | 42 | 11/18/2026 |
| 11.0.463 | 121 | 11/15/2026 |
| 11.0.462 | 92 | 11/15/2026 |
| 11.0.461 | 185 | 11/11/2026 |
| 11.0.460 | 112 | 11/11/2026 |
| 11.0.459 | 100 | 11/11/2026 |
| 11.0.458 | 104 | 11/11/2026 |
| 11.0.457 | 85 | 11/11/2026 |
| 11.0.456 | 111 | 11/11/2026 |
| 11.0.455 | 102 | 11/11/2026 |
| 11.0.454 | 123 | 11/11/2026 |
| 11.0.452 | 301 | 11/3/2026 |
| 11.0.451 | 107 | 11/3/2026 |
| 11.0.450 | 105 | 11/3/2026 |
| 11.0.448 | 98 | 11/3/2026 |
| 11.0.447 | 102 | 11/3/2026 |
Updated Multiple NuGet packages