Soenneker.Cloudflare.Validators.Request.Functions
11.0.455
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Cloudflare.Validators.Request.Functions --version 11.0.455
NuGet\Install-Package Soenneker.Cloudflare.Validators.Request.Functions -Version 11.0.455
<PackageReference Include="Soenneker.Cloudflare.Validators.Request.Functions" Version="11.0.455" />
<PackageVersion Include="Soenneker.Cloudflare.Validators.Request.Functions" Version="11.0.455" />
<PackageReference Include="Soenneker.Cloudflare.Validators.Request.Functions" />
paket add Soenneker.Cloudflare.Validators.Request.Functions --version 11.0.455
#r "nuget: Soenneker.Cloudflare.Validators.Request.Functions, 11.0.455"
#:package Soenneker.Cloudflare.Validators.Request.Functions@11.0.455
#addin nuget:?package=Soenneker.Cloudflare.Validators.Request.Functions&version=11.0.455
#tool nuget:?package=Soenneker.Cloudflare.Validators.Request.Functions&version=11.0.455
Soenneker.Cloudflare.Validators.Request.Functions
Validates the client certificate Azure App Service forwards to an isolated-worker Azure Function against packaged Cloudflare origin-pull certificate fingerprints.
Installation
dotnet add package Soenneker.Cloudflare.Validators.Request.Functions
Registration
using Soenneker.Cloudflare.Validators.Request.Functions.Registrars;
services.AddCloudflareRequestValidatorAsSingleton();
The package supplies cloudflareorigincerts.txt as a build resource. Set Cloudflare:RequestValidatorLog to true only when certificate-match debug logging is useful.
Usage
using Soenneker.Cloudflare.Validators.Request.Functions.Abstract;
bool fromCloudflare = await validator.IsFromCloudflare(
request,
functionContext.CancellationToken);
if (!fromCloudflare)
return request.CreateResponse(HttpStatusCode.Forbidden);
IsFromCloudflare reads the first X-ARR-ClientCert value, decodes the certificate, calculates SHA-256 over its DER bytes, and compares that fingerprint case-insensitively with the packaged set. Missing, malformed Base64, and invalid certificate data return false.
Trust boundary
X-ARR-ClientCert is meaningful only when Azure App Service is the trusted TLS terminator and supplies the header from an authenticated client certificate. Ensure Authenticated Origin Pulls is enabled, App Service requires client certificates, and the Function cannot be reached through an ingress path that lets callers forge the header or bypass certificate enforcement.
This validator performs exact fingerprint matching; it does not build a certificate chain. Cloudflare certificate rotation therefore requires an updated fingerprint package. Validate(string) exposes the same comparison for callers that already have a hexadecimal SHA-256 fingerprint.
For request enforcement, Soenneker.Cloudflare.Middlewares.Require.Functions provides middleware built on this validator.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Microsoft.Azure.Functions.Worker.Core (>= 2.52.0)
- Soenneker.Cloudflare.OriginCerts.Thumbprints (>= 11.0.55)
- Soenneker.Utils.File (>= 11.0.2344)
- Soenneker.Utils.Paths.Resources (>= 11.0.320)
- Soenneker.Validators.Validator (>= 11.0.755)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Cloudflare.Validators.Request.Functions:
| Package | Downloads |
|---|---|
|
Soenneker.Cloudflare.Middlewares.Require.Functions
A middleware component for Azure Functions that enforces Cloudflare-only access, blocking non-Cloudflare requests unless running in local/test environments. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.468 | 0 | 11/30/2026 |
| 11.0.467 | 0 | 11/30/2026 |
| 11.0.466 | 0 | 11/30/2026 |
| 11.0.465 | 0 | 11/29/2026 |
| 11.0.464 | 28 | 11/29/2026 |
| 11.0.463 | 148 | 11/19/2026 |
| 11.0.461 | 129 | 11/18/2026 |
| 11.0.460 | 130 | 11/18/2026 |
| 11.0.459 | 129 | 11/18/2026 |
| 11.0.457 | 129 | 11/18/2026 |
| 11.0.456 | 135 | 11/18/2026 |
| 11.0.455 | 137 | 11/15/2026 |
| 11.0.454 | 133 | 11/15/2026 |
| 11.0.453 | 132 | 11/11/2026 |
| 11.0.452 | 117 | 11/11/2026 |
| 11.0.451 | 112 | 11/11/2026 |
| 11.0.450 | 108 | 11/11/2026 |
| 11.0.449 | 106 | 11/11/2026 |
| 11.0.448 | 112 | 11/11/2026 |
| 11.0.447 | 103 | 11/11/2026 |
Updated Soenneker.Utils.Paths.Resources to 11.0.320