Fotbiler.RuleGate.AspNetCore
1.0.0
dotnet add package Fotbiler.RuleGate.AspNetCore --version 1.0.0
NuGet\Install-Package Fotbiler.RuleGate.AspNetCore -Version 1.0.0
<PackageReference Include="Fotbiler.RuleGate.AspNetCore" Version="1.0.0" />
<PackageVersion Include="Fotbiler.RuleGate.AspNetCore" Version="1.0.0" />
<PackageReference Include="Fotbiler.RuleGate.AspNetCore" />
paket add Fotbiler.RuleGate.AspNetCore --version 1.0.0
#r "nuget: Fotbiler.RuleGate.AspNetCore, 1.0.0"
#:package Fotbiler.RuleGate.AspNetCore@1.0.0
#addin nuget:?package=Fotbiler.RuleGate.AspNetCore&version=1.0.0
#tool nuget:?package=Fotbiler.RuleGate.AspNetCore&version=1.0.0
RuleGate ASP.NET Core
ASP.NET Core integration for the RuleGate authorization framework.
This package provides dependency injection, configurable claims mapping,
dynamic policies, Minimal API endpoint helpers, controller and action
attributes, imperative authorization extensions, resource mapping, structured
diagnostics, ordered subject/resource/context attribute enrichment, local
policy sources, atomic reload hosting, and opt-in safe HTTP authorization
results. Exporter-neutral RuleGate activities automatically correlate with the
current ASP.NET Core request activity when the host registers the public
RuleGate activity source and meter.
The default handler supplies deterministic evaluation time through the
registered IRuleGateClock; trusted context values remain application-owned.
RuleGate 1.0 is stable. Public API compatibility follows Semantic Versioning.
Installation
dotnet add package Fotbiler.RuleGate.AspNetCore --version 1.0.0
Compatibility
This package targets .NET Core 3.1 and every .NET release from 5 through 10. .NET Core 3.1 and .NET 5–7 are end-of-life and receive compatibility verification only; they do not receive security support from RuleGate or Microsoft.
Register RuleGate
using Fotbiler.RuleGate.AspNetCore.DependencyInjection;
builder.Services
.AddRuleGate()
.AddYamlPolicyFile(
"rulegate.yaml",
options => options.ReloadOnChange = true);
YAML file, embedded-resource, structured configuration, in-memory, and application-defined sources are supported. A candidate is activated only after complete validation; failed reloads preserve the last valid snapshot.
The application must configure ASP.NET Core authentication and authorization using its trusted identity provider and claim model.
Customize evaluation time
AddRuleGate() registers a system-backed IRuleGateClock by default.
Applications that need a controlled trusted clock can register their own
implementation before RuleGate:
using Fotbiler.RuleGate.AspNetCore.Time;
builder.Services.AddSingleton<IRuleGateClock>(
applicationRuleGateClock);
builder.Services.AddRuleGate();
RuleGate preserves the application registration. Custom production clocks must not derive authorization time from caller-controlled input.
Add trusted attribute providers
using Fotbiler.RuleGate.AspNetCore.Enrichment;
builder.Services
.AddRuleGate()
.AddSubjectAttributeProvider<TenantAttributeProvider>()
.AddResourceAttributeProvider<DocumentAttributeProvider>()
.AddContextAttributeProvider<RequestContextAttributeProvider>()
.AddPolicies(compilation.Policies);
Providers are scoped by default. They run sequentially in subject, resource, and context stages. Missing required data, provider exceptions, cancellation, unsupported values, and default attribute collisions fail closed before the authorization engine runs.
Protect a Minimal API endpoint
using Fotbiler.RuleGate.AspNetCore.Endpoints;
app.MapGet(
"/documents/{id}",
(string id) =>
{
return Results.Ok(
new
{
id,
});
})
.RequireRuleGate(
resourceType: "document",
action: "read",
resourceIdRouteValue: "id");
Dynamic policy names use this form:
RuleGate:<resource-type>:<action>
RuleGate packages
| Package | Purpose |
|---|---|
| Fotbiler.RuleGate.Abstractions | Public authorization contracts and extension abstractions |
| Fotbiler.RuleGate.Core | Local fail-closed authorization engine and built-in evaluators |
| Fotbiler.RuleGate.Manifest | YAML manifest loading, validation, and compilation |
| Fotbiler.RuleGate.AspNetCore | ASP.NET Core integration and attribute enrichment |
| Fotbiler.RuleGate.Cli | Manifest validation, policy testing, generation, and CI usage |
| Fotbiler.RuleGate.Keycloak | Optional Keycloak claim normalization and subject mapping |
Documentation
- ASP.NET Core integration
- Migrating to RuleGate 1.0
- ASP.NET Core enrichment
- Getting started
- Diagnostics
- Security model
- RuleGate CLI
- Policy testing
- Policy sources and atomic reload
- Telemetry, performance, and concurrency
- Documentation index
- Minimal ASP.NET Core reference
- Full-stack document approval reference
Security
Authentication establishes identity; RuleGate evaluates authorization. Claims, resource identifiers, and context attributes must be mapped from trusted server-side sources.
Report suspected vulnerabilities through the private security reporting process.
License
RuleGate is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.1)
-
net10.0
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
-
net5.0
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.1)
-
net6.0
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
-
net7.0
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
-
net8.0
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
-
net9.0
- Fotbiler.RuleGate.Abstractions (>= 1.0.0)
- Fotbiler.RuleGate.Core (>= 1.0.0)
- Fotbiler.RuleGate.Manifest (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fotbiler.RuleGate.AspNetCore:
| Package | Downloads |
|---|---|
|
Fotbiler.RuleGate.Keycloak
Optional Keycloak claim normalization and RuleGate subject mapping for ASP.NET Core applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 62 | 8/1/2026 |
| 1.0.0-rc.1 | 127 | 8/1/2026 |
| 0.9.0-preview.4 | 93 | 7/31/2026 |
| 0.9.0-preview.3 | 34 | 7/31/2026 |
| 0.9.0-preview.2 | 47 | 7/31/2026 |
| 0.9.0-preview.1 | 37 | 7/31/2026 |
| 0.8.0-preview.2 | 35 | 7/31/2026 |
| 0.7.0-preview.2 | 166 | 7/29/2026 |
| 0.7.0-preview.1 | 36 | 7/29/2026 |
| 0.6.0-preview.2 | 44 | 7/29/2026 |
| 0.6.0-preview.1 | 37 | 7/29/2026 |
| 0.5.0-preview.2 | 50 | 7/29/2026 |
| 0.3.0-preview.2 | 50 | 7/28/2026 |
| 0.3.0-preview.1 | 35 | 7/28/2026 |
| 0.2.0-preview.2 | 41 | 7/27/2026 |
| 0.2.0-preview.1 | 43 | 7/26/2026 |
Publishes the stable RuleGate 1.0 API and coordinated NuGet package family after release-candidate API freeze, security hardening, reproducibility, and package-only compatibility verification.