Solhigson.Framework.Core 10.19.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Solhigson.Framework.Core --version 10.19.0
                    
NuGet\Install-Package Solhigson.Framework.Core -Version 10.19.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="Solhigson.Framework.Core" Version="10.19.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Solhigson.Framework.Core" Version="10.19.0" />
                    
Directory.Packages.props
<PackageReference Include="Solhigson.Framework.Core" />
                    
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 Solhigson.Framework.Core --version 10.19.0
                    
#r "nuget: Solhigson.Framework.Core, 10.19.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 Solhigson.Framework.Core@10.19.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=Solhigson.Framework.Core&version=10.19.0
                    
Install as a Cake Addin
#tool nuget:?package=Solhigson.Framework.Core&version=10.19.0
                    
Install as a Cake Tool

Utility Library

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Solhigson.Framework.Core:

Package Downloads
Solhigson.Admin

Admin screens for Solhigson apps as Razor components, rendered on the server. An app owns its routes; the package ships no page.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.29.0 47 11/19/2026
10.28.0 47 11/18/2026
10.27.0 92 11/17/2026
10.26.0 89 11/16/2026
10.25.0 89 11/16/2026
10.24.0 85 11/16/2026
10.23.0 87 11/15/2026
10.22.0 92 11/15/2026
10.21.0 92 11/14/2026
10.20.0 104 11/14/2026
10.19.0 93 11/12/2026
10.18.0 376 11/12/2026
10.17.0 92 11/11/2026
10.16.0 177 11/11/2026
10.15.0 204 11/7/2026
10.14.0 97 11/5/2026
10.13.0 99 11/4/2026
10.12.0 98 11/3/2026
10.11.0 103 11/2/2026
10.10.1 964 10/28/2026
Loading failed

