IronAlpine.Security.Authorization 2.0.0

dotnet add package IronAlpine.Security.Authorization --version 2.0.0
                    
NuGet\Install-Package IronAlpine.Security.Authorization -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IronAlpine.Security.Authorization" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IronAlpine.Security.Authorization" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="IronAlpine.Security.Authorization" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IronAlpine.Security.Authorization --version 2.0.0
                    
#r "nuget: IronAlpine.Security.Authorization, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IronAlpine.Security.Authorization@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IronAlpine.Security.Authorization&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=IronAlpine.Security.Authorization&version=2.0.0
                    
Install as a Cake Tool

IronAlpine.Security.Authorization

Permission authorization contracts and application-level services for IronAlpine.

Why

This package is the authorization core for non-host-specific layers:

  • Defines permission store contracts.
  • Provides permission checker service abstractions.
  • Keeps business/application layers independent from ASP.NET and EF Core.

Use this package when handlers/services need permission checks but should not know persistence details.

Install

dotnet add package IronAlpine.Security.Authorization

Contracts

  • ISecurityPermissionStore
    • Read permission names by permission-group ids.
  • ISecurityPermissionProjectionSyncStore
    • Write-side sync contract for SecurityPermissionProjection.
    • Implemented by provider packages (for example IronAlpine.Security.Authorization.EFCore).
  • SecurityPermissionProjectionSyncItem
    • Transport model for projection synchronization.
  • IPermissionCheckerService
    • High-level permission check service used by application code.

Program.cs (Core Registration)

builder.Services.AddIronAlpineAuthorization(options =>
{
    options.UseWildcardPermissionMatching = false;
    options.CacheDurationSeconds = 30;
});

Configuration

Section: IronAlpine:Security:Authorization

SecurityAuthorizationOptions

  • UseWildcardPermissionMatching (bool, default: false)
    • Enables matching such as identity.users.*.
    • Keep disabled unless you explicitly model wildcard policies.
  • CacheDurationSeconds (int, default: 30)
    • In-memory check cache duration for permission evaluations.
    • Lower values increase store reads; higher values may delay revocation visibility.

Typical Combination

  1. Register IronAlpine.Security.Authorization in application.
  2. Register an implementation provider:
    • IronAlpine.Security.Authorization.EFCore for EF-backed projections.
  3. Register ASP.NET authorization host package (IronAlpine.Security.AspNetCore) for API policy enforcement.

Projection Sync Pattern

When permission-group change events are consumed, map event items to SecurityPermissionProjectionSyncItem and call sync store:

await _syncStore.ReplacePermissionsAsync(
    permissionGroupId,
    permissions.Select(x => new SecurityPermissionProjectionSyncItem(x.PermissionId, x.PermissionName)).ToArray(),
    cancellationToken);

Troubleshooting

  • No service for ISecurityPermissionStore
    • Register a provider package (Authorization.EFCore) before checker usage.
  • Permission checks always false
    • Verify projection sync is running and permission group claims are present.
  • Unexpected stale results
    • Reduce CacheDurationSeconds or invalidate cache on projection updates.

Best Practices

  • Keep this package in Core/Application layers only.
  • Keep provider-specific packages (EFCore, Redis, etc.) in Infrastructure.
  • Use explicit permission names and avoid wildcard usage unless required by policy design.
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on IronAlpine.Security.Authorization:

Package Downloads
IronAlpine.Security.AspNetCore

AspNetCore implementation for IronAlpine security abstractions and audit user context resolution.

IronAlpine.Security.Authorization.EFCore

Entity Framework Core store and model mapping for IronAlpine security authorization.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 530 4/2/2026
Loading failed

Stable mediator release with request/response, notification publish strategies, streaming, and dependency injection integration.