tenant fixes

This commit is contained in:
master
2026-02-23 23:44:50 +02:00
parent bdb1438654
commit 4f947a8b61
159 changed files with 1064 additions and 556 deletions

View File

@@ -12,6 +12,7 @@ using Serilog.Events;
using StellaOps.Auth.Abstractions;
using StellaOps.Auth.Client;
using StellaOps.Auth.ServerIntegration;
using StellaOps.Auth.ServerIntegration.Tenancy;
using StellaOps.Authority.Persistence.Postgres.Repositories;
using StellaOps.Concelier.Core.Linksets;
using StellaOps.Configuration;
@@ -549,6 +550,7 @@ builder.Services.AddSingleton<IAdvisoryLinksetQueryService>(sp =>
return new NullAdvisoryLinksetQueryService();
});
builder.Services.AddStellaOpsTenantServices();
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
builder.TryAddStellaOpsLocalBinding("scanner");
@@ -627,6 +629,7 @@ app.UseExceptionHandler(errorApp =>
app.UseStellaOpsCors();
app.UseAuthentication();
app.UseAuthorization();
app.UseStellaOpsTenantMiddleware();
// Stella Router integration - enables request dispatch from Router to ASP.NET endpoints
app.TryUseStellaRouter(routerEnabled);
@@ -641,7 +644,7 @@ app.MapHealthEndpoints();
app.MapObservabilityEndpoints();
app.MapOfflineKitEndpoints();
var apiGroup = app.MapGroup(resolvedOptions.Api.BasePath);
var apiGroup = app.MapGroup(resolvedOptions.Api.BasePath).RequireTenant();
if (app.Environment.IsEnvironment("Testing"))
{