10.19.0: sign-in hardening and the breached-password check. Minor bump. SolhigsonIdentityManager.SignInAsync (Solhigson.Framework.Identity) does one password-hash verification whatever the account's state, while that state does not change during the call: where Identity answers without hashing it verifies against a fixed hash (SignInFixedHash, a singleton AddSolhigsonIdentityManager registers), the password hasher given null for an unknown name. SignInResponse gains Outcome (SignInOutcome: Succeeded, RequiresTwoFactor, LockedOut, Rejected, Disabled) and LockedByThisAttempt; every call counts on the new meter Solhigson.Framework.Identity (password_sign_in, tagged outcome), and the attempt that locks an account writes a Warning naming its id. UnlockAsync(userName) clears an account's lockout end and failed count in one write and writes an Information line. Tightened without opting in: lockOutOnFailure defaults to true, so a caller that omits it counts failures toward lockout once rebuilt; an account whose Enabled is false is refused even with the right password (Outcome Disabled, User null, no cookie, no second factor asked); a right password whose account cannot be read back is signed out. The three public constructors gain optional SignInFixedHash and ILoggerFactory parameters: source compatible, but an assembly compiled against an earlier Core that constructs the manager, directly or from a derived class, throws MissingMethodException until rebuilt. Breach check, opt-in: identityBuilder.AddSolhigsonBreachedPasswordCheck(configure) registers BreachedPasswordCheck (Breached, Clear or Unchecked), BreachedPasswordValidator for the builder's user type and BreachedPasswordRangeCache; only the first five hex characters of the password's SHA-1 are sent, to api.pwnedpasswords.com, the range is cached an hour by that prefix, and no hash or verdict is stored; a failure answers Unchecked with one Error (the check fails open), and five in a row pause the calls for a minute. A consumer's own type named as one Solhigson.Framework.Identity gains (SignInOutcome, SignInDiagnostics, SignInFixedHash, BreachedPasswordCheck, BreachedPasswordOptions, BreachedPasswordRangeCache, BreachedPasswordResult, BreachedPasswordValidator, BreachedPasswordIdentityBuilderExtensions), brought into a file by a using directive alongside that framework namespace, is ambiguous there (CS0104) until the local copy is deleted or the use qualified. A consumer passes lockOutOnFailure: false only on purpose, reads Outcome where it read User.Enabled after a sign-in, rebuilds an assembly that constructs the manager, and, adopting the breach check, maps its own switch onto BreachedPasswordOptions.Enabled, which is on when unset; the full steps are in RELEASING.md. 10.18.0: the OTLP log export, the API-exchange masker and export, and the Loki readers. Minor bump, every piece opt-in: a host that calls none of AddSolhigsonLogExport, UseSolhigsonLogScope and AddSolhigsonLokiReader sees no logging change but the job runs below. Restore: every consumer now receives OpenTelemetry.Exporter.OpenTelemetryProtocol and OpenTelemetry.Extensions.Hosting 1.15.3 with their transitive packages; one referencing any of them below 1.15.3 raises it to 1.15.3 or later, adopting or not, or restore fails with NU1605, and one restoring in locked mode regenerates its lock files. Export (Solhigson.Framework.Logging.Export): AddSolhigsonLogExport, called after any ClearProviders(), adds the OpenTelemetry logging provider beside NLog; logs export only when Solhigson:Logs:OtlpExportEnabled is true and OTEL_EXPORTER_OTLP_ENDPOINT is set (OtlpExportState). The endpoint is https unless loopback: with any OTEL_EXPORTER_OTLP_*HEADERS key set, an endpoint that is neither turns the export off, but with none set it is not enforced, and a plain-http endpoint carries personal data in clear. Traces and metrics join through SolhigsonLogExportOptions.OpenTelemetry and export only while logs export. Every call ignores inbound trace context, in the DI DistributedContextPropagator and the SDK's process-wide default propagator. While exporting, ScopedPropertiesLogProcessor adds chainId, the ExportedLogProperties, client.address and enduser.id, and replaces the request's raw path in a line by its route template; UseSolhigsonLogScope(), before UseRouting, opens the request's log scope. Nothing else is rewritten or redacted: every template property, the formatted message, and an exception's type, message and stack trace export as written (a URL's query keeps its values), and the path rewrite misses an exception's text, a path after a schemeless host, a byte[] attribute, a multi-dimensional array attribute (which leaves the record's other attributes unrewritten too), a path followed by a percent-encoded / or ., and one preceded by ./ or ../. Every line then goes to an off-host store, so a host audits what its lines write before turning the switch on. Spans keep raw paths. Masker (Solhigson.Framework.Web.Api): ApiTraceMasker under ApiTraceMaskOptions, whose ProtectedFields always hold ProtectedFieldsFloor. API exchanges: with Solhigson:Logs:ApiLogsToLokiEnabled also true, LokiApiTraceSink exports each masked exchange as the service <app>.ApiLogs, carrying enduser_id, counted on the meter Solhigson.Framework.LogExport; the LoggingApiTraceSink line is then not written. Readers (Solhigson.Framework.Logging.Loki): AddSolhigsonLokiReader registers IAppLogReader and IApiLogReader, which read while Solhigson:Logs:LokiReadEnabled is true from Solhigson:Logs:LokiUrl, LokiUser and LokiToken, and check no permission. Changed without opting in: a job a framework Hangfire server runs gets its own root activity (JobRunEnvelopeFilter.ActivitySourceName) and log property scope, its trace id the chain id; with no tracer on that source, an outbound call it makes carries a sampled traceparent. A consumer's own type named as one Solhigson.Framework.Logging.Export gains (ApiLogExportPipeline, LogExportDiagnostics, LogPropertyScopeMiddleware, LokiApiTraceSink, OtlpExportOffReason, OtlpExportState, ScopedPropertiesLogProcessor, SolhigsonLogExportOptions, SolhigsonLogExportServiceCollectionExtensions, SolhigsonLogScopeApplicationBuilderExtensions), Solhigson.Framework.Logging.Loki gains (ApiLogRecord, ApiLogSearchRequest, AppLogNewestRecord, AppLogRecord, AppLogSearchRequest, CursorPagedList, IApiLogReader, IAppLogReader, LokiApiLogReader, LokiAppLogReader, LokiReadClient, SolhigsonLokiReaderOptions, SolhigsonLokiReaderServiceCollectionExtensions) or Solhigson.Framework.Web.Api gains (ApiTraceMasker, ApiTraceMaskOptions), brought into a file by a using directive alongside that framework namespace, is ambiguous there (CS0104) until the local copy is deleted or the use qualified; in a namespace that declares its own type of that name, the local one wins with no error and the framework's is qualified. 10.17.0: permission groups, opt-in, and the multi-role menu fix. Minor bump: every permission-group behaviour waits for AddPermissionGroups, so a host that does not call it sees no permission-group change. Declaring (Solhigson.Framework.Identity): [AllowedGroups(...)] on a public string permission constant, or AllowedGroups on a [PermissionInfo] class attribute or a subclass of it such as [PermissionInfoMenuRoot] (Solhigson.Framework.Web.Attributes), names the role groups whose roles may hold the permission; PermissionGroupDeclarations.ReadFrom(permissionsType, knownGroups) reads them into one map (Names, KnownGroups, Allows, TryGetGroups, GroupsOf, IsKnownGroup) and leaves a name with no declaration, no group, an unknown group or a shared name closed to every group, listed in Problems (PermissionGroupDeclarationProblem; PermissionGroupDeclarationFault NoDeclaration, NoGroup, UnknownGroup or SharedName, a SharedName being a name held at two declaring sites, or spellings differing only in letter case or trailing whitespace). services.AddPermissionGroups(typeof(<permission constants>), <group names>, options) (Solhigson.Framework.Web.Authorization.PermissionGroupServiceCollectionExtensions) registers that map as a singleton, PermissionGroupOptions, and PermissionGroupReconciler scoped as an open generic, and throws on a second call. Checking: with groups registered, PermissionManager.VerifyPermissionAsync, after its stored-grant check, refuses an undeclared permission whatever the switch, passes a holding role in a group the permission declares, and on any other mismatch reads PermissionGroupOptions.Enforce (a Func<IServiceProvider, bool>, off when absent): on refuses, off passes with a Warning; a switch that throws refuses and writes one Error. Each mismatch writes a once-per-host Warning per role, permission and outcome (PermissionGroupOutcome) and is counted on the meter Solhigson.Framework.PermissionGroups (permission_group_mismatch); every line is under the logger category Solhigson.Framework.PermissionGroups and starts "Permission group:" (PermissionGroupDiagnostics). A role's menu (GetMenuPermissionsForRoleCachedAsync) and listing (GetAllPermissionsForRoleCached) leave out an undeclared permission and, with enforcement on, one the role's group may not hold. A menu root is a permission: undeclared, it and all its children are left out of every role's menu whatever the switch, and the reconcile skips its grants with no line; a root is declared on the permissions type passed, by AllowedGroups on its [PermissionInfoMenuRoot] there or, when there is none, by an [AllowedGroups] constant of its name (both for one name is a SharedName). VerifyPermissionAsync(string, ClaimsPrincipal, CancellationToken) is a new overload. Granting (PermissionManager, no switch read): GetOfferedPermissionsForRoleAsync lists the stored permissions the role's group may hold, each with whether the role holds it (OfferedPermissionDto); SetRolePermissionsAsync adds and removes grants among those only, in one tracked save, leaves every grant it did not offer, and returns each dropped id with its reason (DroppedPermissionDto, PermissionGrantDropReason); GetAllowedGroupsAsync lists each permission's declared groups (PermissionAllowedGroupsDto); without groups the editor offers every permission. With groups registered, GiveAccessToRoleAsync refuses an out-of-group or undeclared permission and stores nothing, and discovery's AllowedRoles seeding, which goes through it, writes one Warning per refused role and name. Start-up: with groups registered, DiscoverNewPermissionsAsync writes one Information line (the declared count, the known groups and what the switch reads) and one Error per declaration problem, per undeclared [Permission] name on a controller or action and per blank name, never throwing for them and never changing discovery's result. Role groups: with groups registered, RoleGroupManager.AddRoleToGroupAsync refuses to move a role that holds a grant into another group and RoleGroupManager.UpdateAsync refuses to rename a group any of whose roles holds one, each writing a Warning and throwing InvalidOperationException, changing nothing; RoleManager<TRole>.UpdateAsync writing a role's RoleGroupId, and any write to RoleGroupId through the context, are not checked. Reconciling: PermissionGroupReconciler<TUser, TRole, TContext, TKey>.RunAsync(strip, cancellationToken) names each stored grant outside its permission's declared groups in a Warning of its own and, with strip true, re-reads and re-judges each and removes it by a tracked delete with its own save; a stale grant (no role, no group, an unknown group, no permission, or an undeclared permission) is kept and listed, the first 100 named in a Warning each and the rest counted in one line; an undeclared menu root's grant is skipped and counted (MenuRootsSkipped); the PermissionGroupReconcileResult lists each outside and stale grant (PermissionGroupReconcileRow, PermissionGroupGrantClass, PermissionGroupStaleReason, PermissionGroupReconcileAction) with the counts. A strip is audited only when the host includes SolhigsonRolePermission<TKey> in its AuditCaptureRegistry (an instance call on the registered singleton), its identity context carries AuditCaptureSaveChangesInterceptor and maps AuditTrail, and, with AuditCaptureOptions.RequireAttributedActor on, the run has an attributed user; otherwise the reconcile's Warning lines and result rows are its only record. Changed without opting in: GetMenuPermissionsForRoleCachedAsync for a user with several roles merged their menus into one role's cached menu objects, and building more than one role's menu in one request scope could carry one role's child into another role's cached menu through a menu parent both builds loaded, so a user with one role could be shown another role's menu items until the cache expired (no page access was granted); each role's cached menu now stays its own. HangfireTypes judges a refused type name by whole code points: a lone surrogate or a hidden supplementary code point (a tag character) now shows as one '?' in its log line and exception, while other BMP text is unchanged. PermissionManager's constructor gains optional PermissionGroupDeclarations, IOptions<PermissionGroupOptions>, IServiceProvider and ILoggerFactory parameters and RoleGroupManager's optional PermissionGroupDeclarations and ILoggerFactory ones: source compatible, but the old two-parameter and one-parameter constructors are gone, so an assembly compiled against an earlier Core that calls them, directly or from a derived class, throws MissingMethodException until rebuilt; a class deriving from either manager forwards the new parameters to its base, or permission groups stay off in it. A consumer's own type named as one Solhigson.Framework.Identity gains (AllowedGroupsAttribute, PermissionGroupDeclarations, PermissionGroupDeclarationProblem, PermissionGroupDeclarationFault, PermissionGroupOutcome, PermissionGroupDiagnostics, PermissionGroupOptions, PermissionGroupReconciler, PermissionGroupReconcileResult, PermissionGroupReconcileRow, PermissionGroupGrantClass, PermissionGroupStaleReason, PermissionGroupReconcileAction), Solhigson.Framework.Dto gains (OfferedPermissionDto, DroppedPermissionDto, PermissionGrantDropReason, PermissionAllowedGroupsDto) or Solhigson.Framework.Web.Authorization gains (PermissionGroupServiceCollectionExtensions), brought into a file by a using directive alongside that framework namespace, is ambiguous there (CS0104) until the local copy is deleted or the use qualified; in a namespace that declares its own type of that name, the local one wins with no error and the framework's is qualified, so a host's own AllowedGroupsAttribute beside its permission constants leaves each constant it marks undeclared (a NoDeclaration Error at start, and refused) until it is deleted. 10.16.0: the settings declaration and the root ring. In Solhigson.Framework.Infrastructure.ApplicationSettings, [SettingsGroup] names an AppSettingsBase type's group and [Setting] declares a property (Purpose, Source Startup, File or Table, Reason, Default, Floor, Ceiling, Sensitivity None, Personal or Secret), read by its own name through AppSettingsBase's Read<T> and ReadList; SettingsCatalog.Of builds the catalog from the group types and refuses a malformed declaration, SettingsCatalog.Report gives the declarations as startup-report lines, and SolhigsonConfigurationService.UseSettingsCatalog registers the catalog, after which CreateApplicationSettingAsync and UpdateApplicationSettingAsync hold a row to its declaration (SettingsCatalog.Refusal). SolhigsonConfigurationService.ListDeclaredSettingsAsync returns a DeclaredSettingsListing: each declared setting with the value in force and its origin, and each row that breaks a declaration. In Solhigson.Framework.Security, SecretSettingName (IsMatch, TryMatch, Classify) classifies secret setting names; services.AddRootEncryption(configuration) registers the AES-256-GCM root ring (IRootEncryptor, RootEncryptor, RootEnvelope) and RootSettingEncryptor as the setting encryptor, and RootReEncryption over each IRootEncryptedStore (AppSettingsRootStore for the settings table) gives CensusAsync, the values under each key id, the unreadable ones with their reason and the plain rows with secret-looking names, and ReEncryptAsync, which moves each readable value to the current key and reports each run to an optional IRootReEncryptionRunObserver as a RootReEncryptionRun; SettingsRead.DecryptFailed marks a table read whose sensitive row's decrypt threw a CryptographicException. Lifts: ConcurrencyRetry.ExecuteWithConcurrencyRetryAsync (Solhigson.Framework.EfCore), a bounded optimistic-concurrency retry whose delegate contract obliges the delegate to detach every entry an earlier attempt loaded, changed, added or removed, never Clear(); HangfirePassLock with IPassLock and IPassLease (Solhigson.Framework.Jobs), which JobRunStore.TryAcquireLock now uses; BoundedBody.ReadAsync (Solhigson.Framework.Web), a bounded request-body read whose TooLarge outcome answers 413. Tightened: a save landing sensitive with no encryptor or a LegacySettingEncryptor registered is refused, naming AddRootEncryption; a plain save of an undeclared row, or of a declared Secret, whose name SecretSettingName.Classify refuses is refused, while a declared non-Secret setting's name is judged at compile time by SOLT007 alone; a host that calls AddRootEncryption reads no row written under LegacySettingEncryptor and RootReEncryption cannot convert one (the ring census, which runs only with the ring registered, names it LegacyUnreadable), so each such secret, whose old key ships in this package, is rotated at its issuer before the switch and its new value saved after it. Also changed: GetApplicationSettingAsync returns an untracked instance, so an edit to it persists only through UpdateApplicationSettingAsync, which writes Value and IsSensitive only; Create and Update refuse while another setting has unsaved edits in the scope; ConfigurationWrapper warnings and errors logged before the logger factory existed are now written. A consumer's own type named ConcurrencyRetry, BoundedBody, BoundedBodyOutcome, HangfirePassLock, IPassLock or IPassLease, or one of the names Solhigson.Framework.Infrastructure.ApplicationSettings gains (SettingAttribute, SettingsGroupAttribute, SettingSource, SettingSensitivity, SettingsCatalog, SettingsCatalogEntry, DeclaredSettingsListing, DeclaredSettingLine, UndeclaredSettingRow, SettingFlag, SettingFlagKind, SettingValueOrigin, SettingEncryptorKind) or Solhigson.Framework.Security gains (SecretSettingName, SecretSettingClassification, SecretSettingOutcome, IRootEncryptor, RootEncryptor, RootEnvelope, RootEncryptionRegistration, RootSettingEncryptor, IRootEncryptedStore, AppSettingsRootStore, RootReEncryption, RootEncryptionCensus, IRootReEncryptionRunObserver, RootReEncryptionRun and their result types), brought into a file by a using directive alongside the framework namespace, is ambiguous there (CS0104) until the local copy is deleted or the use qualified; in a namespace that declares its own type of that name, the framework's is qualified.