Cirreum.Runtime.AuthenticationProvider
2.1.0
See the version list below for details.
dotnet add package Cirreum.Runtime.AuthenticationProvider --version 2.1.0
NuGet\Install-Package Cirreum.Runtime.AuthenticationProvider -Version 2.1.0
<PackageReference Include="Cirreum.Runtime.AuthenticationProvider" Version="2.1.0" />
<PackageVersion Include="Cirreum.Runtime.AuthenticationProvider" Version="2.1.0" />
<PackageReference Include="Cirreum.Runtime.AuthenticationProvider" />
paket add Cirreum.Runtime.AuthenticationProvider --version 2.1.0
#r "nuget: Cirreum.Runtime.AuthenticationProvider, 2.1.0"
#:package Cirreum.Runtime.AuthenticationProvider@2.1.0
#addin nuget:?package=Cirreum.Runtime.AuthenticationProvider&version=2.1.0
#tool nuget:?package=Cirreum.Runtime.AuthenticationProvider&version=2.1.0
Cirreum Runtime AuthenticationProvider
Runtime driver for the Cirreum Authentication track — the composition engine behind the AddAuthentication() umbrella.
Overview
Cirreum.Runtime.AuthenticationProvider is the Runtime-layer driver for Cirreum's Authentication pillar. It supplies the typed bootstrap that turns a scheme registrar into registered ASP.NET authentication services, plus the framework-shipped claims transformer that maps an authenticated principal onto a Cirreum IApplicationUser per scheme.
Apps do not reference this package directly — they install the umbrella Cirreum.Runtime.Authentication, which calls into this driver once per framework-shipped scheme. It flows in transitively.
API
RegisterAuthenticationProvider<TRegistrar, TSettings, TInstanceSettings>()
using Microsoft.Extensions.Hosting;
builder.RegisterAuthenticationProvider<
OidcAuthenticationRegistrar,
OidcAuthenticationSettings,
OidcAuthenticationInstanceSettings>(authBuilder);
The single bootstrap entry point, invoked by the umbrella package (AddAuthentication) once per framework-shipped registrar — not from app code.
What it does:
- Dedup check via marker-type registration — repeated calls for the same
TRegistrarare no-ops. - Binds
Cirreum:Authentication:Providers:{ProviderName}fromIConfigurationtoTSettings. - Skips with a debug log when the section is missing — so only configured providers activate.
- Runs the registrar against the Cirreum
IAuthenticationBuilder, registering and declaring one scheme per configured instance.
AudienceProviderRoleClaimsTransformer / services.AddAudienceRoleClaimsTransformation()
The framework-shipped IClaimsTransformation that runs after ASP.NET authentication completes. It canonicalizes app-minted custom* profile claims, then resolves the request's role claims from whichever side the scheme declares authoritative. Wired by the umbrella; one registration covers every scheme.
Who owns roles is declared, not inferred. The transformer resolves ISchemeClaimAuthorityMap optionally and consults it for the request's effective scheme — the origin scheme when a session-ticket continuation or a Two-Phase Auth promotion established the subject elsewhere, otherwise the stamped transport scheme:
| Declaration | Behaviour |
|---|---|
SubjectKind.Machine |
the store is never consulted — a machine's roles travel on its credential record |
Roles: IdentityProvider |
the roles the token issued stand |
Roles: ApplicationStore |
the store is read per request, so revocation is immediate |
| Undeclared (or no map registered) | legacy rule: a registered resolver means the store owns roles |
Under ApplicationStore and the legacy rule alike, the store is read on every request. Role claims already on the principal do not suppress it — that case is precisely the one a store-owns scheme must re-read.
custom* canonicalization runs here, excluding roles. App-minted profile claims are aliased to the names the framework reads (customName → the identity's name claim). Minted roles are deliberately not aliased: IsInRole treats presence as grant, so materializing a token's role snapshot would answer authorization from data frozen at token issue. The wire claim survives untouched and is simply never evaluated.
It follows the Kernel's identity-scope rule on a multi-identity principal: the user identifier is a singular fact, resolved from the primary identity via ClaimsHelper.ResolveId or not at all — an identifier borrowed from a second authentication context would load a different subject's application user. Each resolved role is added once.
TwoPhaseAuth — connection.Promote(principal, originScheme)
Connection-state promotion for long-lived connections (SignalR / WebSocket). Lets a connection that established with an anonymous sentinel principal be promoted to a fully authenticated principal mid-connection (e.g. after an in-band handshake), without tearing down and re-establishing:
connection.Promote(authenticatedPrincipal, originScheme: "entraExternal");
originScheme names the scheme that established the subject, and is required — attribution is declared, never defaulted. The promoted subject's facts (subject kind, claim authority) then resolve from the scheme that actually authenticated them rather than the transport now carrying them. null or blank is legal and records a deliberately unattributed promotion: the subject resolves SubjectKind.Unknown — degraded, never wrong.
Promote requires an authenticated principal and supports re-promotion (the newest principal wins). It clears the connection's cached application user and any prior origin stamp before stamping the new principal, so an invocation constructed mid-promotion can never pair the promoted principal with the previous subject's cached user or origin. AuthenticatedScheme deliberately survives — it describes how the connection was authenticated, not who occupies it now. Read the promoted state through the Cirreum.Contracts connection surface: connection.PromotedUser, connection.EffectiveUser, and connection.IsUserPromoted.
AuthenticationTelemetry
The Authentication track's shared ActivitySource and Meter, plus the tag-name, outcome-value and metric-name constants every authentication emitter uses. Nothing needs subscribing — AddCirreum() already registers the Cirreum.Authentication source and meter.
| Instrument | Kind | Tags |
|---|---|---|
cirreum.authn.transformations |
Counter | outcome, scheme, resolver |
cirreum.authn.transformation.duration |
Histogram (ms) | outcome, scheme |
cirreum.authn.selections |
Counter | scheme, selector |
cirreum.authn.selections is recorded by the umbrella package's forward-scheme resolver via the public RecordSchemeSelection — the single site every ISchemeSelector is dispatched through, so one call covers the whole registered set. A selector value of none means nothing claimed the request and the resolver fell through to its default.
The external user identifier is recorded on the activity only, never as a metric dimension.
Dependencies
- Cirreum.AuthenticationProvider — Authentication track contracts and registrar base (
Cirreum.Kernel,Cirreum.Contracts,Cirreum.Providersflow in transitively) - Microsoft.AspNetCore.App — ASP.NET authentication primitives
Versioning
Follows Semantic Versioning. Foundational library — major bumps are rare and coordinated with Cirreum.AuthenticationProvider releases.
License
MIT — see LICENSE.
Cirreum Foundation Framework
Layered simplicity for modern .NET
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Cirreum.AuthenticationProvider (>= 3.0.4)
- Cirreum.Logging.Deferred (>= 1.0.118)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Cirreum.Runtime.AuthenticationProvider:
| Package | Downloads |
|---|---|
|
Cirreum.Runtime.Authentication
App-facing umbrella for the Authentication pillar. Provides AddAuthentication() and the CirreumAuthenticationBuilder type. Transitively references all six Cirreum.Authentication.* schemes (ApiKey, SignedRequest, SessionTicket, OIDC, Entra, External) — apps install this single package to get the full Authentication track. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.3 | 41 | 8/30/2026 |
| 2.1.2 | 84 | 8/26/2026 |
| 2.1.1 | 88 | 8/25/2026 |
| 2.1.0 | 114 | 8/20/2026 |
| 2.0.3 | 133 | 8/4/2026 |
| 2.0.2 | 119 | 7/31/2026 |
| 2.0.1 | 127 | 7/30/2026 |
| 2.0.0 | 124 | 7/27/2026 |
| 1.1.5 | 113 | 7/25/2026 |
| 1.1.4 | 114 | 7/22/2026 |
| 1.1.3 | 121 | 7/20/2026 |
| 1.1.2 | 116 | 7/19/2026 |
| 1.1.1 | 127 | 7/8/2026 |
| 1.1.0 | 110 | 7/7/2026 |
| 1.0.2 | 125 | 7/4/2026 |
| 1.0.1 | 111 | 7/4/2026 |
| 1.0.0 | 120 | 7/3/2026 |