Release v2.4.0
Adds a dedicated Aspire hosting integration library so any Aspire AppHost can add and configure AuthProxy with a fluent, idiomatic API — either as a container resource (external consumers) or layered on top of a ProjectResource (in-repo development).
Added
-
Source/Aspireclass library (Aspire.Hosting9.5.2) withAuthProxyResource : ContainerResourcepointing atcratis/authproxyand a full set of fluent extension methods onIResourceBuilder<T> where T : IResourceWithEnvironment— works on both container and project resources// Container-based (external consumers) builder.AddAuthProxy("authproxy", tag: "1.2.3") .WithHttpEndpoint(port: 8080) .WithBackend("main", apiResource) .WithFrontend("main", webResource) .WithOidcProvider("Microsoft", OidcProviderType.Microsoft, authority, clientId, secret) .WithHostTenantResolution() .WithTenantVerification(platformApi, "/api/tenants/{tenantId}") .WithSelectionTenantResolution(platformApi, "/api/tenants/selectable") .WithInvite(publicKeyPem, studioApi, "/internal/invites/exchange", issuer: "https://studio.example.com") .WithInviteClaimForwarding("organization_id", toClaimType: "organization") .WithLobbyFrontend(lobbyResource); // Project-based (in-repo dev — same extension methods apply) builder.AddProject("authproxy") .WithBackend("main", testApp) .WithFrontend("main", web);
Available methods:
AddAuthProxy,WithBackend,WithFrontend,WithOidcProvider,WithOAuthProvider,WithHostTenantResolution,WithSubHostTenantResolution,WithClaimTenantResolution,WithRouteTenantResolution,WithSpecifiedTenantResolution,WithDefaultTenantResolution,WithSelectionTenantResolution,WithTenantVerification,WithInvite,WithInviteClaimForwarding,WithLobbyFrontend,WithLobbyBackend -
OidcProviderTypeenum (Custom,Microsoft,Google,GitHub,Apple) in the Aspire library — standalone, no dependency on the AuthProxy web project -
Documentation/aspire/index.md— how-to guide covering container vs project resource setup, allWith*extension methods, theOidcProviderTypeenum, tenant selection, invites & lobby, identity details resolution, resource-based endpoint references, and cross-links to the existing configuration reference -
publish-nugetjob in.github/workflows/publish.ymlusing OIDC trusted publishing (NuGet/login@v1) — packs and pushes onlySource/Aspire/Aspire.csprojasCratis.AuthProxy.Aspireto NuGet.org; runs independently of the Docker pipeline
Changed
-
Composition/AppHost.csupdated to useWithBackend/WithFrontendinstead of bareWithReference, and now wires up the frontend (web) service as well -
Source/Aspire/Aspire.csprojupdated with full NuGet package metadata (PackageId,Title,Description,Authors,PackageLicenseExpression,RepositoryUrl,PackageTags,IsPackable) -
WithSelectionTenantResolutionupdated to accept an optionaltenantsEndpointparameter that maps toTenantResolutions[n].Options.TenantsEndpoint, and a new resource-based overload that accepts anIResourceBuilder<IResourceWithEndpoints>+ route so Aspire resolves the base URL automatically -
WithTenantVerificationgains a resource-based overload — pass an Aspire service resource and a route template instead of a full URL -
WithInvitegains a resource-based overload — pass the exchange service resource and route instead of a hardcoded exchange URL -
WithBackendgains an optionalresolveIdentityDetailsparameter (bool?) that maps toServices[name].ResolveIdentityDetails, controlling whether AuthProxy calls/.cratis/meon that service's backend to enrich the identity cookie