Goldpath.Auth 0.1.0-preview.8

This is a prerelease version of Goldpath.Auth.
dotnet add package Goldpath.Auth --version 0.1.0-preview.8
                    
NuGet\Install-Package Goldpath.Auth -Version 0.1.0-preview.8
                    
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="Goldpath.Auth" Version="0.1.0-preview.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Goldpath.Auth" Version="0.1.0-preview.8" />
                    
Directory.Packages.props
<PackageReference Include="Goldpath.Auth" />
                    
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 Goldpath.Auth --version 0.1.0-preview.8
                    
#r "nuget: Goldpath.Auth, 0.1.0-preview.8"
                    
#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 Goldpath.Auth@0.1.0-preview.8
                    
#: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=Goldpath.Auth&version=0.1.0-preview.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goldpath.Auth&version=0.1.0-preview.8&prerelease
                    
Install as a Cake Tool

Goldpath.Auth

Ring B auth composition: your IdP composed, never rewritten. OIDC/JWT bearer (default) or a minimal API-key handler, a secure-by-default fallback policy, token–tenant binding with MultiTenancy, and Mediant's [Authorize] fed from the same principal — fail-closed at both the endpoint and the command level.

Getting started

builder.AddGoldpathAuth();          // strategy per manifest; every endpoint now demands a principal
app.UseGoldpathAuth();              // after UseGoldpathMultiTenancy(): authN → tenant binding → authZ

app.MapGet("/public/rates", ...).AllowAnonymous();   // the explicit, greppable escape

[Authorize(Roles = "loan-officer")]                  // Mediant command level, same principal
public sealed record ApproveLoanCommand : ICommand<Result>;

Configuration

"Goldpath": {
  "Auth": {
    "Strategy": "OpenId",                  // OpenId | ApiKey | None
    "Authority": "https://idp.bank.com/realms/prod",
    "Audience": "orders-api",              // unset skips audience validation
    "TenantClaim": "goldpath_tenant",           // token–tenant binding claim
    "BindTenant": true,
    "ApiKeys": { "batch-runner": "<from secret store>" }
  }
}

Advanced

  • Secure by default: the fallback policy denies anonymous everywhere; health probes stay exempt (MapGoldpathDefaultEndpoints marks them AllowAnonymous explicitly). Fail-open auth is how internal APIs end up on the internet.
  • Token–tenant binding: an authenticated token carrying goldpath_tenant=acme on a request resolved to globex → 403 + goldpath_auth_tenant_binding_rejects_total (alert on any non-zero — the write-guard pattern). Claim absent → binding not enforced, so gateway-owns-tenancy topologies stay valid.
  • ApiKey is deliberately minimal (internal/legacy callers): named clients, constant-time comparison, principal = client name so audit rows say WHO. No key-management UI — Ring C.
  • Claim-mapping tolerance: the Mediant authorization context reads both mapped (ClaimTypes.Role) and raw (role/roles, sub) claim types — behavior never depends on a handler mapping flag.
  • OpenAPI: the security scheme (bearer/apiKey) is added to generated documents on net10.0 targets (document transformers arrived after net8's OpenApi package).
  • Strategic deferrals (tracked, schema-rejected until built): saml (SSO/portal-layer concern; APIs speak JWT via token exchange), ldap (sits behind the IdP).

Providers

None of ours — that's the point. openid composes ASP.NET JwtBearer against ANY compliant IdP; apikey is self-contained; none wires nothing (mTLS/gateway topologies).

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.8 102 9/7/2026
0.1.0-preview.7 90 9/1/2026
0.1.0-preview.6 383 8/4/2026
0.1.0-preview.5 87 7/28/2026
0.1.0-preview.4 80 7/27/2026
0.1.0-preview.3 63 7/25/2026
0.1.0-preview.2 63 7/13/2026
0.1.0-preview.1 105 7/13/2026